 |
Flutter Impeller
|
|
Go to the documentation of this file.
5 #ifndef FLUTTER_IMPELLER_RENDERER_CAPABILITIES_H_
6 #define FLUTTER_IMPELLER_RENDERER_CAPABILITIES_H_
10 #include "flutter/fml/macros.h"
156 std::unique_ptr<Capabilities>
Build();
159 bool supports_offscreen_msaa_ =
false;
160 bool supports_ssbo_ =
false;
161 bool supports_buffer_to_texture_blits_ =
false;
162 bool supports_texture_to_texture_blits_ =
false;
163 bool supports_framebuffer_fetch_ =
false;
164 bool supports_compute_ =
false;
165 bool supports_compute_subgroups_ =
false;
166 bool supports_read_from_resolve_ =
false;
167 bool supports_decal_sampler_address_mode_ =
false;
168 bool supports_device_transient_textures_ =
false;
169 std::optional<PixelFormat> default_color_format_ = std::nullopt;
170 std::optional<PixelFormat> default_stencil_format_ = std::nullopt;
171 std::optional<PixelFormat> default_depth_stencil_format_ = std::nullopt;
172 std::optional<PixelFormat> default_glyph_atlas_format_ = std::nullopt;
181 #endif // FLUTTER_IMPELLER_RENDERER_CAPABILITIES_H_
std::unique_ptr< Capabilities > Build()
virtual bool SupportsReadFromResolve() const =0
Whether the context backend supports binding the current RenderPass attachments. This is supported if...
virtual bool SupportsOffscreenMSAA() const =0
Whether the context backend supports attaching offscreen MSAA color/stencil textures.
virtual bool SupportsDeviceTransientTextures() const =0
Whether the context backend supports allocating StorageMode::kDeviceTransient (aka "memoryless") text...
PixelFormat
The Pixel formats supported by Impeller. The naming convention denotes the usage of the component,...
CapabilitiesBuilder & SetSupportsSSBO(bool value)
CapabilitiesBuilder & SetSupportsCompute(bool value)
CapabilitiesBuilder & SetDefaultDepthStencilFormat(PixelFormat value)
CapabilitiesBuilder & SetDefaultGlyphAtlasFormat(PixelFormat value)
virtual bool SupportsImplicitResolvingMSAA() const =0
Whether the context backend supports multisampled rendering to the on-screen surface without requirin...
CapabilitiesBuilder & SetSupportsFramebufferFetch(bool value)
CapabilitiesBuilder & SetSupportsComputeSubgroups(bool value)
virtual bool SupportsBufferToTextureBlits() const =0
Whether the context backend supports blitting from a given DeviceBuffer view to a texture region (via...
CapabilitiesBuilder & SetSupportsTextureToTextureBlits(bool value)
Capabilities & operator=(const Capabilities &)=delete
virtual PixelFormat GetDefaultGlyphAtlasFormat() const =0
Returns the default pixel format for the alpha bitmap glyph atlas.
virtual PixelFormat GetDefaultStencilFormat() const =0
Returns a supported PixelFormat for textures that store stencil information. May include a depth chan...
CapabilitiesBuilder & SetDefaultColorFormat(PixelFormat value)
CapabilitiesBuilder & SetDefaultStencilFormat(PixelFormat value)
CapabilitiesBuilder & SetSupportsBufferToTextureBlits(bool value)
CapabilitiesBuilder & SetSupportsDecalSamplerAddressMode(bool value)
virtual bool SupportsComputeSubgroups() const =0
Whether the context backend supports configuring ComputePass command subgroups.
CapabilitiesBuilder & SetSupportsDeviceTransientTextures(bool value)
virtual PixelFormat GetDefaultColorFormat() const =0
Returns a supported PixelFormat for textures that store 4-channel colors (red/green/blue/alpha).
virtual bool SupportsDecalSamplerAddressMode() const =0
Whether the context backend supports SamplerAddressMode::Decal.
virtual bool SupportsFramebufferFetch() const =0
Whether the context backend is able to support pipelines with shaders that read from the framebuffer ...
virtual bool SupportsSSBO() const =0
Whether the context backend supports binding Shader Storage Buffer Objects (SSBOs) to pipelines.
CapabilitiesBuilder & SetSupportsReadFromResolve(bool value)
virtual bool SupportsTextureToTextureBlits() const =0
Whether the context backend supports blitting from one texture region to another texture region (via ...
CapabilitiesBuilder & SetSupportsOffscreenMSAA(bool value)
virtual PixelFormat GetDefaultDepthStencilFormat() const =0
Returns a supported PixelFormat for textures that store both a stencil and depth component....
virtual bool SupportsCompute() const =0
Whether the context backend supports ComputePass.