Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
flutter::TestMetalSurfaceImpl Class Reference

#include <test_metal_surface_impl.h>

Inheritance diagram for flutter::TestMetalSurfaceImpl:
flutter::TestMetalSurface

Public Member Functions

 TestMetalSurfaceImpl (const TestMetalContext &test_metal_context, const SkISize &surface_size)
 
 TestMetalSurfaceImpl (const TestMetalContext &test_metal_context, int64_t texture_id, const SkISize &surface_size)
 
 ~TestMetalSurfaceImpl () override
 
- Public Member Functions inherited from flutter::TestMetalSurface
virtual ~TestMetalSurface ()
 
virtual bool IsValid () const
 
virtual sk_sp< GrDirectContextGetGrContext () const
 
virtual sk_sp< SkSurfaceGetSurface () const
 
virtual sk_sp< SkImageGetRasterSurfaceSnapshot ()
 
virtual TestMetalContext::TextureInfo GetTextureInfo ()
 

Additional Inherited Members

- Static Public Member Functions inherited from flutter::TestMetalSurface
static bool PlatformSupportsMetal ()
 
static std::unique_ptr< TestMetalSurfaceCreate (const TestMetalContext &test_metal_context, SkISize surface_size=SkISize::MakeEmpty())
 
static std::unique_ptr< TestMetalSurfaceCreate (const TestMetalContext &test_metal_context, int64_t texture_id, SkISize surface_size=SkISize::MakeEmpty())
 
- Protected Member Functions inherited from flutter::TestMetalSurface
 TestMetalSurface ()
 

Detailed Description

Definition at line 16 of file test_metal_surface_impl.h.

Constructor & Destructor Documentation

◆ TestMetalSurfaceImpl() [1/2]

flutter::TestMetalSurfaceImpl::TestMetalSurfaceImpl ( const TestMetalContext test_metal_context,
const SkISize surface_size 
)

Definition at line 58 of file test_metal_surface_impl.mm.

60 : test_metal_context_(test_metal_context) {
61 if (surface_size.isEmpty()) {
62 FML_LOG(ERROR) << "Size of test Metal surface was empty.";
63 return;
64 }
65 TestMetalContext::TextureInfo texture_info =
66 const_cast<TestMetalContext&>(test_metal_context_).CreateMetalTexture(surface_size);
67 Init(texture_info, surface_size);
68}
#define FML_LOG(severity)
Definition: logging.h:82
bool isEmpty() const
Definition: SkSize.h:31
#define ERROR(message)
Definition: elf_loader.cc:260

◆ TestMetalSurfaceImpl() [2/2]

flutter::TestMetalSurfaceImpl::TestMetalSurfaceImpl ( const TestMetalContext test_metal_context,
int64_t  texture_id,
const SkISize surface_size 
)

Definition at line 49 of file test_metal_surface_impl.mm.

52 : test_metal_context_(test_metal_context) {
53 TestMetalContext::TextureInfo texture_info =
54 const_cast<TestMetalContext&>(test_metal_context_).GetTextureInfo(texture_id);
55 Init(texture_info, surface_size);
56}
int64_t texture_id

◆ ~TestMetalSurfaceImpl()

flutter::TestMetalSurfaceImpl::~TestMetalSurfaceImpl ( )
overridedefault

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