Commit 167a3530 authored by Peng Huang's avatar Peng Huang Committed by Commit Bot

Fix a checkerboad related crash.

For a mask layer, the color's alpha channel has to be 255, otherwise
a DCHECK() in cc::RenderSurfaceImpl::TileMaskLayer() will be triggered.

Bug: 897731
Change-Id: I9281ebdd1eccde58642297618051b2a1fb0a81e7
Reviewed-on: https://chromium-review.googlesource.com/c/1349454Reviewed-by: default avatarweiliangc <weiliangc@chromium.org>
Commit-Queue: Peng Huang <penghuang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#610681}
parent 42b6216b
...@@ -526,7 +526,8 @@ void PictureLayerImpl::AppendQuads(viz::RenderPass* render_pass, ...@@ -526,7 +526,8 @@ void PictureLayerImpl::AppendQuads(viz::RenderPass* render_pass,
if (!has_draw_quad) { if (!has_draw_quad) {
// Checkerboard. // Checkerboard.
SkColor color = SafeOpaqueBackgroundColor(); SkColor color = SafeOpaqueBackgroundColor();
if (ShowDebugBorders(DebugBorderType::LAYER)) { if (mask_type_ == Layer::LayerMaskType::NOT_MASK &&
ShowDebugBorders(DebugBorderType::LAYER)) {
// Fill the whole tile with the missing tile color. // Fill the whole tile with the missing tile color.
color = DebugColors::OOMTileBorderColor(); color = DebugColors::OOMTileBorderColor();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment