diff options
author | shawnsingh@chromium.org <shawnsingh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-20 23:36:50 +0000 |
---|---|---|
committer | shawnsingh@chromium.org <shawnsingh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-20 23:36:50 +0000 |
commit | bc85755e10364fb856bd9af645d096b014a8c414 (patch) | |
tree | 09f85c8377e7409027a3d4a2e6c2ef1c12029760 /cc/output/gl_renderer.cc | |
parent | 7efcf4778015c956e9d24316f9f0405497f41cc0 (diff) | |
download | chromium_src-bc85755e10364fb856bd9af645d096b014a8c414.zip chromium_src-bc85755e10364fb856bd9af645d096b014a8c414.tar.gz chromium_src-bc85755e10364fb856bd9af645d096b014a8c414.tar.bz2 |
Do not use antialiasing code path for surfaces if there is a perspective w<0 clipping status
At this time, the antialiasing shader does not work when the quad+transform
being rendered would have triggered a w<0 clipping issue. This patch adds the
condition to prevent antialiasing, and adds a test for this scenario.
BUG=237892
Review URL: https://chromiumcodereview.appspot.com/14735012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201169 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/output/gl_renderer.cc')
-rw-r--r-- | cc/output/gl_renderer.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/cc/output/gl_renderer.cc b/cc/output/gl_renderer.cc index 34807ff..b3d51ee 100644 --- a/cc/output/gl_renderer.cc +++ b/cc/output/gl_renderer.cc @@ -734,14 +734,14 @@ void GLRenderer::DrawRenderPassQuad(DrawingFrame* frame, bool clipped = false; gfx::QuadF device_quad = MathUtil::MapQuad( contents_device_transform, SharedGeometryQuad(), &clipped); - DCHECK(!clipped); LayerQuad device_layer_bounds(gfx::QuadF(device_quad.BoundingBox())); LayerQuad device_layer_edges(device_quad); // Use anti-aliasing programs only when necessary. - bool use_aa = (!device_quad.IsRectilinear() || - !gfx::IsNearestRectWithinDistance(device_quad.BoundingBox(), - kAntiAliasingEpsilon)); + bool use_aa = !clipped && + (!device_quad.IsRectilinear() || + !gfx::IsNearestRectWithinDistance(device_quad.BoundingBox(), + kAntiAliasingEpsilon)); if (use_aa) { device_layer_bounds.InflateAntiAliasingDistance(); device_layer_edges.InflateAntiAliasingDistance(); @@ -992,7 +992,6 @@ void GLRenderer::DrawRenderPassQuad(DrawingFrame* frame, gfx::QuadF surface_quad = MathUtil::MapQuad(contents_device_transform_inverse, device_layer_edges.ToQuadF(), &clipped); - DCHECK(!clipped); SetShaderOpacity(quad->opacity(), shader_alpha_location); SetShaderQuadF(surface_quad, shader_quad_location); |