[Impeller] Set up the clear color for non-MSAA render targets. (flutter/engine#43452)
This is needed when using the "collapse DrawRects into clear colors" optimization on GLES.
This commit is contained in:
@@ -226,6 +226,7 @@ static EntityPassTarget CreateRenderTarget(ContentContext& renderer,
|
||||
.storage_mode = StorageMode::kDevicePrivate,
|
||||
.load_action = LoadAction::kDontCare,
|
||||
.store_action = StoreAction::kDontCare,
|
||||
.clear_color = clear_color,
|
||||
}, // color_attachment_config
|
||||
GetDefaultStencilConfig(readable) // stencil_attachment_config
|
||||
);
|
||||
|
||||
@@ -232,7 +232,7 @@ RenderTarget RenderTarget::CreateOffscreen(
|
||||
static_cast<uint64_t>(TextureUsage::kShaderRead);
|
||||
|
||||
ColorAttachment color0;
|
||||
color0.clear_color = Color::BlackTransparent();
|
||||
color0.clear_color = color_attachment_config.clear_color;
|
||||
color0.load_action = color_attachment_config.load_action;
|
||||
color0.store_action = color_attachment_config.store_action;
|
||||
color0.texture = context.GetResourceAllocator()->CreateTexture(color_tex0);
|
||||
|
||||
Reference in New Issue
Block a user