Flutter Impeller
impeller::CapabilitiesBuilder Class Reference

#include <capabilities.h>

Public Member Functions

 CapabilitiesBuilder ()
 
 ~CapabilitiesBuilder ()
 
CapabilitiesBuilderSetSupportsOffscreenMSAA (bool value)
 
CapabilitiesBuilderSetSupportsSSBO (bool value)
 
CapabilitiesBuilderSetSupportsTextureToTextureBlits (bool value)
 
CapabilitiesBuilderSetSupportsFramebufferFetch (bool value)
 
CapabilitiesBuilderSetSupportsCompute (bool value)
 
CapabilitiesBuilderSetSupportsComputeSubgroups (bool value)
 
CapabilitiesBuilderSetSupportsReadFromResolve (bool value)
 
CapabilitiesBuilderSetDefaultColorFormat (PixelFormat value)
 
CapabilitiesBuilderSetDefaultStencilFormat (PixelFormat value)
 
CapabilitiesBuilderSetDefaultDepthStencilFormat (PixelFormat value)
 
CapabilitiesBuilderSetSupportsDecalSamplerAddressMode (bool value)
 
CapabilitiesBuilderSetSupportsDeviceTransientTextures (bool value)
 
CapabilitiesBuilderSetSupportsExtendedRangeFormats (bool value)
 
CapabilitiesBuilderSetDefaultGlyphAtlasFormat (PixelFormat value)
 
CapabilitiesBuilderSetSupportsTriangleFan (bool value)
 
CapabilitiesBuilderSetMaximumRenderPassAttachmentSize (ISize size)
 
std::unique_ptr< CapabilitiesBuild ()
 

Detailed Description

Definition at line 134 of file capabilities.h.

Constructor & Destructor Documentation

◆ CapabilitiesBuilder()

impeller::CapabilitiesBuilder::CapabilitiesBuilder ( )
default

◆ ~CapabilitiesBuilder()

impeller::CapabilitiesBuilder::~CapabilitiesBuilder ( )
default

Member Function Documentation

◆ Build()

std::unique_ptr< Capabilities > impeller::CapabilitiesBuilder::Build ( )

Definition at line 255 of file capabilities.cc.

255  {
256  // NOLINTNEXTLINE(clang-analyzer-cplusplus.NewDeleteLeaks)
257  return std::unique_ptr<StandardCapabilities>(new StandardCapabilities( //
258  supports_offscreen_msaa_, //
259  supports_ssbo_, //
260  supports_texture_to_texture_blits_, //
261  supports_framebuffer_fetch_, //
262  supports_compute_, //
263  supports_compute_subgroups_, //
264  supports_read_from_resolve_, //
265  supports_decal_sampler_address_mode_, //
266  supports_device_transient_textures_, //
267  supports_triangle_fan_, //
268  supports_extended_range_formats_, //
269  default_color_format_.value_or(PixelFormat::kUnknown), //
270  default_stencil_format_.value_or(PixelFormat::kUnknown), //
271  default_depth_stencil_format_.value_or(PixelFormat::kUnknown), //
272  default_glyph_atlas_format_.value_or(PixelFormat::kUnknown), //
273  default_maximum_render_pass_attachment_size_.value_or(ISize{1, 1}) //
274  ));
275 }
ISize64 ISize
Definition: size.h:162

References impeller::kUnknown.

Referenced by impeller::InferMetalCapabilities(), and impeller::testing::TEST().

◆ SetDefaultColorFormat()

CapabilitiesBuilder & impeller::CapabilitiesBuilder::SetDefaultColorFormat ( PixelFormat  value)

Definition at line 196 of file capabilities.cc.

197  {
198  default_color_format_ = value;
199  return *this;
200 }
int32_t value

References value.

Referenced by impeller::InferMetalCapabilities(), and impeller::testing::TEST().

◆ SetDefaultDepthStencilFormat()

CapabilitiesBuilder & impeller::CapabilitiesBuilder::SetDefaultDepthStencilFormat ( PixelFormat  value)

Definition at line 208 of file capabilities.cc.

209  {
210  default_depth_stencil_format_ = value;
211  return *this;
212 }

References value.

Referenced by impeller::InferMetalCapabilities(), and impeller::testing::TEST().

◆ SetDefaultGlyphAtlasFormat()

CapabilitiesBuilder & impeller::CapabilitiesBuilder::SetDefaultGlyphAtlasFormat ( PixelFormat  value)

Definition at line 232 of file capabilities.cc.

233  {
234  default_glyph_atlas_format_ = value;
235  return *this;
236 }

References value.

Referenced by impeller::InferMetalCapabilities(), and impeller::testing::TEST().

◆ SetDefaultStencilFormat()

CapabilitiesBuilder & impeller::CapabilitiesBuilder::SetDefaultStencilFormat ( PixelFormat  value)

Definition at line 202 of file capabilities.cc.

203  {
204  default_stencil_format_ = value;
205  return *this;
206 }

References value.

Referenced by impeller::InferMetalCapabilities(), and impeller::testing::TEST().

◆ SetMaximumRenderPassAttachmentSize()

CapabilitiesBuilder & impeller::CapabilitiesBuilder::SetMaximumRenderPassAttachmentSize ( ISize  size)

Definition at line 243 of file capabilities.cc.

244  {
245  default_maximum_render_pass_attachment_size_ = size;
246  return *this;
247 }

Referenced by impeller::InferMetalCapabilities(), and impeller::testing::TEST().

◆ SetSupportsCompute()

CapabilitiesBuilder & impeller::CapabilitiesBuilder::SetSupportsCompute ( bool  value)

Definition at line 185 of file capabilities.cc.

185  {
186  supports_compute_ = value;
187  return *this;
188 }

References value.

Referenced by impeller::InferMetalCapabilities().

◆ SetSupportsComputeSubgroups()

CapabilitiesBuilder & impeller::CapabilitiesBuilder::SetSupportsComputeSubgroups ( bool  value)

Definition at line 190 of file capabilities.cc.

191  {
192  supports_compute_subgroups_ = value;
193  return *this;
194 }

References value.

Referenced by impeller::InferMetalCapabilities().

◆ SetSupportsDecalSamplerAddressMode()

CapabilitiesBuilder & impeller::CapabilitiesBuilder::SetSupportsDecalSamplerAddressMode ( bool  value)

Definition at line 220 of file capabilities.cc.

221  {
222  supports_decal_sampler_address_mode_ = value;
223  return *this;
224 }

References value.

Referenced by impeller::InferMetalCapabilities().

◆ SetSupportsDeviceTransientTextures()

CapabilitiesBuilder & impeller::CapabilitiesBuilder::SetSupportsDeviceTransientTextures ( bool  value)

Definition at line 226 of file capabilities.cc.

227  {
228  supports_device_transient_textures_ = value;
229  return *this;
230 }

References value.

Referenced by impeller::InferMetalCapabilities().

◆ SetSupportsExtendedRangeFormats()

CapabilitiesBuilder & impeller::CapabilitiesBuilder::SetSupportsExtendedRangeFormats ( bool  value)

Definition at line 249 of file capabilities.cc.

250  {
251  supports_extended_range_formats_ = value;
252  return *this;
253 }

References value.

Referenced by impeller::InferMetalCapabilities().

◆ SetSupportsFramebufferFetch()

CapabilitiesBuilder & impeller::CapabilitiesBuilder::SetSupportsFramebufferFetch ( bool  value)

Definition at line 179 of file capabilities.cc.

180  {
181  supports_framebuffer_fetch_ = value;
182  return *this;
183 }

References value.

Referenced by impeller::InferMetalCapabilities().

◆ SetSupportsOffscreenMSAA()

CapabilitiesBuilder & impeller::CapabilitiesBuilder::SetSupportsOffscreenMSAA ( bool  value)

Definition at line 163 of file capabilities.cc.

163  {
164  supports_offscreen_msaa_ = value;
165  return *this;
166 }

References value.

Referenced by impeller::InferMetalCapabilities().

◆ SetSupportsReadFromResolve()

CapabilitiesBuilder & impeller::CapabilitiesBuilder::SetSupportsReadFromResolve ( bool  value)

Definition at line 214 of file capabilities.cc.

215  {
216  supports_read_from_resolve_ = read_from_resolve;
217  return *this;
218 }

Referenced by impeller::InferMetalCapabilities().

◆ SetSupportsSSBO()

CapabilitiesBuilder & impeller::CapabilitiesBuilder::SetSupportsSSBO ( bool  value)

Definition at line 168 of file capabilities.cc.

168  {
169  supports_ssbo_ = value;
170  return *this;
171 }

References value.

Referenced by impeller::InferMetalCapabilities().

◆ SetSupportsTextureToTextureBlits()

CapabilitiesBuilder & impeller::CapabilitiesBuilder::SetSupportsTextureToTextureBlits ( bool  value)

Definition at line 173 of file capabilities.cc.

174  {
175  supports_texture_to_texture_blits_ = value;
176  return *this;
177 }

References value.

Referenced by impeller::InferMetalCapabilities().

◆ SetSupportsTriangleFan()

CapabilitiesBuilder & impeller::CapabilitiesBuilder::SetSupportsTriangleFan ( bool  value)

Definition at line 238 of file capabilities.cc.

238  {
239  supports_triangle_fan_ = value;
240  return *this;
241 }

References value.

Referenced by impeller::InferMetalCapabilities().


The documentation for this class was generated from the following files: