Flutter Engine
 
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 105 of file context.cc.

106 {
107 return static_cast<int>(flutter::gpu::FromImpellerPixelFormat(
108 wrapper->GetContext().GetCapabilities()->GetDefaultColorFormat()));
109}
impeller::Context & GetContext()
Definition context.cc:77
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 117 of file context.cc.

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

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 111 of file context.cc.

112 {
113 return static_cast<int>(flutter::gpu::FromImpellerPixelFormat(
114 wrapper->GetContext().GetCapabilities()->GetDefaultStencilFormat()));
115}

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 123 of file context.cc.

124 {
125 return wrapper->GetContext().GetCapabilities()->GetMinimumUniformAlignment();
126}

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

◆ InternalFlutterGpu_Context_GetSupportsOffscreenMSAA()

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

Definition at line 128 of file context.cc.

129 {
131}
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 92 of file context.cc.

92 {
93 std::optional<std::string> out_error;
94 auto impeller_context = flutter::gpu::Context::GetDefaultContext(out_error);
95 if (out_error.has_value()) {
96 return tonic::ToDart(out_error.value());
97 }
98
99 auto res = fml::MakeRefCounted<flutter::gpu::Context>(impeller_context);
100 res->AssociateWithDartWrapper(wrapper);
101
102 return Dart_Null();
103}
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().