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

Unified Diff: cc/gl_renderer.cc

Issue 11358240: ui: Add methods to Rect classes to get points at each of the rect's corners. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update cc Created 8 years, 1 month 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/geometry.h ('k') | cc/layer_impl.cc » ('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 916e9e12995cca76b16ffc220e46e589a4e10d26..af67acf37434af45fc65738847f87b76eee34c5d 100644
--- a/cc/gl_renderer.cc
+++ b/cc/gl_renderer.cc
@@ -10,7 +10,6 @@
#include "base/string_util.h"
#include "build/build_config.h"
#include "cc/damage_tracker.h"
-#include "cc/geometry.h"
#include "cc/geometry_binding.h"
#include "cc/layer_quad.h"
#include "cc/math_util.h"
@@ -707,7 +706,7 @@ void GLRenderer::drawTileQuad(const DrawingFrame& frame, const TileDrawQuad* qua
// texCoordRect to match.
gfx::Vector2d topLeftDiff = tileRect.origin() - quad->rect.origin();
gfx::Vector2d bottomRightDiff =
- BottomRight(tileRect) - BottomRight(quad->rect);
+ tileRect.bottom_right() - quad->rect.bottom_right();
texCoordRect.Inset(topLeftDiff.x() / texToGeomScaleX,
topLeftDiff.y() / texToGeomScaleY,
-bottomRightDiff.x() / texToGeomScaleX,
@@ -797,10 +796,10 @@ void GLRenderer::drawTileQuad(const DrawingFrame& frame, const TileDrawQuad* qua
GLC(context(), context()->uniform4f(uniforms.vertexTexTransformLocation, vertexTexTranslateX, vertexTexTranslateY, vertexTexScaleX, vertexTexScaleY));
GLC(context(), context()->uniform4f(uniforms.fragmentTexTransformLocation, fragmentTexTranslateX, fragmentTexTranslateY, fragmentTexScaleX, fragmentTexScaleY));
- gfx::PointF bottomRight(tileRect.right(), tileRect.bottom());
- gfx::PointF bottomLeft(tileRect.x(), tileRect.bottom());
- gfx::PointF topLeft(tileRect.x(), tileRect.y());
- gfx::PointF topRight(tileRect.right(), tileRect.y());
+ gfx::PointF bottomRight = tileRect.bottom_right();
+ gfx::PointF bottomLeft = tileRect.bottom_left();
+ gfx::PointF topLeft = tileRect.origin();
+ gfx::PointF topRight = tileRect.top_right();
// Map points to device space.
bottomRight = MathUtil::mapPoint(deviceTransform, bottomRight, clipped);
« no previous file with comments | « cc/geometry.h ('k') | cc/layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698