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

Unified Diff: cc/output/gl_renderer.cc

Issue 2109333005: Use 'int' content quad coordinates all the way. (not for commit) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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/output/gl_renderer.cc
diff --git a/cc/output/gl_renderer.cc b/cc/output/gl_renderer.cc
index 5190e955130c73fb2af387b345e22efbaa67df8c..f8115c879feeca7b08c979bb5df121d26d6597e1 100644
--- a/cc/output/gl_renderer.cc
+++ b/cc/output/gl_renderer.cc
@@ -2059,15 +2059,26 @@ void GLRenderer::DrawContentQuadNoAA(const DrawingFrame* frame,
PrepareGeometry(CLIPPED_BINDING);
clipped_geometry_->InitializeCustomQuadWithUVs(
gfx::QuadF(gfx::RectF(quad->visible_rect)), gl_uv);
+ float gl_quad[8] = {
+ tile_quad.p4().x(), tile_quad.p4().y(), tile_quad.p1().x(),
+ tile_quad.p1().y(), tile_quad.p2().x(), tile_quad.p2().y(),
+ tile_quad.p3().x(), tile_quad.p3().y(),
+ };
+ gl_->Uniform2fv(uniforms.quad_location, 4, gl_quad);
} else {
PrepareGeometry(SHARED_BINDING);
+ float gl_quad[8] = {
+ quad->visible_rect.bottom_left().x(),
+ quad->visible_rect.bottom_left().y(),
+ quad->visible_rect.origin().x(),
+ quad->visible_rect.origin().y(),
+ quad->visible_rect.top_right().x(),
+ quad->visible_rect.top_right().y(),
+ quad->visible_rect.bottom_right().x(),
+ quad->visible_rect.bottom_right().y(),
+ };
+ gl_->Uniform2fv(uniforms.quad_location, 4, gl_quad);
}
- float gl_quad[8] = {
- tile_quad.p4().x(), tile_quad.p4().y(), tile_quad.p1().x(),
- tile_quad.p1().y(), tile_quad.p2().x(), tile_quad.p2().y(),
- tile_quad.p3().x(), tile_quad.p3().y(),
- };
- gl_->Uniform2fv(uniforms.quad_location, 4, gl_quad);
static float gl_matrix[16];
ToGLMatrix(&gl_matrix[0],
« 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