Flutter Engine
flutter::IOSSurfaceMetal Class Referencefinal

#include <ios_surface_metal.h>

Inheritance diagram for flutter::IOSSurfaceMetal:
flutter::IOSSurface flutter::GPUSurfaceDelegate

Public Member Functions

 IOSSurfaceMetal (fml::scoped_nsobject< CAMetalLayer > layer, std::shared_ptr< IOSContext > context, FlutterPlatformViewsController *platform_views_controller)
 
 ~IOSSurfaceMetal () override
 
- Public Member Functions inherited from flutter::IOSSurface
std::shared_ptr< IOSContextGetContext () const
 
std::shared_ptr< IOSExternalViewEmbedderGetSurfaceExternalViewEmbedder () const
 
virtual ~IOSSurface ()
 
- Public Member Functions inherited from flutter::GPUSurfaceDelegate
virtual ~GPUSurfaceDelegate ()
 

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, FlutterPlatformViewsController *platform_views_controller)
 
- Protected Member Functions inherited from flutter::IOSSurface
 IOSSurface (std::shared_ptr< IOSContext > ios_context, FlutterPlatformViewsController *platform_views_controller)
 

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,
FlutterPlatformViewsController platform_views_controller 
)

Definition at line 16 of file ios_surface_metal.mm.

References flutter::CastToMetalContext(), fml::scoped_nsprotocol< NST >::get(), flutter::IOSSurface::GetContext(), flutter::IOSSurface::GetSurfaceExternalViewEmbedder(), and ~IOSSurfaceMetal().

19  : IOSSurface(std::move(context), platform_views_controller), layer_(std::move(layer)) {
20  if (!layer_) {
21  return;
22  }
23 
24  auto metal_context = CastToMetalContext(GetContext());
25 
26  layer_.get().device = metal_context->GetDevice().get();
27  layer_.get().presentsWithTransaction = YES;
28 
29  is_valid_ = true;
30 }
std::shared_ptr< IOSContext > GetContext() const
Definition: ios_surface.mm:64
IOSSurface(std::shared_ptr< IOSContext > ios_context, FlutterPlatformViewsController *platform_views_controller)
Definition: ios_surface.mm:54
static IOSContextMetal * CastToMetalContext(const std::shared_ptr< IOSContext > &context)

◆ ~IOSSurfaceMetal()

flutter::IOSSurfaceMetal::~IOSSurfaceMetal ( )
overridedefault

Referenced by IOSSurfaceMetal().


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