Flutter Engine
flutter::GPUSurfaceMetal Class Reference

#include <gpu_surface_metal.h>

Inheritance diagram for flutter::GPUSurfaceMetal:
flutter::Surface

Public Member Functions

 GPUSurfaceMetal (GPUSurfaceDelegate *delegate, fml::scoped_nsobject< CAMetalLayer > layer, sk_sp< GrDirectContext > context, fml::scoped_nsprotocol< id< MTLCommandQueue >> command_queue)
 
 ~GPUSurfaceMetal () override
 
- Public Member Functions inherited from flutter::Surface
 Surface ()
 
virtual ~Surface ()
 
virtual bool ClearRenderContext ()
 

Detailed Description

Definition at line 21 of file gpu_surface_metal.h.

Constructor & Destructor Documentation

◆ GPUSurfaceMetal()

flutter::GPUSurfaceMetal::GPUSurfaceMetal ( GPUSurfaceDelegate delegate,
fml::scoped_nsobject< CAMetalLayer >  layer,
sk_sp< GrDirectContext >  context,
fml::scoped_nsprotocol< id< MTLCommandQueue >>  command_queue 
)

Definition at line 18 of file gpu_surface_metal.mm.

References fml::scoped_nsprotocol< NST >::get().

22  : delegate_(delegate),
23  layer_(std::move(layer)),
24  context_(std::move(context)),
25  command_queue_(std::move(command_queue)) {
26  layer_.get().pixelFormat = MTLPixelFormatBGRA8Unorm;
27  // Flutter needs to read from the color attachment in cases where there are effects such as
28  // backdrop filters.
29  layer_.get().framebufferOnly = NO;
30 }

◆ ~GPUSurfaceMetal()

flutter::GPUSurfaceMetal::~GPUSurfaceMetal ( )
override

Definition at line 32 of file gpu_surface_metal.mm.

References FML_DLOG, FML_LOG, fml::scoped_nsprotocol< NST >::get(), flutter::GPUSurfaceDelegate::GetExternalViewEmbedder(), and TRACE_EVENT0.

32  {
33  ReleaseUnusedDrawableIfNecessary();
34 }

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