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

Unified Diff: cc/overdraw_metrics.cc

Issue 11308153: Migrate most of cc/ from WebKit::WebTransformationMatrix to gfx::Transform (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased to tip of tree and addressed feedback 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
Index: cc/overdraw_metrics.cc
diff --git a/cc/overdraw_metrics.cc b/cc/overdraw_metrics.cc
index 1f9435784bc7e451b79d528dd1665b2e52e92bf1..5e6dea4ced76e2cf48d2eb4ae05ccb9853a0fc07 100644
--- a/cc/overdraw_metrics.cc
+++ b/cc/overdraw_metrics.cc
@@ -11,9 +11,9 @@
#include "cc/math_util.h"
#include "ui/gfx/quad_f.h"
#include "ui/gfx/rect.h"
-#include <public/WebTransformationMatrix.h>
+#include "ui/gfx/transform.h"
-using WebKit::WebTransformationMatrix;
+using gfx::Transform;
namespace cc {
@@ -49,7 +49,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 gfx::QuadF& quad)
+static inline float areaOfMappedQuad(const Transform& transform, const gfx::QuadF& quad)
{
gfx::PointF clippedQuad[8];
int numVerticesInClippedQuad = 0;
@@ -71,7 +71,7 @@ void OverdrawMetrics::didCullTilesForUpload(int count)
m_tilesCulledForUpload += count;
}
-void OverdrawMetrics::didUpload(const WebTransformationMatrix& transformToTarget, const gfx::Rect& uploadRect, const gfx::Rect& opaqueRect)
+void OverdrawMetrics::didUpload(const Transform& transformToTarget, const gfx::Rect& uploadRect, const gfx::Rect& opaqueRect)
{
if (!m_recordMetricsForFrame)
return;
@@ -99,7 +99,7 @@ void OverdrawMetrics::didUseRenderSurfaceTextureMemoryBytes(size_t renderSurface
m_renderSurfaceTextureUseBytes += renderSurfaceUseBytes;
}
-void OverdrawMetrics::didCullForDrawing(const WebTransformationMatrix& transformToTarget, const gfx::Rect& beforeCullRect, const gfx::Rect& afterCullRect)
+void OverdrawMetrics::didCullForDrawing(const Transform& transformToTarget, const gfx::Rect& beforeCullRect, const gfx::Rect& afterCullRect)
{
if (!m_recordMetricsForFrame)
return;
@@ -110,7 +110,7 @@ void OverdrawMetrics::didCullForDrawing(const WebTransformationMatrix& transform
m_pixelsCulledForDrawing += beforeCullArea - afterCullArea;
}
-void OverdrawMetrics::didDraw(const WebTransformationMatrix& transformToTarget, const gfx::Rect& afterCullRect, const gfx::Rect& opaqueRect)
+void OverdrawMetrics::didDraw(const Transform& transformToTarget, const gfx::Rect& afterCullRect, const gfx::Rect& opaqueRect)
{
if (!m_recordMetricsForFrame)
return;

Powered by Google App Engine
This is Rietveld 408576698