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

Unified Diff: cc/overdraw_metrics.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/overdraw_metrics.cc
diff --git a/cc/overdraw_metrics.cc b/cc/overdraw_metrics.cc
index 2d44bb1244e4c59daa8869cbe640192c017e590d..071a84c2b0c3c94796dc43184a3612f66880c212 100644
--- a/cc/overdraw_metrics.cc
+++ b/cc/overdraw_metrics.cc
@@ -33,13 +33,13 @@ OverdrawMetrics::OverdrawMetrics(bool recordMetricsForFrame)
{
}
-static inline float wedgeProduct(const FloatPoint& p1, const FloatPoint& p2)
+static inline float wedgeProduct(const gfx::PointF& p1, const gfx::PointF& p2)
{
return p1.x() * p2.y() - p1.y() * p2.x();
}
// Calculates area of an arbitrary convex polygon with up to 8 points.
-static inline float polygonArea(const FloatPoint points[8], int numPoints)
+static inline float polygonArea(const gfx::PointF points[8], int numPoints)
{
if (numPoints < 3)
return 0;
@@ -53,7 +53,7 @@ static inline float polygonArea(const FloatPoint points[8], int numPoints)
// Takes a given quad, maps it by the given transformation, and gives the area of the resulting polygon.
static inline float areaOfMappedQuad(const WebTransformationMatrix& transform, const FloatQuad& quad)
{
- FloatPoint clippedQuad[8];
+ gfx::PointF clippedQuad[8];
int numVerticesInClippedQuad = 0;
MathUtil::mapClippedQuad(transform, quad, clippedQuad, numVerticesInClippedQuad);
return polygonArea(clippedQuad, numVerticesInClippedQuad);

Powered by Google App Engine
This is Rietveld 408576698