| Flutter Impeller |

Public Member Functions | Protected Member Functions | List of all members
impeller::interop::Context Class Reference

`#include <context.h>`

Inheritance diagram for impeller::interop::Context:

## Public Member Functions
| ~Context () override
| Context (const Context &)=delete
Context & | operator= (const Context &)=delete
bool | IsValid () const
std::shared_ptr< impeller::Context > | GetContext () const
AiksContext & | GetAiksContext ()
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
ObjectBase & | operator= (const ObjectBase &)=delete
ObjectBase & | operator= (ObjectBase &&)=delete
void | Retain ()
void | Release ()
uint64_t | GetRefCountForTests () const

## Protected Member Functions
| Context (std::shared_ptr< impeller::Context > context)

## 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)
Static Public Member Functions inherited from impeller::interop::ObjectBase
static void | SafeRetain (void *ptr)
static void | SafeRelease (void *ptr)

## Detailed Description

Definition at line 15 of file context.h.

## Constructor & Destructor Documentation

## ◆ ~Context()

impeller::interop::Context::~Context | ( |  | ) |
| override default

## ◆ Context() [1/2]

impeller::interop::Context::Context | ( | const Context & |  | ) |
| delete

## ◆ Context() [2/2]

impeller::interop::Context::Context | ( | std::shared_ptr< impeller::Context > | context | ) |
| explicit protected

Definition at line 11 of file context.cc.

12 : context_(std::move(context), TypographerContextSkia::Make()) {}
impeller::TypographerContextSkia::Make
static std::shared_ptr< TypographerContext > Make()
Definition: typographer_context_skia.cc:76

## Member Function Documentation

## ◆ GetAiksContext()

AiksContext & impeller::interop::Context::GetAiksContext | ( |  | ) |

Definition at line 24 of file context.cc.

24 {
25 return context_;
26 }

## ◆ GetContext()

std::shared_ptr< impeller::Context > impeller::interop::Context::GetContext | ( |  | ) | const

Definition at line 20 of file context.cc.

20 {
21 return context_.GetContext();
22 }
impeller::AiksContext::GetContext
std::shared_ptr< Context > GetContext() const
Definition: aiks_context.cc:38

References impeller::AiksContext::GetContext().

Referenced by impeller::interop::ContextVK::GetInfo(), IsBackend(), impeller::interop::ColorSource::MakeFragmentProgram(), impeller::interop::ImageFilter::MakeFragmentProgram(), impeller::interop::SwapchainVK::SwapchainVK(), and impeller::interop::Texture::Texture().

## ◆ IsBackend()

bool impeller::interop::Context::IsBackend | ( | impeller::Context::BackendType | type | ) | const

Definition at line 28 of file context.cc.

28 {
29 if (!IsValid()) {
30 return false;
31 }
32 return GetContext()->GetBackendType() == type;
33 }
type
GLenum type
Definition: blit_command_gles.cc:151
impeller::interop::Context::GetContext
std::shared_ptr< impeller::Context > GetContext() const
Definition: context.cc:20
impeller::interop::Context::IsValid
bool IsValid() const
Definition: context.cc:16

References GetContext(), IsValid(), and type.

Referenced by IsGL(), IsMetal(), and IsVulkan().

## ◆ IsGL()

bool impeller::interop::Context::IsGL | ( |  | ) | const

Definition at line 35 of file context.cc.

35 {
36 return IsBackend(impeller::Context::BackendType::kOpenGLES);
37 }
impeller::Context::BackendType::kOpenGLES
@ kOpenGLES
impeller::interop::Context::IsBackend
bool IsBackend(impeller::Context::BackendType type) const
Definition: context.cc:28

References IsBackend(), and impeller::Context::kOpenGLES.

## ◆ IsMetal()

bool impeller::interop::Context::IsMetal | ( |  | ) | const

Definition at line 39 of file context.cc.

39 {
40 return IsBackend(impeller::Context::BackendType::kMetal);
41 }
impeller::Context::BackendType::kMetal
@ kMetal

References IsBackend(), and impeller::Context::kMetal.

## ◆ IsValid()

bool impeller::interop::Context::IsValid | ( |  | ) | const

Definition at line 16 of file context.cc.

16 {
17 return context_.IsValid();
18 }
impeller::AiksContext::IsValid
bool IsValid() const
Definition: aiks_context.cc:34

References impeller::AiksContext::IsValid().

Referenced by impeller::interop::ContextVK::GetInfo(), IsBackend(), and impeller::interop::Texture::Texture().

## ◆ IsVulkan()

bool impeller::interop::Context::IsVulkan | ( |  | ) | const

Definition at line 43 of file context.cc.

43 {
44 return IsBackend(impeller::Context::BackendType::kVulkan);
45 }
impeller::Context::BackendType::kVulkan
@ kVulkan

References IsBackend(), and impeller::Context::kVulkan.

Referenced by impeller::interop::SwapchainVK::SwapchainVK().

## ◆ operator=()

Context& impeller::interop::Context::operator= | ( | const Context & |  | ) |
| delete

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

- impeller/toolkit/interop/context.h
- impeller/toolkit/interop/context.cc