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

Unified Diff: cc/priority_calculator.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/priority_calculator.cc
diff --git a/cc/priority_calculator.cc b/cc/priority_calculator.cc
index e2bb0c7057bb68a9a5adcb98b162f1b6518124e4..fc680ad39f2e83be47cad78892390f640b6869fa 100644
--- a/cc/priority_calculator.cc
+++ b/cc/priority_calculator.cc
@@ -67,9 +67,9 @@ int PriorityCalculator::lingeringPriority(int previousPriority)
}
namespace {
-int manhattanDistance(const IntRect& a, const IntRect& b)
+int manhattanDistance(const gfx::Rect& a, const gfx::Rect& b)
{
- IntRect c = unionRect(a, b);
+ gfx::Rect c = gfx::UnionRects(a, b);
int x = max(0, c.width() - a.width() - b.width() + 1);
int y = max(0, c.height() - a.height() - b.height() + 1);
return (x + y);
@@ -77,7 +77,7 @@ int manhattanDistance(const IntRect& a, const IntRect& b)
}
// static
-int PriorityCalculator::priorityFromDistance(const IntRect& visibleRect, const IntRect& textureRect, bool drawsToRootSurface)
+int PriorityCalculator::priorityFromDistance(const gfx::Rect& visibleRect, const gfx::Rect& textureRect, bool drawsToRootSurface)
{
int distance = manhattanDistance(visibleRect, textureRect);
if (!distance)
« cc/layer_tiling_data.cc ('K') | « cc/priority_calculator.h ('k') | cc/proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698