5#ifndef FLUTTER_IMPELLER_RENDERER_BACKEND_GLES_CONTEXT_GLES_H_
6#define FLUTTER_IMPELLER_RENDERER_BACKEND_GLES_CONTEXT_GLES_H_
24 public std::enable_shared_from_this<ContextGLES> {
26 static std::shared_ptr<ContextGLES>
Create(
27 std::unique_ptr<ProcTableGLES> gl,
28 const std::vector<std::shared_ptr<fml::Mapping>>& shader_libraries,
29 bool enable_gpu_tracing);
40 const std::shared_ptr<ReactorGLES::Worker>& worker);
44 std::shared_ptr<GPUTracerGLES>
GetGPUTracer()
const {
return gpu_tracer_; }
48 std::shared_ptr<ShaderLibraryGLES> shader_library_;
49 std::shared_ptr<PipelineLibraryGLES> pipeline_library_;
50 std::shared_ptr<SamplerLibraryGLES> sampler_library_;
51 std::shared_ptr<AllocatorGLES> resource_allocator_;
52 std::shared_ptr<CommandQueue> command_queue_;
53 std::shared_ptr<GPUTracerGLES> gpu_tracer_;
58 std::shared_ptr<const Capabilities> device_capabilities_;
59 bool is_valid_ =
false;
62 std::unique_ptr<ProcTableGLES> gl,
63 const std::vector<std::shared_ptr<fml::Mapping>>& shader_libraries,
64 bool enable_gpu_tracing);
88 const std::shared_ptr<const Capabilities>&
GetCapabilities()
const override;
static sk_sp< Effect > Create()
std::string DescribeGpuModel() const override
const ReactorGLES::Ref & GetReactor() const
std::shared_ptr< CommandBuffer > CreateCommandBuffer() const override
Create a new command buffer. Command buffers can be used to encode graphics, blit,...
std::shared_ptr< Allocator > GetResourceAllocator() const override
Returns the allocator used to create textures and buffers on the device.
std::shared_ptr< GPUTracerGLES > GetGPUTracer() const
BackendType GetBackendType() const override
Get the graphics backend of an Impeller context.
std::shared_ptr< CommandQueue > GetCommandQueue() const override
Return the graphics queue for submitting command buffers.
bool RemoveReactorWorker(ReactorGLES::WorkerID id)
bool IsValid() const override
Determines if a context is valid. If the caller ever receives an invalid context, they must discard i...
void Shutdown() override
Force all pending asynchronous work to finish. This is achieved by deleting all owned concurrent mess...
std::shared_ptr< ShaderLibrary > GetShaderLibrary() const override
Returns the library of shaders used to specify the programmable stages of a pipeline.
std::shared_ptr< SamplerLibrary > GetSamplerLibrary() const override
Returns the library of combined image samplers used in shaders.
std::shared_ptr< PipelineLibrary > GetPipelineLibrary() const override
Returns the library of pipelines used by render or compute commands.
std::optional< ReactorGLES::WorkerID > AddReactorWorker(const std::shared_ptr< ReactorGLES::Worker > &worker)
const std::shared_ptr< const Capabilities > & GetCapabilities() const override
Get the capabilities of Impeller context. All optionally supported feature of the platform,...
To do anything rendering related with Impeller, you need a context.
std::shared_ptr< ReactorGLES > Ref