Flutter Impeller
impeller::interop::ContextMTL Class Referencefinal

#include <context_mtl.h>

Inheritance diagram for impeller::interop::ContextMTL:
impeller::interop::Context impeller::interop::Object< Context, IMPELLER_INTERNAL_HANDLE_NAME(ImpellerContext)> impeller::interop::ObjectBase

Public Member Functions

 ~ContextMTL () override
 
 ContextMTL (const ContextMTL &)=delete
 
ContextMTLoperator= (const ContextMTL &)=delete
 
const std::shared_ptr< SwapchainTransientsMTL > & GetSwapchainTransients () const
 
- Public Member Functions inherited from impeller::interop::Context
 ~Context () override
 
 Context (const Context &)=delete
 
Contextoperator= (const Context &)=delete
 
bool IsValid () const
 
std::shared_ptr< impeller::ContextGetContext () const
 
AiksContextGetAiksContext ()
 
bool IsBackend (impeller::Context::BackendType type) const
 
bool IsGL () const
 
bool IsMetal () const
 
bool IsVulkan () const
 
- Public Member Functions inherited from impeller::interop::ObjectBase
 ObjectBase ()=default
 
virtual ~ObjectBase ()=default
 
 ObjectBase (const ObjectBase &)=delete
 
 ObjectBase (ObjectBase &&)=delete
 
ObjectBaseoperator= (const ObjectBase &)=delete
 
ObjectBaseoperator= (ObjectBase &&)=delete
 
void Retain ()
 
void Release ()
 
uint64_t GetRefCountForTests () const
 

Static Public Member Functions

static ScopedObject< ContextCreate ()
 
static ScopedObject< ContextCreate (const std::shared_ptr< impeller::Context > &context)
 
- Static Public Member Functions inherited from impeller::interop::ObjectBase
static void SafeRetain (void *ptr)
 
static void SafeRelease (void *ptr)
 

Additional Inherited Members

- Public Types inherited from impeller::interop::Object< Context, IMPELLER_INTERNAL_HANDLE_NAME(ImpellerContext)>
using InteropClass = Context
 
using InteropCSibling = IMPELLER_INTERNAL_HANDLE_NAME(ImpellerContext)
 
- Protected Member Functions inherited from impeller::interop::Context
 Context (std::shared_ptr< impeller::Context > context)
 

Detailed Description

Definition at line 13 of file context_mtl.h.

Constructor & Destructor Documentation

◆ ~ContextMTL()

impeller::interop::ContextMTL::~ContextMTL ( )
overridedefault

◆ ContextMTL()

impeller::interop::ContextMTL::ContextMTL ( const ContextMTL )
delete

Referenced by Create().

Member Function Documentation

◆ Create() [1/2]

ScopedObject< Context > impeller::interop::ContextMTL::Create ( )
static

Definition at line 29 of file context_mtl.mm.

29  {
30  auto impeller_context =
32  std::make_shared<fml::SyncSwitch>(), //
33  "Impeller" //
34  );
35  if (!impeller_context) {
36  VALIDATION_LOG << "Could not create Impeller context.";
37  return {};
38  }
39  return Create(std::move(impeller_context));
40 }
static std::shared_ptr< ContextMTL > Create(const Flags &flags, const std::vector< std::string > &shader_library_paths, std::shared_ptr< const fml::SyncSwitch > is_gpu_disabled_sync_switch)
Definition: context_mtl.mm:229
static ScopedObject< Context > Create()
Definition: context_mtl.mm:29
static std::vector< std::shared_ptr< fml::Mapping > > CreateShaderLibraryMappings()
Definition: context_mtl.mm:17
#define VALIDATION_LOG
Definition: validation.h:91

References impeller::ContextMTL::Create(), impeller::interop::CreateShaderLibraryMappings(), and VALIDATION_LOG.

Referenced by impeller::interop::testing::CreateSharedContext(), and impeller::interop::ImpellerContextCreateMetalNew().

◆ Create() [2/2]

ScopedObject< Context > impeller::interop::ContextMTL::Create ( const std::shared_ptr< impeller::Context > &  context)
static

Definition at line 42 of file context_mtl.mm.

43  {
44  // Can't call Create because of private constructor. Adopt the raw pointer
45  // instead.
46  auto context = Adopt<Context>(new ContextMTL(impeller_context));
47  if (!context->IsValid()) {
48  VALIDATION_LOG << " Could not create valid context.";
49  return {};
50  }
51  return context;
52 }
ContextMTL(const ContextMTL &)=delete

References ContextMTL(), and VALIDATION_LOG.

◆ GetSwapchainTransients()

const std::shared_ptr< SwapchainTransientsMTL > & impeller::interop::ContextMTL::GetSwapchainTransients ( ) const

Definition at line 62 of file context_mtl.mm.

62  {
63  return swapchain_transients_;
64 }

◆ operator=()

ContextMTL& impeller::interop::ContextMTL::operator= ( const ContextMTL )
delete

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