Flutter Engine
 
Loading...
Searching...
No Matches
render_pass.h File Reference

Go to the source code of this file.

Classes

class  flutter::gpu::RenderPass
 
struct  flutter::gpu::RenderPass::BufferAndUniformSlot
 

Namespaces

namespace  flutter
 
namespace  flutter::gpu
 

Functions

FLUTTER_GPU_EXPORT void InternalFlutterGpu_RenderPass_Initialize (Dart_Handle wrapper)
 
FLUTTER_GPU_EXPORT Dart_Handle InternalFlutterGpu_RenderPass_SetColorAttachment (flutter::gpu::RenderPass *wrapper, flutter::gpu::Context *context, int color_attachment_index, int load_action, int store_action, float clear_color_r, float clear_color_g, float clear_color_b, float clear_color_a, flutter::gpu::Texture *texture, Dart_Handle resolve_texture_wrapper)
 
FLUTTER_GPU_EXPORT 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)
 
FLUTTER_GPU_EXPORT Dart_Handle InternalFlutterGpu_RenderPass_Begin (flutter::gpu::RenderPass *wrapper, flutter::gpu::CommandBuffer *command_buffer)
 
FLUTTER_GPU_EXPORT void InternalFlutterGpu_RenderPass_BindPipeline (flutter::gpu::RenderPass *wrapper, flutter::gpu::RenderPipeline *pipeline)
 
FLUTTER_GPU_EXPORT void InternalFlutterGpu_RenderPass_BindVertexBufferDevice (flutter::gpu::RenderPass *wrapper, flutter::gpu::DeviceBuffer *device_buffer, int offset_in_bytes, int length_in_bytes, int vertex_count)
 
FLUTTER_GPU_EXPORT 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)
 
FLUTTER_GPU_EXPORT 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)
 
FLUTTER_GPU_EXPORT 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)
 
FLUTTER_GPU_EXPORT void InternalFlutterGpu_RenderPass_ClearBindings (flutter::gpu::RenderPass *wrapper)
 
FLUTTER_GPU_EXPORT void InternalFlutterGpu_RenderPass_SetColorBlendEnable (flutter::gpu::RenderPass *wrapper, int color_attachment_index, bool enable)
 
FLUTTER_GPU_EXPORT 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)
 
FLUTTER_GPU_EXPORT void InternalFlutterGpu_RenderPass_SetDepthWriteEnable (flutter::gpu::RenderPass *wrapper, bool enable)
 
FLUTTER_GPU_EXPORT void InternalFlutterGpu_RenderPass_SetDepthCompareOperation (flutter::gpu::RenderPass *wrapper, int compare_operation)
 
FLUTTER_GPU_EXPORT void InternalFlutterGpu_RenderPass_SetStencilReference (flutter::gpu::RenderPass *wrapper, int stencil_reference)
 
FLUTTER_GPU_EXPORT void InternalFlutterGpu_RenderPass_SetStencilConfig (flutter::gpu::RenderPass *wrapper, int stencil_compare_operation, int stencil_fail_operation, int depth_fail_operation, int depth_stencil_pass_operation, int read_mask, int write_mask, int target)
 
FLUTTER_GPU_EXPORT void InternalFlutterGpu_RenderPass_SetScissor (flutter::gpu::RenderPass *wrapper, int x, int y, int width, int height)
 
FLUTTER_GPU_EXPORT void InternalFlutterGpu_RenderPass_SetViewport (flutter::gpu::RenderPass *wrapper, int x, int y, int width, int height, float z_near, float z_far)
 
FLUTTER_GPU_EXPORT void InternalFlutterGpu_RenderPass_SetCullMode (flutter::gpu::RenderPass *wrapper, int cull_mode)
 
FLUTTER_GPU_EXPORT void InternalFlutterGpu_RenderPass_SetPrimitiveType (flutter::gpu::RenderPass *wrapper, int primitive_type)
 
FLUTTER_GPU_EXPORT void InternalFlutterGpu_RenderPass_SetWindingOrder (flutter::gpu::RenderPass *wrapper, int winding_order)
 
FLUTTER_GPU_EXPORT void InternalFlutterGpu_RenderPass_SetPolygonMode (flutter::gpu::RenderPass *wrapper, int polygon_mode)
 
FLUTTER_GPU_EXPORT bool InternalFlutterGpu_RenderPass_Draw (flutter::gpu::RenderPass *wrapper)
 

Function Documentation

◆ InternalFlutterGpu_RenderPass_Begin()

FLUTTER_GPU_EXPORT Dart_Handle InternalFlutterGpu_RenderPass_Begin ( flutter::gpu::RenderPass wrapper,
flutter::gpu::CommandBuffer command_buffer 
)
extern

Definition at line 313 of file render_pass.cc.

315 {
316 if (!wrapper->Begin(*command_buffer)) {
317 return tonic::ToDart("Failed to begin RenderPass");
318 }
319 return Dart_Null();
320}
bool Begin(flutter::gpu::CommandBuffer &command_buffer)
Dart_Handle ToDart(const T &object)

References flutter::gpu::RenderPass::Begin(), and tonic::ToDart().

◆ InternalFlutterGpu_RenderPass_BindIndexBufferDevice()

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

Definition at line 380 of file render_pass.cc.

386 {
387 BindIndexBuffer(wrapper, device_buffer->GetBuffer(), offset_in_bytes,
388 length_in_bytes, index_type, index_count);
389}
std::shared_ptr< impeller::DeviceBuffer > GetBuffer()
static void BindIndexBuffer(flutter::gpu::RenderPass *wrapper, const std::shared_ptr< const impeller::DeviceBuffer > &buffer, int offset_in_bytes, int length_in_bytes, int index_type, int index_count)

References BindIndexBuffer(), and flutter::gpu::DeviceBuffer::GetBuffer().

◆ InternalFlutterGpu_RenderPass_BindPipeline()

FLUTTER_GPU_EXPORT void InternalFlutterGpu_RenderPass_BindPipeline ( flutter::gpu::RenderPass wrapper,
flutter::gpu::RenderPipeline pipeline 
)
extern

Definition at line 322 of file render_pass.cc.

324 {
326 wrapper->SetPipeline(std::move(ref));
327}
void SetPipeline(fml::RefPtr< RenderPipeline > pipeline)

References flutter::gpu::RenderPass::SetPipeline().

◆ InternalFlutterGpu_RenderPass_BindTexture()

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

Definition at line 449 of file render_pass.cc.

458 {
459 auto uniform_name = tonic::StdStringFromDart(uniform_name_handle);
460 const flutter::gpu::Shader::TextureBinding* texture_binding =
461 shader->GetUniformTexture(uniform_name);
462 // TODO(bdero): Return an error string stating that no uniform texture with
463 // this name exists and throw an exception.
464 if (!texture_binding) {
465 return false;
466 }
467
468 impeller::SamplerDescriptor sampler_desc;
469 sampler_desc.min_filter = flutter::gpu::ToImpellerMinMagFilter(min_filter);
470 sampler_desc.mag_filter = flutter::gpu::ToImpellerMinMagFilter(mag_filter);
471 sampler_desc.mip_filter = flutter::gpu::ToImpellerMipFilter(mip_filter);
472 sampler_desc.width_address_mode =
474 sampler_desc.height_address_mode =
476 auto sampler =
477 wrapper->GetContext()->GetSamplerLibrary()->GetSampler(sampler_desc);
478
479 flutter::gpu::RenderPass::TextureUniformMap* uniform_map = nullptr;
480 switch (shader->GetShaderStage()) {
482 uniform_map = &wrapper->vertex_texture_bindings;
483 break;
485 uniform_map = &wrapper->fragment_texture_bindings;
486 break;
489 return false;
490 }
491 uniform_map->insert_or_assign(
492 texture_binding,
494 .slot = texture_binding->slot,
495 .texture = {&texture_binding->metadata, texture->GetTexture()},
496 .sampler = sampler,
497 });
498 return true;
499}
std::unordered_map< const flutter::gpu::Shader::TextureBinding *, impeller::TextureAndSampler > TextureUniformMap
Definition render_pass.h:70
TextureUniformMap fragment_texture_bindings
Definition render_pass.h:75
TextureUniformMap vertex_texture_bindings
Definition render_pass.h:73
const std::shared_ptr< const impeller::Context > & GetContext() const
impeller::ShaderStage GetShaderStage() const
Definition shader.cc:96
const Shader::TextureBinding * GetUniformTexture(const std::string &name) const
Definition shader.cc:114
FlTexture * texture
constexpr impeller::SamplerAddressMode ToImpellerSamplerAddressMode(FlutterGPUSamplerAddressMode value)
Definition formats.h:365
constexpr impeller::MipFilter ToImpellerMipFilter(FlutterGPUMipFilter value)
Definition formats.h:346
constexpr impeller::MinMagFilter ToImpellerMinMagFilter(FlutterGPUMinMagFilter value)
Definition formats.h:327
std::string StdStringFromDart(Dart_Handle handle)
impeller::SampledImageSlot slot
Definition shader.h:38
impeller::ShaderMetadata metadata
Definition shader.h:39
SamplerAddressMode width_address_mode
SamplerAddressMode height_address_mode
combines the texture, sampler and sampler slot information.
Definition command.h:59
SampledImageSlot slot
Definition command.h:60

References flutter::gpu::RenderPass::fragment_texture_bindings, flutter::gpu::RenderPass::GetContext(), flutter::gpu::Shader::GetShaderStage(), flutter::gpu::Shader::GetUniformTexture(), impeller::SamplerDescriptor::height_address_mode, impeller::kCompute, impeller::kFragment, impeller::kUnknown, impeller::kVertex, impeller::SamplerDescriptor::mag_filter, flutter::gpu::Shader::TextureBinding::metadata, impeller::SamplerDescriptor::min_filter, impeller::SamplerDescriptor::mip_filter, impeller::TextureAndSampler::slot, flutter::gpu::Shader::TextureBinding::slot, tonic::StdStringFromDart(), texture, flutter::gpu::ToImpellerMinMagFilter(), flutter::gpu::ToImpellerMipFilter(), flutter::gpu::ToImpellerSamplerAddressMode(), flutter::gpu::RenderPass::vertex_texture_bindings, and impeller::SamplerDescriptor::width_address_mode.

◆ InternalFlutterGpu_RenderPass_BindUniformDevice()

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

Definition at line 437 of file render_pass.cc.

443 {
444 return BindUniform(wrapper, shader, uniform_name_handle,
445 device_buffer->GetBuffer(), offset_in_bytes,
446 length_in_bytes);
447}
static bool BindUniform(flutter::gpu::RenderPass *wrapper, flutter::gpu::Shader *shader, Dart_Handle uniform_name_handle, const std::shared_ptr< const impeller::DeviceBuffer > &buffer, int offset_in_bytes, int length_in_bytes)

References BindUniform(), and flutter::gpu::DeviceBuffer::GetBuffer().

◆ InternalFlutterGpu_RenderPass_BindVertexBufferDevice()

FLUTTER_GPU_EXPORT void InternalFlutterGpu_RenderPass_BindVertexBufferDevice ( flutter::gpu::RenderPass wrapper,
flutter::gpu::DeviceBuffer device_buffer,
int  offset_in_bytes,
int  length_in_bytes,
int  vertex_count 
)
extern

Definition at line 351 of file render_pass.cc.

356 {
357 BindVertexBuffer(wrapper, device_buffer->GetBuffer(), offset_in_bytes,
358 length_in_bytes, vertex_count);
359}
static void BindVertexBuffer(flutter::gpu::RenderPass *wrapper, const std::shared_ptr< const impeller::DeviceBuffer > &buffer, int offset_in_bytes, int length_in_bytes, int vertex_count)

References BindVertexBuffer(), and flutter::gpu::DeviceBuffer::GetBuffer().

◆ InternalFlutterGpu_RenderPass_ClearBindings()

FLUTTER_GPU_EXPORT void InternalFlutterGpu_RenderPass_ClearBindings ( flutter::gpu::RenderPass wrapper)
extern

Definition at line 501 of file render_pass.cc.

502 {
503 wrapper->ClearBindings();
504}

References flutter::gpu::RenderPass::ClearBindings().

◆ InternalFlutterGpu_RenderPass_Draw()

FLUTTER_GPU_EXPORT bool InternalFlutterGpu_RenderPass_Draw ( flutter::gpu::RenderPass wrapper)
extern

Definition at line 653 of file render_pass.cc.

653 {
654 return wrapper->Draw();
655}

References flutter::gpu::RenderPass::Draw().

◆ InternalFlutterGpu_RenderPass_Initialize()

FLUTTER_GPU_EXPORT void InternalFlutterGpu_RenderPass_Initialize ( Dart_Handle  wrapper)
extern

Exports

Definition at line 242 of file render_pass.cc.

242 {
243 auto res = fml::MakeRefCounted<flutter::gpu::RenderPass>();
244 res->AssociateWithDartWrapper(wrapper);
245}

◆ InternalFlutterGpu_RenderPass_SetColorAttachment()

FLUTTER_GPU_EXPORT Dart_Handle InternalFlutterGpu_RenderPass_SetColorAttachment ( flutter::gpu::RenderPass wrapper,
flutter::gpu::Context context,
int  color_attachment_index,
int  load_action,
int  store_action,
float  clear_color_r,
float  clear_color_g,
float  clear_color_b,
float  clear_color_a,
flutter::gpu::Texture texture,
Dart_Handle  resolve_texture_wrapper 
)
extern

Definition at line 247 of file render_pass.cc.

258 {
262 desc.clear_color = impeller::Color(clear_color_r, clear_color_g,
263 clear_color_b, clear_color_a);
264 desc.texture = texture->GetTexture();
265 if (!Dart_IsNull(resolve_texture_wrapper)) {
266 flutter::gpu::Texture* resolve_texture =
268 resolve_texture_wrapper);
269 desc.resolve_texture = resolve_texture->GetTexture();
270
271 // If the backend doesn't support normal MSAA, gracefully fallback to
272 // rendering without MSAA.
274 desc.texture = desc.resolve_texture;
275 desc.resolve_texture = nullptr;
277 }
278 }
279 wrapper->GetRenderTarget().SetColorAttachment(desc, color_attachment_index);
280 return Dart_Null();
281}
impeller::Context & GetContext()
Definition context.cc:77
impeller::RenderTarget & GetRenderTarget()
std::shared_ptr< impeller::Texture > GetTexture()
Definition texture.cc:29
RenderTarget & SetColorAttachment(const ColorAttachment &attachment, size_t index)
bool SupportsNormalOffscreenMSAA(const impeller::Context &context)
Definition context.cc:18
constexpr impeller::LoadAction ToImpellerLoadAction(FlutterGPULoadAction value)
Definition formats.h:247
constexpr impeller::StoreAction ToImpellerStoreAction(FlutterGPUStoreAction value)
Definition formats.h:270
std::shared_ptr< Texture > resolve_texture
Definition formats.h:658
LoadAction load_action
Definition formats.h:659
std::shared_ptr< Texture > texture
Definition formats.h:657
StoreAction store_action
Definition formats.h:660

References impeller::ColorAttachment::clear_color, flutter::gpu::Context::GetContext(), flutter::gpu::RenderPass::GetRenderTarget(), flutter::gpu::Texture::GetTexture(), impeller::kStore, impeller::Attachment::load_action, impeller::Attachment::resolve_texture, impeller::RenderTarget::SetColorAttachment(), impeller::Attachment::store_action, flutter::gpu::SupportsNormalOffscreenMSAA(), impeller::Attachment::texture, texture, flutter::gpu::ToImpellerLoadAction(), and flutter::gpu::ToImpellerStoreAction().

◆ InternalFlutterGpu_RenderPass_SetColorBlendEnable()

FLUTTER_GPU_EXPORT void InternalFlutterGpu_RenderPass_SetColorBlendEnable ( flutter::gpu::RenderPass wrapper,
int  color_attachment_index,
bool  enable 
)
extern

Definition at line 506 of file render_pass.cc.

509 {
510 auto& color = wrapper->GetColorAttachmentDescriptor(color_attachment_index);
511 color.blending_enabled = enable;
512}
impeller::ColorAttachmentDescriptor & GetColorAttachmentDescriptor(size_t color_attachment_index)

References impeller::ColorAttachmentDescriptor::blending_enabled, and flutter::gpu::RenderPass::GetColorAttachmentDescriptor().

◆ InternalFlutterGpu_RenderPass_SetColorBlendEquation()

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

Definition at line 514 of file render_pass.cc.

522 {
523 auto& color = wrapper->GetColorAttachmentDescriptor(color_attachment_index);
524 color.color_blend_op =
525 flutter::gpu::ToImpellerBlendOperation(color_blend_operation);
526 color.src_color_blend_factor =
527 flutter::gpu::ToImpellerBlendFactor(source_color_blend_factor);
528 color.dst_color_blend_factor =
529 flutter::gpu::ToImpellerBlendFactor(destination_color_blend_factor);
530 color.alpha_blend_op =
531 flutter::gpu::ToImpellerBlendOperation(alpha_blend_operation);
532 color.src_alpha_blend_factor =
533 flutter::gpu::ToImpellerBlendFactor(source_alpha_blend_factor);
534 color.dst_alpha_blend_factor =
535 flutter::gpu::ToImpellerBlendFactor(destination_alpha_blend_factor);
536}
constexpr impeller::BlendFactor ToImpellerBlendFactor(FlutterGPUBlendFactor value)
Definition formats.h:179
constexpr impeller::BlendOperation ToImpellerBlendOperation(FlutterGPUBlendOperation value)
Definition formats.h:225

References impeller::ColorAttachmentDescriptor::color_blend_op, flutter::gpu::RenderPass::GetColorAttachmentDescriptor(), flutter::gpu::ToImpellerBlendFactor(), and flutter::gpu::ToImpellerBlendOperation().

◆ InternalFlutterGpu_RenderPass_SetCullMode()

FLUTTER_GPU_EXPORT void InternalFlutterGpu_RenderPass_SetCullMode ( flutter::gpu::RenderPass wrapper,
int  cull_mode 
)
extern

Definition at line 618 of file render_pass.cc.

620 {
621 impeller::PipelineDescriptor& pipeline_descriptor =
622 wrapper->GetPipelineDescriptor();
623 pipeline_descriptor.SetCullMode(flutter::gpu::ToImpellerCullMode(cull_mode));
624}
impeller::PipelineDescriptor & GetPipelineDescriptor()
constexpr impeller::CullMode ToImpellerCullMode(FlutterGPUCullMode value)
Definition formats.h:510

References flutter::gpu::RenderPass::GetPipelineDescriptor(), impeller::PipelineDescriptor::SetCullMode(), and flutter::gpu::ToImpellerCullMode().

◆ InternalFlutterGpu_RenderPass_SetDepthCompareOperation()

FLUTTER_GPU_EXPORT void InternalFlutterGpu_RenderPass_SetDepthCompareOperation ( flutter::gpu::RenderPass wrapper,
int  compare_operation 
)
extern

Definition at line 545 of file render_pass.cc.

547 {
548 auto& depth = wrapper->GetDepthAttachmentDescriptor();
549 depth.depth_compare =
551}
impeller::DepthAttachmentDescriptor & GetDepthAttachmentDescriptor()
constexpr impeller::CompareFunction ToImpellerCompareFunction(FlutterGPUCompareFunction value)
Definition formats.h:439

References impeller::DepthAttachmentDescriptor::depth_compare, flutter::gpu::RenderPass::GetDepthAttachmentDescriptor(), and flutter::gpu::ToImpellerCompareFunction().

◆ InternalFlutterGpu_RenderPass_SetDepthStencilAttachment()

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

Definition at line 283 of file render_pass.cc.

291 {
292 {
294 desc.load_action = flutter::gpu::ToImpellerLoadAction(depth_load_action);
295 desc.store_action = flutter::gpu::ToImpellerStoreAction(depth_store_action);
296 desc.clear_depth = depth_clear_value;
297 desc.texture = texture->GetTexture();
298 wrapper->GetRenderTarget().SetDepthAttachment(desc);
299 }
300 {
302 desc.load_action = flutter::gpu::ToImpellerLoadAction(stencil_load_action);
303 desc.store_action =
304 flutter::gpu::ToImpellerStoreAction(stencil_store_action);
305 desc.clear_stencil = stencil_clear_value;
306 desc.texture = texture->GetTexture();
307 wrapper->GetRenderTarget().SetStencilAttachment(desc);
308 }
309
310 return Dart_Null();
311}
RenderTarget & SetDepthAttachment(std::optional< DepthAttachment > attachment)
RenderTarget & SetStencilAttachment(std::optional< StencilAttachment > attachment)

References impeller::DepthAttachment::clear_depth, impeller::StencilAttachment::clear_stencil, flutter::gpu::RenderPass::GetRenderTarget(), impeller::Attachment::load_action, impeller::RenderTarget::SetDepthAttachment(), impeller::RenderTarget::SetStencilAttachment(), impeller::Attachment::store_action, impeller::Attachment::texture, texture, flutter::gpu::ToImpellerLoadAction(), and flutter::gpu::ToImpellerStoreAction().

◆ InternalFlutterGpu_RenderPass_SetDepthWriteEnable()

FLUTTER_GPU_EXPORT void InternalFlutterGpu_RenderPass_SetDepthWriteEnable ( flutter::gpu::RenderPass wrapper,
bool  enable 
)
extern

◆ InternalFlutterGpu_RenderPass_SetPolygonMode()

FLUTTER_GPU_EXPORT void InternalFlutterGpu_RenderPass_SetPolygonMode ( flutter::gpu::RenderPass wrapper,
int  polygon_mode 
)
extern

Definition at line 644 of file render_pass.cc.

646 {
647 impeller::PipelineDescriptor& pipeline_descriptor =
648 wrapper->GetPipelineDescriptor();
649 pipeline_descriptor.SetPolygonMode(
651}
void SetPolygonMode(PolygonMode mode)
constexpr impeller::PolygonMode ToImpellerPolygonMode(FlutterGPUPolygonMode value)
Definition formats.h:549

References flutter::gpu::RenderPass::GetPipelineDescriptor(), impeller::PipelineDescriptor::SetPolygonMode(), and flutter::gpu::ToImpellerPolygonMode().

◆ InternalFlutterGpu_RenderPass_SetPrimitiveType()

FLUTTER_GPU_EXPORT void InternalFlutterGpu_RenderPass_SetPrimitiveType ( flutter::gpu::RenderPass wrapper,
int  primitive_type 
)
extern

Definition at line 626 of file render_pass.cc.

628 {
629 impeller::PipelineDescriptor& pipeline_descriptor =
630 wrapper->GetPipelineDescriptor();
631 pipeline_descriptor.SetPrimitiveType(
633}
void SetPrimitiveType(PrimitiveType type)
constexpr impeller::PrimitiveType ToImpellerPrimitiveType(FlutterGPUPrimitiveType value)
Definition formats.h:408

References flutter::gpu::RenderPass::GetPipelineDescriptor(), impeller::PipelineDescriptor::SetPrimitiveType(), and flutter::gpu::ToImpellerPrimitiveType().

◆ InternalFlutterGpu_RenderPass_SetScissor()

FLUTTER_GPU_EXPORT void InternalFlutterGpu_RenderPass_SetScissor ( flutter::gpu::RenderPass wrapper,
int  x,
int  y,
int  width,
int  height 
)
extern

Definition at line 559 of file render_pass.cc.

563 {
565}
std::optional< impeller::IRect32 > scissor
Definition render_pass.h:83
int32_t x
double y
int32_t height
int32_t width
static constexpr TRect MakeXYWH(Type x, Type y, Type width, Type height)
Definition rect.h:136

References height, impeller::TRect< T >::MakeXYWH(), flutter::gpu::RenderPass::scissor, width, x, and y.

◆ InternalFlutterGpu_RenderPass_SetStencilConfig()

FLUTTER_GPU_EXPORT void InternalFlutterGpu_RenderPass_SetStencilConfig ( flutter::gpu::RenderPass wrapper,
int  stencil_compare_operation,
int  stencil_fail_operation,
int  depth_fail_operation,
int  depth_stencil_pass_operation,
int  read_mask,
int  write_mask,
int  target 
)
extern

Definition at line 588 of file render_pass.cc.

596 {
598 desc.stencil_compare =
599 flutter::gpu::ToImpellerCompareFunction(stencil_compare_operation);
600 desc.stencil_failure =
601 flutter::gpu::ToImpellerStencilOperation(stencil_fail_operation);
602 desc.depth_failure =
603 flutter::gpu::ToImpellerStencilOperation(depth_fail_operation);
604 desc.depth_stencil_pass =
605 flutter::gpu::ToImpellerStencilOperation(depth_stencil_pass_operation);
606 desc.read_mask = static_cast<uint32_t>(read_mask);
607 desc.write_mask = static_cast<uint32_t>(write_mask);
608
609 // Corresponds to the `StencilFace` enum in `gpu/lib/src/render_pass.dart`.
610 if (target_face != 2 /* both or front */) {
611 wrapper->GetStencilFrontAttachmentDescriptor() = desc;
612 }
613 if (target_face != 1 /* both or back */) {
614 wrapper->GetStencilBackAttachmentDescriptor() = desc;
615 }
616}
impeller::StencilAttachmentDescriptor & GetStencilBackAttachmentDescriptor()
impeller::StencilAttachmentDescriptor & GetStencilFrontAttachmentDescriptor()
constexpr impeller::StencilOperation ToImpellerStencilOperation(FlutterGPUStencilOperation value)
Definition formats.h:477

References impeller::StencilAttachmentDescriptor::depth_failure, impeller::StencilAttachmentDescriptor::depth_stencil_pass, flutter::gpu::RenderPass::GetStencilBackAttachmentDescriptor(), flutter::gpu::RenderPass::GetStencilFrontAttachmentDescriptor(), impeller::StencilAttachmentDescriptor::read_mask, impeller::StencilAttachmentDescriptor::stencil_compare, impeller::StencilAttachmentDescriptor::stencil_failure, flutter::gpu::ToImpellerCompareFunction(), flutter::gpu::ToImpellerStencilOperation(), and impeller::StencilAttachmentDescriptor::write_mask.

◆ InternalFlutterGpu_RenderPass_SetStencilReference()

FLUTTER_GPU_EXPORT void InternalFlutterGpu_RenderPass_SetStencilReference ( flutter::gpu::RenderPass wrapper,
int  stencil_reference 
)
extern

Definition at line 553 of file render_pass.cc.

555 {
556 wrapper->stencil_reference = static_cast<uint32_t>(stencil_reference);
557}

References flutter::gpu::RenderPass::stencil_reference.

◆ InternalFlutterGpu_RenderPass_SetViewport()

FLUTTER_GPU_EXPORT void InternalFlutterGpu_RenderPass_SetViewport ( flutter::gpu::RenderPass wrapper,
int  x,
int  y,
int  width,
int  height,
float  z_near,
float  z_far 
)
extern

Definition at line 567 of file render_pass.cc.

574 {
576
577 auto depth_range = impeller::DepthRange();
578 depth_range.z_near = z_near;
579 depth_range.z_far = z_far;
580
581 auto viewport = impeller::Viewport();
582 viewport.rect = rect;
583 viewport.depth_range = depth_range;
584
585 wrapper->viewport = viewport;
586}
std::optional< impeller::Viewport > viewport
Definition render_pass.h:84

References height, impeller::TRect< T >::MakeXYWH(), flutter::gpu::RenderPass::viewport, width, x, and y.

◆ InternalFlutterGpu_RenderPass_SetWindingOrder()

FLUTTER_GPU_EXPORT void InternalFlutterGpu_RenderPass_SetWindingOrder ( flutter::gpu::RenderPass wrapper,
int  winding_order 
)
extern

Definition at line 635 of file render_pass.cc.

637 {
638 impeller::PipelineDescriptor& pipeline_descriptor =
639 wrapper->GetPipelineDescriptor();
640 pipeline_descriptor.SetWindingOrder(
642}
void SetWindingOrder(WindingOrder order)
constexpr impeller::WindingOrder ToImpellerWindingOrder(FlutterGPUWindingOrder value)
Definition formats.h:530

References flutter::gpu::RenderPass::GetPipelineDescriptor(), impeller::PipelineDescriptor::SetWindingOrder(), and flutter::gpu::ToImpellerWindingOrder().