Flutter Engine
flutter::IOSSurfaceMetal Class Referencefinal

#include <ios_surface_metal.h>

Inheritance diagram for flutter::IOSSurfaceMetal:
flutter::IOSSurface flutter::GPUSurfaceMetalDelegate

Public Member Functions

 IOSSurfaceMetal (fml::scoped_nsobject< CAMetalLayer > layer, std::shared_ptr< IOSContext > context)
 
 ~IOSSurfaceMetal ()
 
- Public Member Functions inherited from flutter::IOSSurface
std::shared_ptr< IOSContextGetContext () const
 
virtual ~IOSSurface ()
 
- 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 ()
 
MTLRenderTargetType GetRenderTargetType ()
 

Additional Inherited Members

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

Detailed Description

Definition at line 17 of file ios_surface_metal.h.

Constructor & Destructor Documentation

◆ IOSSurfaceMetal()

flutter::IOSSurfaceMetal::IOSSurfaceMetal ( fml::scoped_nsobject< CAMetalLayer >  layer,
std::shared_ptr< IOSContext context 
)

Definition at line 17 of file ios_surface_metal.mm.

References flutter::CastToMetalContext(), FML_CHECK, FML_DCHECK, FML_DLOG, fml::scoped_nsprotocol< NST >::get(), flutter::IOSSurface::GetContext(), flutter::kCAMetalLayer, texture, and ~IOSSurfaceMetal().

19  : IOSSurface(std::move(context)),
21  layer_(std::move(layer)) {
22  is_valid_ = layer_;
23  auto metal_context = CastToMetalContext(GetContext());
24  auto darwin_context = metal_context->GetDarwinContext().get();
25  command_queue_ = darwin_context.commandQueue;
26  device_ = darwin_context.device;
27 }
std::shared_ptr< IOSContext > GetContext() const
Definition: ios_surface.mm:55
static IOSContextMetal * CastToMetalContext(const std::shared_ptr< IOSContext > &context)
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:48

◆ ~IOSSurfaceMetal()

flutter::IOSSurfaceMetal::~IOSSurfaceMetal ( )
default

Referenced by IOSSurfaceMetal().


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