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

Unified Diff: cc/layer_quad.cc

Issue 11264056: cc: Use gfx:: Geometry types for positions, bounds, and related things. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: some missed intstuff 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
Index: cc/layer_quad.cc
diff --git a/cc/layer_quad.cc b/cc/layer_quad.cc
index 2618a7724e6fb8157a596d23fcc4022715364db3..c5063a75ad47f2f2652818c9817b12695c6d20df 100644
--- a/cc/layer_quad.cc
+++ b/cc/layer_quad.cc
@@ -4,21 +4,22 @@
#include "config.h"
+#include "cc/geometry.h"
#include "cc/layer_quad.h"
#include "base/logging.h"
namespace cc {
-LayerQuad::Edge::Edge(const FloatPoint& p, const FloatPoint& q)
+LayerQuad::Edge::Edge(const gfx::PointF& p, const gfx::PointF& q)
{
DCHECK(p != q);
- FloatPoint tangent(p.y() - q.y(), q.x() - p.x());
+ gfx::Vector2dF tangent(p.y() - q.y(), q.x() - p.x());
float cross2 = p.x() * q.y() - q.x() * p.y();
set(tangent.x(), tangent.y(), cross2);
- scale(1.0f / tangent.length());
+ scale(1.0f / Length(tangent));
}
LayerQuad::LayerQuad(const FloatQuad& quad)

Powered by Google App Engine
This is Rietveld 408576698