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

Unified Diff: cc/overdraw_metrics.cc

Issue 11364044: cc: Replace WebCore::FloatQuad with gfx::QuadF. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reeebase. 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.cc ('k') | cc/renderer.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 3e16f26816f9de9a9fca92014a3988a60b5f7e7d..9509bfaa73473e9e28bb153545934925187a4f66 100644
--- a/cc/overdraw_metrics.cc
+++ b/cc/overdraw_metrics.cc
@@ -6,12 +6,12 @@
#include "cc/overdraw_metrics.h"
-#include "FloatQuad.h"
#include "base/debug/trace_event.h"
#include "base/metrics/histogram.h"
#include "cc/layer_tree_host.h"
#include "cc/layer_tree_host_impl.h"
#include "cc/math_util.h"
+#include "ui/gfx/quad_f.h"
#include "ui/gfx/rect.h"
#include <public/WebTransformationMatrix.h>
@@ -51,7 +51,7 @@ static inline float polygonArea(const gfx::PointF 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)
+static inline float areaOfMappedQuad(const WebTransformationMatrix& transform, const gfx::QuadF& quad)
{
gfx::PointF clippedQuad[8];
int numVerticesInClippedQuad = 0;
@@ -78,8 +78,8 @@ void OverdrawMetrics::didUpload(const WebTransformationMatrix& transformToTarget
if (!m_recordMetricsForFrame)
return;
- float uploadArea = areaOfMappedQuad(transformToTarget, FloatQuad(uploadRect));
- float uploadOpaqueArea = areaOfMappedQuad(transformToTarget, FloatQuad(gfx::IntersectRects(opaqueRect, uploadRect)));
+ float uploadArea = areaOfMappedQuad(transformToTarget, gfx::QuadF(uploadRect));
+ float uploadOpaqueArea = areaOfMappedQuad(transformToTarget, gfx::QuadF(gfx::IntersectRects(opaqueRect, uploadRect)));
m_pixelsUploadedOpaque += uploadOpaqueArea;
m_pixelsUploadedTranslucent += uploadArea - uploadOpaqueArea;
@@ -106,8 +106,8 @@ void OverdrawMetrics::didCullForDrawing(const WebTransformationMatrix& transform
if (!m_recordMetricsForFrame)
return;
- float beforeCullArea = areaOfMappedQuad(transformToTarget, FloatQuad(beforeCullRect));
- float afterCullArea = areaOfMappedQuad(transformToTarget, FloatQuad(afterCullRect));
+ float beforeCullArea = areaOfMappedQuad(transformToTarget, gfx::QuadF(beforeCullRect));
+ float afterCullArea = areaOfMappedQuad(transformToTarget, gfx::QuadF(afterCullRect));
m_pixelsCulledForDrawing += beforeCullArea - afterCullArea;
}
@@ -117,8 +117,8 @@ void OverdrawMetrics::didDraw(const WebTransformationMatrix& transformToTarget,
if (!m_recordMetricsForFrame)
return;
- float afterCullArea = areaOfMappedQuad(transformToTarget, FloatQuad(afterCullRect));
- float afterCullOpaqueArea = areaOfMappedQuad(transformToTarget, FloatQuad(gfx::IntersectRects(opaqueRect, afterCullRect)));
+ float afterCullArea = areaOfMappedQuad(transformToTarget, gfx::QuadF(afterCullRect));
+ float afterCullOpaqueArea = areaOfMappedQuad(transformToTarget, gfx::QuadF(gfx::IntersectRects(opaqueRect, afterCullRect)));
m_pixelsDrawnOpaque += afterCullOpaqueArea;
m_pixelsDrawnTranslucent += afterCullArea - afterCullOpaqueArea;
« no previous file with comments | « cc/occlusion_tracker.cc ('k') | cc/renderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698