Flutter Engine
The Flutter Engine
|
Interface implemented by all platform surfaces that can present a metal backing store to the "screen". The GPU surface abstraction (which abstracts the client rendering API) uses this delegation pattern to tell the platform surface (which abstracts how backing stores fulfilled by the selected client rendering API end up on the "screen" on a particular platform) when the rasterizer needs to allocate and present the software backing store. More...
#include <gpu_surface_metal_delegate.h>
Public Member Functions | |
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 () |
Interface implemented by all platform surfaces that can present a metal backing store to the "screen". The GPU surface abstraction (which abstracts the client rendering API) uses this delegation pattern to tell the platform surface (which abstracts how backing stores fulfilled by the selected client rendering API end up on the "screen" on a particular platform) when the rasterizer needs to allocate and present the software backing store.
Definition at line 52 of file gpu_surface_metal_delegate.h.
|
explicit |
Construct a new GPUSurfaceMetalDelegate object with the specified render_target type.
Definition at line 9 of file gpu_surface_metal_delegate.cc.
|
virtualdefault |
|
virtual |
Whether to allow drawing to the surface when the GPU is disabled.
Reimplemented in flutter::testing::TestGPUSurfaceMetalDelegate.
Definition at line 19 of file gpu_surface_metal_delegate.cc.
|
pure virtual |
Returns the handle to the CAMetalLayer to render to. This is only called when the specified render target type is kCAMetalLayer
.
Implemented in flutter::testing::TestGPUSurfaceMetalDelegate.
|
pure virtual |
Returns the handle to the MTLTexture to render to. This is only called when the specified render target type is kMTLTexture
.
Implemented in flutter::testing::TestGPUSurfaceMetalDelegate.
MTLRenderTargetType flutter::GPUSurfaceMetalDelegate::GetRenderTargetType | ( | ) |
Definition at line 15 of file gpu_surface_metal_delegate.cc.
|
pure virtual |
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
.
Implemented in flutter::testing::TestGPUSurfaceMetalDelegate.
|
pure virtual |
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
.
Implemented in flutter::testing::TestGPUSurfaceMetalDelegate.