Flutter Engine
 
Loading...
Searching...
No Matches
flutter::testing::TestMetalSurfaceImpl Class Reference

#include <test_metal_surface_impl.h>

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

Public Member Functions

 TestMetalSurfaceImpl (const TestMetalContext &test_metal_context, const DlISize &surface_size)
 
 TestMetalSurfaceImpl (const TestMetalContext &test_metal_context, int64_t texture_id, const DlISize &surface_size)
 
 ~TestMetalSurfaceImpl () override
 
- Public Member Functions inherited from flutter::testing::TestMetalSurface
virtual ~TestMetalSurface ()
 

Additional Inherited Members

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

Detailed Description

Definition at line 16 of file test_metal_surface_impl.h.

Constructor & Destructor Documentation

◆ TestMetalSurfaceImpl() [1/2]

flutter::testing::TestMetalSurfaceImpl::TestMetalSurfaceImpl ( const TestMetalContext test_metal_context,
const DlISize surface_size 
)

Definition at line 57 of file test_metal_surface_impl.mm.

59 : test_metal_context_(test_metal_context) {
60 if (surface_size.IsEmpty()) {
61 FML_LOG(ERROR) << "Size of test Metal surface was empty.";
62 return;
63 }
64 TestMetalContext::TextureInfo texture_info =
65 const_cast<TestMetalContext&>(test_metal_context_).CreateMetalTexture(surface_size);
66 Init(texture_info, surface_size);
67}
#define FML_LOG(severity)
Definition logging.h:101

References FML_LOG, and impeller::TSize< T >::IsEmpty().

◆ TestMetalSurfaceImpl() [2/2]

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

Definition at line 48 of file test_metal_surface_impl.mm.

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

References texture_id.

◆ ~TestMetalSurfaceImpl()

flutter::testing::TestMetalSurfaceImpl::~TestMetalSurfaceImpl ( )
overridedefault

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