Flutter Engine Uber Docs
Docs for the entire Flutter Engine repo.
 
Loading...
Searching...
No Matches
context.cc File Reference

Go to the source code of this file.

Namespaces

namespace  flutter
 
namespace  flutter::gpu
 

Functions

bool flutter::gpu::SupportsNormalOffscreenMSAA (const impeller::Context &context)
 
 flutter::gpu::IMPLEMENT_WRAPPERTYPEINFO (flutter_gpu, Context)
 
Dart_Handle InternalFlutterGpu_Context_InitializeDefault (Dart_Handle wrapper)
 
int InternalFlutterGpu_Context_GetDefaultColorFormat (flutter::gpu::Context *wrapper)
 
int InternalFlutterGpu_Context_GetDefaultStencilFormat (flutter::gpu::Context *wrapper)
 
int InternalFlutterGpu_Context_GetDefaultDepthStencilFormat (flutter::gpu::Context *wrapper)
 
int InternalFlutterGpu_Context_GetMinimumUniformByteAlignment (flutter::gpu::Context *wrapper)
 
bool InternalFlutterGpu_Context_GetSupportsOffscreenMSAA (flutter::gpu::Context *wrapper)
 

Function Documentation

◆ InternalFlutterGpu_Context_GetDefaultColorFormat()

int InternalFlutterGpu_Context_GetDefaultColorFormat ( flutter::gpu::Context wrapper)
extern

Definition at line 112 of file context.cc.

113 {
114 return static_cast<int>(flutter::gpu::FromImpellerPixelFormat(
115 wrapper->GetContext().GetCapabilities()->GetDefaultColorFormat()));
116}
impeller::Context & GetContext()
Definition context.cc:84
virtual const std::shared_ptr< const Capabilities > & GetCapabilities() const =0
Get the capabilities of Impeller context. All optionally supported feature of the platform,...
constexpr FlutterGPUPixelFormat FromImpellerPixelFormat(impeller::PixelFormat value)
Definition formats.h:102

References flutter::gpu::FromImpellerPixelFormat(), impeller::Context::GetCapabilities(), and flutter::gpu::Context::GetContext().

◆ InternalFlutterGpu_Context_GetDefaultDepthStencilFormat()

int InternalFlutterGpu_Context_GetDefaultDepthStencilFormat ( flutter::gpu::Context wrapper)
extern

Definition at line 124 of file context.cc.

125 {
126 return static_cast<int>(flutter::gpu::FromImpellerPixelFormat(
127 wrapper->GetContext().GetCapabilities()->GetDefaultDepthStencilFormat()));
128}

References flutter::gpu::FromImpellerPixelFormat(), impeller::Context::GetCapabilities(), and flutter::gpu::Context::GetContext().

◆ InternalFlutterGpu_Context_GetDefaultStencilFormat()

int InternalFlutterGpu_Context_GetDefaultStencilFormat ( flutter::gpu::Context wrapper)
extern

Definition at line 118 of file context.cc.

119 {
120 return static_cast<int>(flutter::gpu::FromImpellerPixelFormat(
121 wrapper->GetContext().GetCapabilities()->GetDefaultStencilFormat()));
122}

References flutter::gpu::FromImpellerPixelFormat(), impeller::Context::GetCapabilities(), and flutter::gpu::Context::GetContext().

◆ InternalFlutterGpu_Context_GetMinimumUniformByteAlignment()

int InternalFlutterGpu_Context_GetMinimumUniformByteAlignment ( flutter::gpu::Context wrapper)
extern

Definition at line 130 of file context.cc.

131 {
132 return wrapper->GetContext().GetCapabilities()->GetMinimumUniformAlignment();
133}

References impeller::Context::GetCapabilities(), and flutter::gpu::Context::GetContext().

◆ InternalFlutterGpu_Context_GetSupportsOffscreenMSAA()

bool InternalFlutterGpu_Context_GetSupportsOffscreenMSAA ( flutter::gpu::Context wrapper)
extern

Definition at line 135 of file context.cc.

136 {
138}
bool SupportsNormalOffscreenMSAA(const impeller::Context &context)
Definition context.cc:18

References flutter::gpu::Context::GetContext(), and flutter::gpu::SupportsNormalOffscreenMSAA().

◆ InternalFlutterGpu_Context_InitializeDefault()

Dart_Handle InternalFlutterGpu_Context_InitializeDefault ( Dart_Handle  wrapper)

Exports

Definition at line 99 of file context.cc.

99 {
100 std::optional<std::string> out_error;
101 auto impeller_context = flutter::gpu::Context::GetDefaultContext(out_error);
102 if (out_error.has_value()) {
103 return tonic::ToDart(out_error.value());
104 }
105
106 auto res = fml::MakeRefCounted<flutter::gpu::Context>(impeller_context);
107 res->AssociateWithDartWrapper(wrapper);
108
109 return Dart_Null();
110}
static std::shared_ptr< impeller::Context > GetDefaultContext(std::optional< std::string > &out_error)
Definition context.cc:36
Dart_Handle ToDart(const T &object)

References flutter::gpu::Context::GetDefaultContext(), and tonic::ToDart().