Commit b79d5f14 authored by enne's avatar enne Committed by Commit bot

cc: Fix invalid opaque debug quads

It's possible that small debug border quads (when opaque) can get inset
so much that they become empty.  This causes problems in IPC validating,
as the quad rect no longer contains the visible rect (which is empty,
due to the insetting).  This causes the frame to be invalid, which
causes browser rendering artifacts.

BUG=472014

Review URL: https://codereview.chromium.org/1105573002

Cr-Commit-Position: refs/heads/master@{#326618}
parent 25a81c24
......@@ -352,6 +352,8 @@ void LayerImpl::AppendDebugBorderQuad(RenderPass* render_pass,
float fill_width = width * 3;
gfx::Rect fill_rect = quad_rect;
fill_rect.Inset(fill_width / 2.f, fill_width / 2.f);
if (fill_rect.IsEmpty())
return;
gfx::Rect visible_fill_rect =
gfx::IntersectRects(visible_quad_rect, fill_rect);
DebugBorderDrawQuad* fill_quad =
......
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