Flutter Engine
The Flutter Engine
|
#include <immutable_buffer.h>
Public Member Functions | |
~ImmutableBuffer () override | |
size_t | length () const |
The length of the data in bytes. More... | |
sk_sp< SkData > | data () const |
Callers should not modify the returned data. This is not exposed to Dart. More... | |
void | dispose () |
Public Member Functions inherited from flutter::RefCountedDartWrappable< ImmutableBuffer > | |
virtual void | RetainDartWrappableReference () const override |
virtual void | ReleaseDartWrappableReference () const override |
Public Member Functions inherited from fml::RefCountedThreadSafe< ImmutableBuffer > | |
void | Release () const |
Public Member Functions inherited from fml::internal::RefCountedThreadSafeBase | |
void | AddRef () const |
bool | HasOneRef () const |
void | AssertHasOneRef () const |
Public Member Functions inherited from tonic::DartWrappable | |
DartWrappable () | |
virtual const DartWrapperInfo & | GetDartWrapperInfo () const =0 |
virtual void | RetainDartWrappableReference () const =0 |
virtual void | ReleaseDartWrappableReference () const =0 |
Dart_Handle | CreateDartWrapper (DartState *dart_state) |
void | AssociateWithDartWrapper (Dart_Handle wrappable) |
void | ClearDartWrapper () |
Dart_WeakPersistentHandle | dart_wrapper () const |
Static Public Member Functions | |
static Dart_Handle | init (Dart_Handle buffer_handle, Dart_Handle data, Dart_Handle callback_handle) |
static Dart_Handle | initFromAsset (Dart_Handle buffer_handle, Dart_Handle asset_name_handle, Dart_Handle callback_handle) |
static Dart_Handle | initFromFile (Dart_Handle buffer_handle, Dart_Handle file_path_handle, Dart_Handle callback_handle) |
Additional Inherited Members | |
Public Types inherited from tonic::DartWrappable | |
enum | DartNativeFields { kPeerIndex , kNumberOfNativeFields } |
Protected Member Functions inherited from fml::RefCountedThreadSafe< ImmutableBuffer > | |
RefCountedThreadSafe () | |
~RefCountedThreadSafe () | |
Protected Member Functions inherited from fml::internal::RefCountedThreadSafeBase | |
RefCountedThreadSafeBase () | |
~RefCountedThreadSafeBase () | |
bool | Release () const |
void | Adopt () |
Protected Member Functions inherited from tonic::DartWrappable | |
virtual | ~DartWrappable () |
Static Protected Member Functions inherited from tonic::DartWrappable | |
static Dart_PersistentHandle | GetTypeForWrapper (tonic::DartState *dart_state, const tonic::DartWrapperInfo &wrapper_info) |
A simple opaque handle to an immutable byte buffer suitable for use internally by the engine.
This data is not known by the Dart VM.
It is expected that C++ users of this object will not modify the data argument. No Dart side calls are provided to do so.
Definition at line 27 of file immutable_buffer.h.
|
override |
Definition at line 26 of file immutable_buffer.cc.
Callers should not modify the returned data. This is not exposed to Dart.
Definition at line 80 of file immutable_buffer.h.
|
inline |
Clears the Dart native fields and removes the reference to the underlying byte buffer.
The byte buffer will continue to live if other objects hold a reference to it.
Definition at line 87 of file immutable_buffer.h.
|
static |
Initializes a new ImmutableData from a Dart Uint8List.
buffer_handle
is the caller that will be registered as the Dart peer of the native ImmutableBuffer object.
data
is a tonic::Uint8List of bytes to copy.
callback_handle
is expected to be a void callback to signal when the copy has completed.
Definition at line 28 of file immutable_buffer.cc.
|
static |
Initializes a new ImmutableData from an asset matching a provided asset string.
The zero indexed argument is the caller that will be registered as the Dart peer of the native ImmutableBuffer object.
The first indexed argumented is a String corresponding to the asset to load.
The second indexed argument is expected to be a void callback to signal when the copy has completed.
Definition at line 46 of file immutable_buffer.cc.
|
static |
Initializes a new ImmutableData from an File path.
The zero indexed argument is the caller that will be registered as the Dart peer of the native ImmutableBuffer object.
The first indexed argumented is a String corresponding to the file path to load.
The second indexed argument is expected to be a void callback to signal when the copy has completed.
Definition at line 122 of file immutable_buffer.cc.
|
inline |
The length of the data in bytes.
Definition at line 74 of file immutable_buffer.h.