Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(979)

Unified Diff: cc/gl_renderer.cc

Issue 12086036: cc: Clamp texture coordinates in all tile shaders (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@snowscale
Patch Set: Complete. Use _SAT+MAD clamping again. Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/gl_renderer.h ('k') | cc/shader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/gl_renderer.cc
diff --git a/cc/gl_renderer.cc b/cc/gl_renderer.cc
index de6cfc169e3ee1571ba0c8f3119cc7d3354b15fa..b3bad726fbef27b43eb65f2414cddf9aa8695f15 100644
--- a/cc/gl_renderer.cc
+++ b/cc/gl_renderer.cc
@@ -873,18 +873,8 @@ void GLRenderer::drawTileQuad(const DrawingFrame& frame, const TileDrawQuad* qua
// We should not DCHECK(!clipped) here, because anti-aliasing inflation may cause deviceQuad to become
// clipped. To our knowledge this scenario does not need to be handled differently than the unclipped case.
} else {
- // Move fragment shader transform to vertex shader. We can do this while
- // still producing correct results as fragmentTexTransformLocation
- // should always be non-negative when tiles are transformed in a way
- // that could result in sampling outside the layer.
- vertexTexScaleX *= fragmentTexScaleX;
- vertexTexScaleY *= fragmentTexScaleY;
- vertexTexTranslateX *= fragmentTexScaleX;
- vertexTexTranslateY *= fragmentTexScaleY;
- vertexTexTranslateX += fragmentTexTranslateX;
- vertexTexTranslateY += fragmentTexTranslateY;
-
GLC(context(), context()->uniform4f(uniforms.vertexTexTransformLocation, vertexTexTranslateX, vertexTexTranslateY, vertexTexScaleX, vertexTexScaleY));
+ GLC(context(), context()->uniform4f(uniforms.fragmentTexTransformLocation, fragmentTexTranslateX, fragmentTexTranslateY, fragmentTexScaleX, fragmentTexScaleY));
localQuad = gfx::RectF(tileRect);
}
« no previous file with comments | « cc/gl_renderer.h ('k') | cc/shader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698