Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions impeller/entity/contents/content_context.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ void ContentContextOptions::ApplyToPipelineDescriptor(
color0.format = color_attachment_pixel_format;
color0.alpha_blend_op = BlendOperation::kAdd;
color0.color_blend_op = BlendOperation::kAdd;
color0.write_mask = ColorWriteMaskBits::kAll;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just explicitly specifying the default value of the write mask as initialized in the ColorAttachmentDescriptor. Are there cases where we do modify it mask when we create the pipeline descriptor? Perhaps its better to be explicit.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just being explicit.


switch (pipeline_blend) {
case BlendMode::kClear:
Expand Down Expand Up @@ -69,6 +70,7 @@ void ContentContextOptions::ApplyToPipelineDescriptor(
color0.dst_color_blend_factor = BlendFactor::kOne;
color0.src_alpha_blend_factor = BlendFactor::kZero;
color0.src_color_blend_factor = BlendFactor::kZero;
color0.write_mask = ColorWriteMaskBits::kNone;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose it makes sense that this is correct. Have no clue why it could be faster. RSLGTM?

break;
case BlendMode::kSourceOver:
color0.dst_alpha_blend_factor = BlendFactor::kOneMinusSourceAlpha;
Expand Down