Flutter Engine
The Flutter Engine
Classes | Public Member Functions | List of all members
flutter::EmbedderSurfaceMetalSkia Class Referencefinal

#include <embedder_surface_metal_skia.h>

Inheritance diagram for flutter::EmbedderSurfaceMetalSkia:
flutter::EmbedderSurface flutter::GPUSurfaceMetalDelegate

Classes

struct  MetalDispatchTable
 

Public Member Functions

 EmbedderSurfaceMetalSkia (GPUMTLDeviceHandle device, GPUMTLCommandQueueHandle command_queue, MetalDispatchTable dispatch_table, std::shared_ptr< EmbedderExternalViewEmbedder > external_view_embedder)
 
 ~EmbedderSurfaceMetalSkia () override
 
- Public Member Functions inherited from flutter::EmbedderSurface
 EmbedderSurface ()
 
virtual ~EmbedderSurface ()
 
virtual bool IsValid () const =0
 
virtual std::unique_ptr< SurfaceCreateGPUSurface ()=0
 
virtual std::shared_ptr< impeller::ContextCreateImpellerContext () const
 
virtual sk_sp< GrDirectContextCreateResourceContext () const
 
- Public Member Functions inherited from flutter::GPUSurfaceMetalDelegate
 GPUSurfaceMetalDelegate (MTLRenderTargetType render_target)
 Construct a new GPUSurfaceMetalDelegate object with the specified render_target type. More...
 
virtual ~GPUSurfaceMetalDelegate ()
 
virtual GPUCAMetalLayerHandle GetCAMetalLayer (const SkISize &frame_info) const =0
 Returns the handle to the CAMetalLayer to render to. This is only called when the specified render target type is kCAMetalLayer. More...
 
virtual bool PresentDrawable (GrMTLHandle drawable) const =0
 Presents the drawable to the "screen". The drawable is obtained from the CAMetalLayer that given by GetCAMetalLayer call. This is only called when the specified render target type in kCAMetalLayer. More...
 
virtual GPUMTLTextureInfo GetMTLTexture (const SkISize &frame_info) const =0
 Returns the handle to the MTLTexture to render to. This is only called when the specified render target type is kMTLTexture. More...
 
virtual bool PresentTexture (GPUMTLTextureInfo texture) const =0
 Presents the texture with texture_id to the "screen". texture_id corresponds to a texture that has been obtained by an earlier call to GetMTLTexture. This is only called when the specified render target type is kMTLTexture. More...
 
virtual bool AllowsDrawingWhenGpuDisabled () const
 Whether to allow drawing to the surface when the GPU is disabled. More...
 
MTLRenderTargetType GetRenderTargetType ()
 

Detailed Description

Definition at line 23 of file embedder_surface_metal_skia.h.

Constructor & Destructor Documentation

◆ EmbedderSurfaceMetalSkia()

flutter::EmbedderSurfaceMetalSkia::EmbedderSurfaceMetalSkia ( GPUMTLDeviceHandle  device,
GPUMTLCommandQueueHandle  command_queue,
MetalDispatchTable  dispatch_table,
std::shared_ptr< EmbedderExternalViewEmbedder external_view_embedder 
)

Definition at line 19 of file embedder_surface_metal_skia.mm.

25 metal_dispatch_table_(std::move(metal_dispatch_table)),
26 external_view_embedder_(std::move(external_view_embedder)) {
27 main_context_ =
28 [FlutterDarwinContextMetalSkia createGrContext:(id<MTLDevice>)device
29 commandQueue:(id<MTLCommandQueue>)command_queue];
30 resource_context_ =
31 [FlutterDarwinContextMetalSkia createGrContext:(id<MTLDevice>)device
32 commandQueue:(id<MTLCommandQueue>)command_queue];
33 valid_ = main_context_ && resource_context_;
34}
GPUSurfaceMetalDelegate(MTLRenderTargetType render_target)
Construct a new GPUSurfaceMetalDelegate object with the specified render_target type.
VkDevice device
Definition: main.cc:53

◆ ~EmbedderSurfaceMetalSkia()

flutter::EmbedderSurfaceMetalSkia::~EmbedderSurfaceMetalSkia ( )
overridedefault

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