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

Unified Diff: cc/CCRendererGL.cpp

Issue 11051029: [cc] Fix zebra-stripe compositor checkerboarding (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/CCRendererGL.cpp
diff --git a/cc/CCRendererGL.cpp b/cc/CCRendererGL.cpp
index c80533c4ebeda65ea60203df88f75b30502436aa..f28cc50c2f48b7f6c8025f45cc77f29c7df094d4 100644
--- a/cc/CCRendererGL.cpp
+++ b/cc/CCRendererGL.cpp
@@ -287,16 +287,16 @@ void CCRendererGL::drawCheckerboardQuad(const DrawingFrame& frame, const CCCheck
SkColor color = quad->color();
GLC(context(), context()->uniform4f(program->fragmentShader().colorLocation(), SkColorGetR(color) / 255.0, SkColorGetG(color) / 255.0, SkColorGetB(color) / 255.0, 1));
+ const int checkerboardWidth = 16;
+ float frequency = 1.0 / checkerboardWidth;
+
IntRect tileRect = quad->quadRect();
- float texOffsetX = tileRect.x();
- float texOffsetY = tileRect.y();
+ float texOffsetX = tileRect.x() % checkerboardWidth;
+ float texOffsetY = tileRect.y() % checkerboardWidth;
float texScaleX = tileRect.width();
float texScaleY = tileRect.height();
GLC(context(), context()->uniform4f(program->fragmentShader().texTransformLocation(), texOffsetX, texOffsetY, texScaleX, texScaleY));
- const int checkerboardWidth = 16;
- float frequency = 1.0 / checkerboardWidth;
-
GLC(context(), context()->uniform1f(program->fragmentShader().frequencyLocation(), frequency));
setShaderOpacity(quad->opacity(), program->fragmentShader().alphaLocation());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698