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

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: ScaleAsVector 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/occlusion_tracker_unittest.cc ('k') | cc/priority_calculator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/overdraw_metrics.cc
diff --git a/cc/overdraw_metrics.cc b/cc/overdraw_metrics.cc
index 14d36ceae4a405e55789a3f69af7d6b3434ada48..4c4f2be6c7bc2fb57072fac3a8ff1c30e453ccfa 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);
« no previous file with comments | « cc/occlusion_tracker_unittest.cc ('k') | cc/priority_calculator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698