Flutter Engine
The Flutter Engine
render_pass.cc
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "flutter/lib/gpu/render_pass.h"
6
7#include "flutter/lib/gpu/formats.h"
8#include "flutter/lib/gpu/render_pipeline.h"
9#include "flutter/lib/gpu/shader.h"
10#include "fml/memory/ref_ptr.h"
19
20namespace flutter {
21namespace gpu {
22
24
26 : vertex_buffer_(
27 impeller::VertexBuffer{.index_type = impeller::IndexType::kNone}){};
28
29RenderPass::~RenderPass() = default;
30
31const std::shared_ptr<const impeller::Context>& RenderPass::GetContext() const {
32 return render_pass_->GetContext();
33}
34
36 return command_;
37}
38
40 return command_;
41}
42
44 return render_target_;
45}
46
48 return render_target_;
49}
50
52 size_t color_attachment_index) {
53 auto color = color_descriptors_.find(color_attachment_index);
54 if (color == color_descriptors_.end()) {
55 return color_descriptors_[color_attachment_index] = {};
56 }
57 return color->second;
58}
59
62 return depth_desc_;
63}
64
66 return vertex_buffer_;
67}
68
70 render_pass_ =
71 command_buffer.GetCommandBuffer()->CreateRenderPass(render_target_);
72 if (!render_pass_) {
73 return false;
74 }
75 command_buffer.AddRenderPass(render_pass_);
76 return true;
77}
78
80 render_pipeline_ = std::move(pipeline);
81}
82
83std::shared_ptr<impeller::Pipeline<impeller::PipelineDescriptor>>
85 // Infer the pipeline layout based on the shape of the RenderTarget.
86 auto pipeline_desc = pipeline_descriptor_;
87 for (const auto& it : render_target_.GetColorAttachments()) {
88 auto& color = GetColorAttachmentDescriptor(it.first);
89 color.format = render_target_.GetRenderTargetPixelFormat();
90 }
91 pipeline_desc.SetColorAttachmentDescriptors(color_descriptors_);
92
93 {
94 auto stencil = render_target_.GetStencilAttachment();
95 if (stencil && impeller::IsStencilWritable(
96 stencil->texture->GetTextureDescriptor().format)) {
97 pipeline_desc.SetStencilPixelFormat(
98 stencil->texture->GetTextureDescriptor().format);
99 pipeline_desc.SetStencilAttachmentDescriptors(stencil_front_desc_,
100 stencil_back_desc_);
101 } else {
102 pipeline_desc.ClearStencilAttachments();
103 }
104 }
105
106 {
107 auto depth = render_target_.GetDepthAttachment();
108 if (depth && impeller::IsDepthWritable(
109 depth->texture->GetTextureDescriptor().format)) {
110 pipeline_desc.SetDepthPixelFormat(
111 depth->texture->GetTextureDescriptor().format);
112 pipeline_desc.SetDepthStencilAttachmentDescriptor(depth_desc_);
113 } else {
114 pipeline_desc.ClearDepthAttachment();
115 }
116 }
117
118 auto& context = *GetContext();
119
120 render_pipeline_->BindToPipelineDescriptor(*context.GetShaderLibrary(),
121 pipeline_desc);
122
123 auto pipeline =
124 context.GetPipelineLibrary()->GetPipeline(pipeline_desc).Get();
125 FML_DCHECK(pipeline) << "Couldn't resolve render pipeline";
126 return pipeline;
127}
128
130 impeller::Command result = command_;
131
132 result.pipeline = GetOrCreatePipeline();
133 result.BindVertices(vertex_buffer_);
134
135 return result;
136}
137
140#ifdef IMPELLER_DEBUG
141 render_pass_->SetCommandLabel(result.label);
142#endif // IMPELLER_DEBUG
143 render_pass_->SetPipeline(result.pipeline);
144 render_pass_->SetStencilReference(result.stencil_reference);
145 render_pass_->SetBaseVertex(result.base_vertex);
146 if (result.viewport.has_value()) {
147 render_pass_->SetViewport(result.viewport.value());
148 }
149 if (result.scissor.has_value()) {
150 render_pass_->SetScissor(result.scissor.value());
151 }
152 render_pass_->SetVertexBuffer(result.vertex_buffer);
153 for (const auto& buffer : result.vertex_bindings.buffers) {
154 render_pass_->BindResource(impeller::ShaderStage::kVertex,
156 buffer.slot, *buffer.view.GetMetadata(),
157 buffer.view.resource);
158 }
159 for (const auto& texture : result.vertex_bindings.sampled_images) {
160 render_pass_->BindResource(impeller::ShaderStage::kVertex,
162 texture.slot, *texture.texture.GetMetadata(),
163 texture.texture.resource, texture.sampler);
164 }
165 for (const auto& buffer : result.fragment_bindings.buffers) {
166 render_pass_->BindResource(impeller::ShaderStage::kFragment,
168 buffer.slot, *buffer.view.GetMetadata(),
169 buffer.view.resource);
170 }
171 for (const auto& texture : result.fragment_bindings.sampled_images) {
172 render_pass_->BindResource(impeller::ShaderStage::kFragment,
174 texture.slot, *texture.texture.GetMetadata(),
175 texture.texture.resource, texture.sampler);
176 }
177 return render_pass_->Draw().ok();
178}
179
180} // namespace gpu
181} // namespace flutter
182
183static impeller::Color ToImpellerColor(uint32_t argb) {
184 return impeller::Color::MakeRGBA8((argb >> 16) & 0xFF, // R
185 (argb >> 8) & 0xFF, // G
186 argb & 0xFF, // B
187 argb >> 24); // A
188}
189
190//----------------------------------------------------------------------------
191/// Exports
192///
193
195 auto res = fml::MakeRefCounted<flutter::gpu::RenderPass>();
196 res->AssociateWithDartWrapper(wrapper);
197}
198
201 int color_attachment_index,
202 int load_action,
203 int store_action,
204 int clear_color,
206 Dart_Handle resolve_texture_wrapper) {
208 desc.load_action = flutter::gpu::ToImpellerLoadAction(load_action);
209 desc.store_action = flutter::gpu::ToImpellerStoreAction(store_action);
210 desc.clear_color = ToImpellerColor(static_cast<uint32_t>(clear_color));
211 desc.texture = texture->GetTexture();
212 if (!Dart_IsNull(resolve_texture_wrapper)) {
213 flutter::gpu::Texture* resolve_texture =
215 resolve_texture_wrapper);
216 desc.resolve_texture = resolve_texture->GetTexture();
217 }
218 wrapper->GetRenderTarget().SetColorAttachment(desc, color_attachment_index);
219 return Dart_Null();
220}
221
224 int depth_load_action,
225 int depth_store_action,
226 float depth_clear_value,
227 int stencil_load_action,
228 int stencil_store_action,
229 int stencil_clear_value,
231 {
233 desc.load_action = flutter::gpu::ToImpellerLoadAction(depth_load_action);
234 desc.store_action = flutter::gpu::ToImpellerStoreAction(depth_store_action);
235 desc.clear_depth = depth_clear_value;
236 desc.texture = texture->GetTexture();
238 }
239 {
241 desc.load_action = flutter::gpu::ToImpellerLoadAction(stencil_load_action);
242 desc.store_action =
243 flutter::gpu::ToImpellerStoreAction(stencil_store_action);
244 desc.clear_stencil = stencil_clear_value;
245 desc.texture = texture->GetTexture();
247 }
248
249 return Dart_Null();
250}
251
254 flutter::gpu::CommandBuffer* command_buffer) {
255 if (!wrapper->Begin(*command_buffer)) {
256 return tonic::ToDart("Failed to begin RenderPass");
257 }
258 return Dart_Null();
259}
260
265 wrapper->SetPipeline(std::move(ref));
266}
267
268template <typename TBuffer>
270 TBuffer buffer,
271 int offset_in_bytes,
272 int length_in_bytes,
273 int vertex_count) {
274 auto& vertex_buffer = wrapper->GetVertexBuffer();
275 vertex_buffer.vertex_buffer = impeller::BufferView{
276 .buffer = buffer,
277 .range = impeller::Range(offset_in_bytes, length_in_bytes),
278 };
279 // If the index type is set, then the `vertex_count` becomes the index
280 // count... So don't overwrite the count if it's already been set when binding
281 // the index buffer.
282 // TODO(bdero): Consider just doing a more traditional API with
283 // draw(vertexCount) and drawIndexed(indexCount). This is fine,
284 // but overall it would be a bit more explicit and we wouldn't
285 // have to document this behavior where the presence of the index
286 // buffer always takes precedent.
287 if (vertex_buffer.index_type == impeller::IndexType::kNone) {
288 vertex_buffer.vertex_count = vertex_count;
289 }
290}
291
294 flutter::gpu::DeviceBuffer* device_buffer,
295 int offset_in_bytes,
296 int length_in_bytes,
297 int vertex_count) {
298 BindVertexBuffer(wrapper, device_buffer->GetBuffer(), offset_in_bytes,
299 length_in_bytes, vertex_count);
300}
301
304 flutter::gpu::HostBuffer* host_buffer,
305 int offset_in_bytes,
306 int length_in_bytes,
307 int vertex_count) {
308 std::optional<impeller::BufferView> view =
309 host_buffer->GetBufferViewForOffset(offset_in_bytes);
310 if (!view.has_value()) {
312 << "Failed to bind vertex buffer due to invalid HostBuffer offset: "
313 << offset_in_bytes;
314 return;
315 }
316 BindVertexBuffer(wrapper, view->buffer, view->range.offset,
317 view->range.length, vertex_count);
318}
319
320template <typename TBuffer>
322 TBuffer buffer,
323 int offset_in_bytes,
324 int length_in_bytes,
325 int index_type,
326 int index_count) {
327 auto& vertex_buffer = wrapper->GetVertexBuffer();
328 vertex_buffer.index_buffer = impeller::BufferView{
329 .buffer = buffer,
330 .range = impeller::Range(offset_in_bytes, length_in_bytes),
331 };
332 vertex_buffer.index_type = flutter::gpu::ToImpellerIndexType(index_type);
333 vertex_buffer.vertex_count = index_count;
334}
335
338 flutter::gpu::DeviceBuffer* device_buffer,
339 int offset_in_bytes,
340 int length_in_bytes,
341 int index_type,
342 int index_count) {
343 BindIndexBuffer(wrapper, device_buffer->GetBuffer(), offset_in_bytes,
344 length_in_bytes, index_type, index_count);
345}
346
349 flutter::gpu::HostBuffer* host_buffer,
350 int offset_in_bytes,
351 int length_in_bytes,
352 int index_type,
353 int index_count) {
354 auto view = host_buffer->GetBufferViewForOffset(offset_in_bytes);
355 if (!view.has_value()) {
357 << "Failed to bind index buffer due to invalid HostBuffer offset: "
358 << offset_in_bytes;
359 return;
360 }
361 BindIndexBuffer(wrapper, view->buffer, view->range.offset, view->range.length,
362 index_type, index_count);
363}
364
365template <typename TBuffer>
367 flutter::gpu::Shader* shader,
368 Dart_Handle uniform_name_handle,
369 TBuffer buffer,
370 int offset_in_bytes,
371 int length_in_bytes) {
372 auto& command = wrapper->GetCommand();
373
374 auto uniform_name = tonic::StdStringFromDart(uniform_name_handle);
375 const flutter::gpu::Shader::UniformBinding* uniform_struct =
376 shader->GetUniformStruct(uniform_name);
377 // TODO(bdero): Return an error string stating that no uniform struct with
378 // this name exists and throw an exception.
379 if (!uniform_struct) {
380 return false;
381 }
382
383 return command.BindResource(
385 uniform_struct->slot, uniform_struct->metadata,
387 .buffer = buffer,
388 .range = impeller::Range(offset_in_bytes, length_in_bytes),
389 });
390}
391
394 flutter::gpu::Shader* shader,
395 Dart_Handle uniform_name_handle,
396 flutter::gpu::DeviceBuffer* device_buffer,
397 int offset_in_bytes,
398 int length_in_bytes) {
399 return BindUniform(wrapper, shader, uniform_name_handle,
400 device_buffer->GetBuffer(), offset_in_bytes,
401 length_in_bytes);
402}
403
406 flutter::gpu::Shader* shader,
407 Dart_Handle uniform_name_handle,
408 flutter::gpu::HostBuffer* host_buffer,
409 int offset_in_bytes,
410 int length_in_bytes) {
411 auto view = host_buffer->GetBufferViewForOffset(offset_in_bytes);
412 if (!view.has_value()) {
414 << "Failed to bind index buffer due to invalid HostBuffer offset: "
415 << offset_in_bytes;
416 return false;
417 }
418 return BindUniform(wrapper, shader, uniform_name_handle, view->buffer,
419 view->range.offset, view->range.length);
420}
421
424 flutter::gpu::Shader* shader,
425 Dart_Handle uniform_name_handle,
427 int min_filter,
428 int mag_filter,
429 int mip_filter,
430 int width_address_mode,
431 int height_address_mode) {
432 auto& command = wrapper->GetCommand();
433
434 auto uniform_name = tonic::StdStringFromDart(uniform_name_handle);
435 const impeller::SampledImageSlot* image_slot =
436 shader->GetUniformTexture(uniform_name);
437 // TODO(bdero): Return an error string stating that no uniform texture with
438 // this name exists and throw an exception.
439 if (!image_slot) {
440 return false;
441 }
442
443 impeller::SamplerDescriptor sampler_desc;
444 sampler_desc.min_filter = flutter::gpu::ToImpellerMinMagFilter(min_filter);
445 sampler_desc.mag_filter = flutter::gpu::ToImpellerMinMagFilter(mag_filter);
446 sampler_desc.mip_filter = flutter::gpu::ToImpellerMipFilter(mip_filter);
447 sampler_desc.width_address_mode =
449 sampler_desc.height_address_mode =
451 const std::unique_ptr<const impeller::Sampler>& sampler =
452 wrapper->GetContext()->GetSamplerLibrary()->GetSampler(sampler_desc);
453
454 return command.BindResource(
456 *image_slot, impeller::ShaderMetadata{}, texture->GetTexture(), sampler);
457}
458
460 flutter::gpu::RenderPass* wrapper) {
461 auto& command = wrapper->GetCommand();
462 command.vertex_buffer = {};
463 command.vertex_bindings = {};
464 command.fragment_bindings = {};
465}
466
469 int color_attachment_index,
470 bool enable) {
471 auto& color = wrapper->GetColorAttachmentDescriptor(color_attachment_index);
472 color.blending_enabled = enable;
473}
474
477 int color_attachment_index,
478 int color_blend_operation,
479 int source_color_blend_factor,
480 int destination_color_blend_factor,
481 int alpha_blend_operation,
482 int source_alpha_blend_factor,
483 int destination_alpha_blend_factor) {
484 auto& color = wrapper->GetColorAttachmentDescriptor(color_attachment_index);
485 color.color_blend_op =
486 flutter::gpu::ToImpellerBlendOperation(color_blend_operation);
487 color.src_color_blend_factor =
488 flutter::gpu::ToImpellerBlendFactor(source_color_blend_factor);
489 color.dst_color_blend_factor =
490 flutter::gpu::ToImpellerBlendFactor(destination_color_blend_factor);
491 color.alpha_blend_op =
492 flutter::gpu::ToImpellerBlendOperation(alpha_blend_operation);
493 color.src_alpha_blend_factor =
494 flutter::gpu::ToImpellerBlendFactor(source_alpha_blend_factor);
495 color.dst_alpha_blend_factor =
496 flutter::gpu::ToImpellerBlendFactor(destination_alpha_blend_factor);
497}
498
501 bool enable) {
502 auto& depth = wrapper->GetDepthAttachmentDescriptor();
503 depth.depth_write_enabled = true;
504}
505
508 int compare_operation) {
509 auto& depth = wrapper->GetDepthAttachmentDescriptor();
510 depth.depth_compare =
512}
513
515 return wrapper->Draw();
516}
std::shared_ptr< impeller::CommandBuffer > GetCommandBuffer()
void AddRenderPass(std::shared_ptr< impeller::RenderPass > render_pass)
std::shared_ptr< impeller::DeviceBuffer > GetBuffer()
std::optional< impeller::BufferView > GetBufferViewForOffset(size_t offset)
Definition: host_buffer.cc:39
impeller::Command & GetCommand()
Definition: render_pass.cc:35
void SetPipeline(fml::RefPtr< RenderPipeline > pipeline)
Definition: render_pass.cc:79
impeller::RenderTarget & GetRenderTarget()
Definition: render_pass.cc:43
bool Begin(flutter::gpu::CommandBuffer &command_buffer)
Definition: render_pass.cc:69
std::shared_ptr< impeller::Pipeline< impeller::PipelineDescriptor > > GetOrCreatePipeline()
Definition: render_pass.cc:84
impeller::DepthAttachmentDescriptor & GetDepthAttachmentDescriptor()
Definition: render_pass.cc:61
impeller::Command ProvisionRasterCommand()
Definition: render_pass.cc:129
impeller::VertexBuffer & GetVertexBuffer()
Definition: render_pass.cc:65
impeller::ColorAttachmentDescriptor & GetColorAttachmentDescriptor(size_t color_attachment_index)
Definition: render_pass.cc:51
const std::shared_ptr< const impeller::Context > & GetContext() const
Definition: render_pass.cc:31
An immutable collection of shaders loaded from a shader bundle asset.
Definition: shader.h:23
const Shader::UniformBinding * GetUniformStruct(const std::string &name) const
Definition: shader.cc:106
impeller::ShaderStage GetShaderStage() const
Definition: shader.cc:97
const impeller::SampledImageSlot * GetUniformTexture(const std::string &name) const
Definition: shader.cc:115
std::shared_ptr< impeller::Texture > GetTexture()
Definition: texture.cc:26
const std::map< size_t, ColorAttachment > & GetColorAttachments() const
RenderTarget & SetColorAttachment(const ColorAttachment &attachment, size_t index)
RenderTarget & SetDepthAttachment(std::optional< DepthAttachment > attachment)
PixelFormat GetRenderTargetPixelFormat() const
RenderTarget & SetStencilAttachment(std::optional< StencilAttachment > attachment)
const std::optional< DepthAttachment > & GetDepthAttachment() const
const std::optional< StencilAttachment > & GetStencilAttachment() const
struct _Dart_Handle * Dart_Handle
Definition: dart_api.h:258
DART_EXPORT Dart_Handle Dart_Null(void)
DART_EXPORT bool Dart_IsNull(Dart_Handle object)
DlColor color
GAsyncResult * result
#define FML_LOG(severity)
Definition: logging.h:82
#define FML_DCHECK(condition)
Definition: logging.h:103
void InternalFlutterGpu_RenderPass_BindPipeline(flutter::gpu::RenderPass *wrapper, flutter::gpu::RenderPipeline *pipeline)
Definition: render_pass.cc:261
static bool BindUniform(flutter::gpu::RenderPass *wrapper, flutter::gpu::Shader *shader, Dart_Handle uniform_name_handle, TBuffer buffer, int offset_in_bytes, int length_in_bytes)
Definition: render_pass.cc:366
void InternalFlutterGpu_RenderPass_ClearBindings(flutter::gpu::RenderPass *wrapper)
Definition: render_pass.cc:459
void InternalFlutterGpu_RenderPass_BindIndexBufferHost(flutter::gpu::RenderPass *wrapper, flutter::gpu::HostBuffer *host_buffer, int offset_in_bytes, int length_in_bytes, int index_type, int index_count)
Definition: render_pass.cc:347
void InternalFlutterGpu_RenderPass_SetColorBlendEquation(flutter::gpu::RenderPass *wrapper, int color_attachment_index, int color_blend_operation, int source_color_blend_factor, int destination_color_blend_factor, int alpha_blend_operation, int source_alpha_blend_factor, int destination_alpha_blend_factor)
Definition: render_pass.cc:475
void InternalFlutterGpu_RenderPass_BindVertexBufferDevice(flutter::gpu::RenderPass *wrapper, flutter::gpu::DeviceBuffer *device_buffer, int offset_in_bytes, int length_in_bytes, int vertex_count)
Definition: render_pass.cc:292
void InternalFlutterGpu_RenderPass_BindIndexBufferDevice(flutter::gpu::RenderPass *wrapper, flutter::gpu::DeviceBuffer *device_buffer, int offset_in_bytes, int length_in_bytes, int index_type, int index_count)
Definition: render_pass.cc:336
void InternalFlutterGpu_RenderPass_BindVertexBufferHost(flutter::gpu::RenderPass *wrapper, flutter::gpu::HostBuffer *host_buffer, int offset_in_bytes, int length_in_bytes, int vertex_count)
Definition: render_pass.cc:302
bool InternalFlutterGpu_RenderPass_BindTexture(flutter::gpu::RenderPass *wrapper, flutter::gpu::Shader *shader, Dart_Handle uniform_name_handle, flutter::gpu::Texture *texture, int min_filter, int mag_filter, int mip_filter, int width_address_mode, int height_address_mode)
Definition: render_pass.cc:422
Dart_Handle InternalFlutterGpu_RenderPass_Begin(flutter::gpu::RenderPass *wrapper, flutter::gpu::CommandBuffer *command_buffer)
Definition: render_pass.cc:252
Dart_Handle InternalFlutterGpu_RenderPass_SetColorAttachment(flutter::gpu::RenderPass *wrapper, int color_attachment_index, int load_action, int store_action, int clear_color, flutter::gpu::Texture *texture, Dart_Handle resolve_texture_wrapper)
Definition: render_pass.cc:199
static void BindVertexBuffer(flutter::gpu::RenderPass *wrapper, TBuffer buffer, int offset_in_bytes, int length_in_bytes, int vertex_count)
Definition: render_pass.cc:269
void InternalFlutterGpu_RenderPass_SetDepthCompareOperation(flutter::gpu::RenderPass *wrapper, int compare_operation)
Definition: render_pass.cc:506
static impeller::Color ToImpellerColor(uint32_t argb)
Definition: render_pass.cc:183
bool InternalFlutterGpu_RenderPass_BindUniformDevice(flutter::gpu::RenderPass *wrapper, flutter::gpu::Shader *shader, Dart_Handle uniform_name_handle, flutter::gpu::DeviceBuffer *device_buffer, int offset_in_bytes, int length_in_bytes)
Definition: render_pass.cc:392
bool InternalFlutterGpu_RenderPass_BindUniformHost(flutter::gpu::RenderPass *wrapper, flutter::gpu::Shader *shader, Dart_Handle uniform_name_handle, flutter::gpu::HostBuffer *host_buffer, int offset_in_bytes, int length_in_bytes)
Definition: render_pass.cc:404
static void BindIndexBuffer(flutter::gpu::RenderPass *wrapper, TBuffer buffer, int offset_in_bytes, int length_in_bytes, int index_type, int index_count)
Definition: render_pass.cc:321
void InternalFlutterGpu_RenderPass_SetColorBlendEnable(flutter::gpu::RenderPass *wrapper, int color_attachment_index, bool enable)
Definition: render_pass.cc:467
void InternalFlutterGpu_RenderPass_Initialize(Dart_Handle wrapper)
Definition: render_pass.cc:194
void InternalFlutterGpu_RenderPass_SetDepthWriteEnable(flutter::gpu::RenderPass *wrapper, bool enable)
Definition: render_pass.cc:499
Dart_Handle InternalFlutterGpu_RenderPass_SetDepthStencilAttachment(flutter::gpu::RenderPass *wrapper, int depth_load_action, int depth_store_action, float depth_clear_value, int stencil_load_action, int stencil_store_action, int stencil_clear_value, flutter::gpu::Texture *texture)
Definition: render_pass.cc:222
bool InternalFlutterGpu_RenderPass_Draw(flutter::gpu::RenderPass *wrapper)
Definition: render_pass.cc:514
FlTexture * texture
constexpr impeller::BlendFactor ToImpellerBlendFactor(FlutterGPUBlendFactor value)
Definition: formats.h:179
constexpr impeller::BlendOperation ToImpellerBlendOperation(FlutterGPUBlendOperation value)
Definition: formats.h:225
constexpr impeller::SamplerAddressMode ToImpellerSamplerAddressMode(FlutterGPUSamplerAddressMode value)
Definition: formats.h:365
constexpr impeller::MipFilter ToImpellerMipFilter(FlutterGPUMipFilter value)
Definition: formats.h:346
constexpr impeller::CompareFunction ToImpellerCompareFunction(FlutterGPUCompareFunction value)
Definition: formats.h:439
IMPLEMENT_WRAPPERTYPEINFO(flutter_gpu, CommandBuffer)
constexpr impeller::LoadAction ToImpellerLoadAction(FlutterGPULoadAction value)
Definition: formats.h:247
constexpr impeller::StoreAction ToImpellerStoreAction(FlutterGPUStoreAction value)
Definition: formats.h:270
constexpr impeller::IndexType ToImpellerIndexType(FlutterGPUIndexType value)
Definition: formats.h:387
constexpr impeller::MinMagFilter ToImpellerMinMagFilter(FlutterGPUMinMagFilter value)
Definition: formats.h:327
@ kNone
Definition: layer.h:53
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace buffer
Definition: switches.h:126
@ kNone
Does not use the index buffer.
constexpr bool IsDepthWritable(PixelFormat format)
Definition: formats.h:119
constexpr bool IsStencilWritable(PixelFormat format)
Definition: formats.h:129
Dart_Handle ToDart(const T &object)
std::string StdStringFromDart(Dart_Handle handle)
list command
Definition: valgrind.py:24
impeller::ShaderMetadata metadata
Definition: shader.h:30
impeller::ShaderUniformSlot slot
Definition: shader.h:29
std::shared_ptr< const DeviceBuffer > buffer
Definition: buffer_view.h:16
Describe the color attachment that will be used with this pipeline.
Definition: formats.h:512
static constexpr Color MakeRGBA8(uint8_t r, uint8_t g, uint8_t b, uint8_t a)
Definition: color.h:154
An object used to specify work to the GPU along with references to resources the GPU will used when d...
Definition: command.h:92
Metadata required to bind a combined texture and sampler.
Definition: shader_types.h:98
SamplerAddressMode width_address_mode
SamplerAddressMode height_address_mode
BufferView index_buffer
The index buffer binding used by the vertex shader stage.
Definition: vertex_buffer.h:18
#define ERROR(message)
Definition: elf_loader.cc:260