Commit 06aebb2f authored by hendrikw's avatar hendrikw Committed by Commit bot

cc: Removed DCHECK that asserted MapPoint returns clipped as true

When we apply a perspective to a div, we could end up with a
situation where the mapped points end up behind the view.  When
this happened we would DCHECK, but since this a valid scenario
and the rendered results look correct (as far as I can tell),
I'm removing the DCHECK.

Please see http://jsfiddle.net/kkryf2v4/ for an example where
we animate from non-clipped to clipped div.

BUG=416367

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

Cr-Commit-Position: refs/heads/master@{#297082}
parent 360b06ad
...@@ -1422,15 +1422,13 @@ bool GLRenderer::SetupQuadForAntialiasing( ...@@ -1422,15 +1422,13 @@ bool GLRenderer::SetupQuadForAntialiasing(
gfx::PointF top_left = tile_rect.origin(); gfx::PointF top_left = tile_rect.origin();
gfx::PointF top_right = tile_rect.top_right(); gfx::PointF top_right = tile_rect.top_right();
// Map points to device space. // Map points to device space. We ignore |clipped|, since the result of
// |MapPoint()| still produces a valid point to draw the quad with. When
// clipped, the point will be outside of the viewport. See crbug.com/416367.
bottom_right = MathUtil::MapPoint(device_transform, bottom_right, &clipped); bottom_right = MathUtil::MapPoint(device_transform, bottom_right, &clipped);
DCHECK(!clipped);
bottom_left = MathUtil::MapPoint(device_transform, bottom_left, &clipped); bottom_left = MathUtil::MapPoint(device_transform, bottom_left, &clipped);
DCHECK(!clipped);
top_left = MathUtil::MapPoint(device_transform, top_left, &clipped); top_left = MathUtil::MapPoint(device_transform, top_left, &clipped);
DCHECK(!clipped);
top_right = MathUtil::MapPoint(device_transform, top_right, &clipped); top_right = MathUtil::MapPoint(device_transform, top_right, &clipped);
DCHECK(!clipped);
LayerQuad::Edge bottom_edge(bottom_right, bottom_left); LayerQuad::Edge bottom_edge(bottom_right, bottom_left);
LayerQuad::Edge left_edge(bottom_left, top_left); LayerQuad::Edge left_edge(bottom_left, top_left);
......
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