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

#include <ios_surface_metal_skia.h>

Inheritance diagram for flutter::IOSSurfaceMetalSkia:
flutter::IOSSurface flutter::GPUSurfaceMetalDelegate

Public Member Functions

 IOSSurfaceMetalSkia (const fml::scoped_nsobject< CAMetalLayer > &layer, std::shared_ptr< IOSContext > context)
 
 ~IOSSurfaceMetalSkia ()
 
- Public Member Functions inherited from flutter::IOSSurface
std::shared_ptr< IOSContextGetContext () const
 
virtual ~IOSSurface ()
 
virtual bool IsValid () const =0
 
virtual void UpdateStorageSizeIfNecessary ()=0
 
virtual std::unique_ptr< SurfaceCreateGPUSurface (GrDirectContext *gr_context=nullptr)=0
 
- 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 ()
 

Additional Inherited Members

- Static Public Member Functions inherited from flutter::IOSSurface
static std::unique_ptr< IOSSurfaceCreate (std::shared_ptr< IOSContext > context, const fml::scoped_nsobject< CALayer > &layer)
 
- Protected Member Functions inherited from flutter::IOSSurface
 IOSSurface (std::shared_ptr< IOSContext > ios_context)
 

Detailed Description

Definition at line 19 of file ios_surface_metal_skia.h.

Constructor & Destructor Documentation

◆ IOSSurfaceMetalSkia()

flutter::IOSSurfaceMetalSkia::IOSSurfaceMetalSkia ( const fml::scoped_nsobject< CAMetalLayer > &  layer,
std::shared_ptr< IOSContext context 
)

Definition at line 26 of file ios_surface_metal_skia.mm.

28 : IOSSurface(std::move(context)),
30 layer_(layer) {
31 is_valid_ = layer_;
32 auto metal_context = CastToMetalContext(GetContext());
33 auto darwin_context = metal_context->GetDarwinContext().get();
34 command_queue_ = darwin_context.commandQueue;
35 device_ = darwin_context.device;
36}
GPUSurfaceMetalDelegate(MTLRenderTargetType render_target)
Construct a new GPUSurfaceMetalDelegate object with the specified render_target type.
IOSSurface(std::shared_ptr< IOSContext > ios_context)
Definition: ios_surface.mm:49
std::shared_ptr< IOSContext > GetContext() const
Definition: ios_surface.mm:56
static IOSContextMetalSkia * CastToMetalContext(const std::shared_ptr< IOSContext > &context) __attribute__((cf_audited_transfer))

◆ ~IOSSurfaceMetalSkia()

flutter::IOSSurfaceMetalSkia::~IOSSurfaceMetalSkia ( )
default

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