Flutter Engine Uber Docs
Docs for the entire Flutter Engine repo.
 
Loading...
Searching...
No Matches
context.h File Reference
#include "dart_api.h"
#include "flutter/lib/gpu/export.h"
#include "flutter/lib/ui/dart_wrapper.h"
#include "impeller/renderer/context.h"

Go to the source code of this file.

Classes

class  flutter::gpu::Context
 

Namespaces

namespace  flutter
 
namespace  flutter::gpu
 

Functions

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

Function Documentation

◆ InternalFlutterGpu_Context_GetBackendType()

FLUTTER_GPU_EXPORT int InternalFlutterGpu_Context_GetBackendType ( flutter::gpu::Context wrapper)
extern

◆ InternalFlutterGpu_Context_GetDefaultColorFormat()

FLUTTER_GPU_EXPORT 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()

FLUTTER_GPU_EXPORT 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()

FLUTTER_GPU_EXPORT 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()

FLUTTER_GPU_EXPORT 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()

FLUTTER_GPU_EXPORT 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()

FLUTTER_GPU_EXPORT Dart_Handle InternalFlutterGpu_Context_InitializeDefault ( Dart_Handle  wrapper)
extern

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().