Flutter Engine
flutter::EngineLayer Class Reference

#include <engine_layer.h>

Inheritance diagram for flutter::EngineLayer:
flutter::RefCountedDartWrappable< EngineLayer > fml::RefCountedThreadSafe< EngineLayer > tonic::DartWrappable fml::internal::RefCountedThreadSafeBase

Public Member Functions

 ~EngineLayer () override
 
size_t GetAllocationSize () const override
 
std::shared_ptr< flutter::ContainerLayerLayer () const
 
- Public Member Functions inherited from flutter::RefCountedDartWrappable< EngineLayer >
virtual void RetainDartWrappableReference () const override
 
virtual void ReleaseDartWrappableReference () const override
 
- Public Member Functions inherited from fml::RefCountedThreadSafe< EngineLayer >
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 DartWrapperInfoGetDartWrapperInfo () 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 fml::RefPtr< EngineLayerMakeRetained (std::shared_ptr< flutter::ContainerLayer > layer)
 
static void MakeRetained (Dart_Handle dart_handle, std::shared_ptr< flutter::ContainerLayer > layer)
 
static void RegisterNatives (tonic::DartLibraryNatives *natives)
 

Additional Inherited Members

- Public Types inherited from tonic::DartWrappable
enum  DartNativeFields {
  kPeerIndex,
  kWrapperInfoIndex,
  kNumberOfNativeFields
}
 
- Protected Member Functions inherited from fml::RefCountedThreadSafe< EngineLayer >
 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)
 

Detailed Description

Definition at line 19 of file engine_layer.h.

Constructor & Destructor Documentation

◆ ~EngineLayer()

flutter::EngineLayer::~EngineLayer ( )
overridedefault

Member Function Documentation

◆ GetAllocationSize()

size_t flutter::EngineLayer::GetAllocationSize ( ) const
overridevirtual

Reimplemented from tonic::DartWrappable.

Definition at line 21 of file engine_layer.cc.

References flutter::IMPLEMENT_WRAPPERTYPEINFO().

21  {
22  // Provide an approximation of the total memory impact of this object to the
23  // Dart GC. The ContainerLayer may hold references to a tree of other layers,
24  // which in turn may contain Skia objects.
25  return 3000;
26 };

◆ Layer()

std::shared_ptr<flutter::ContainerLayer> flutter::EngineLayer::Layer ( ) const
inline

Definition at line 40 of file engine_layer.h.

References FML_FRIEND_MAKE_REF_COUNTED.

40 { return layer_; }

◆ MakeRetained() [1/2]

◆ MakeRetained() [2/2]

static void flutter::EngineLayer::MakeRetained ( Dart_Handle  dart_handle,
std::shared_ptr< flutter::ContainerLayer layer 
)
inlinestatic

Definition at line 32 of file engine_layer.h.

33  {
34  auto engine_layer = fml::MakeRefCounted<EngineLayer>(layer);
35  engine_layer->AssociateWithDartWrapper(dart_handle);
36  }

◆ RegisterNatives()

static void flutter::EngineLayer::RegisterNatives ( tonic::DartLibraryNatives natives)
static

The documentation for this class was generated from the following files: