summaryrefslogtreecommitdiffstats
path: root/cc/test/layer_test_common.cc
diff options
context:
space:
mode:
authordanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-03 02:59:15 +0000
committerdanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-03 02:59:15 +0000
commit0d8a30509157c2dd62fceec486ea4abc0efe2134 (patch)
tree6ce8c9dafdfeed76ede03c34090960023e977fa2 /cc/test/layer_test_common.cc
parent03b502870bdcbdfc0d9a9494d7f45194448427cf (diff)
downloadchromium_src-0d8a30509157c2dd62fceec486ea4abc0efe2134.zip
chromium_src-0d8a30509157c2dd62fceec486ea4abc0efe2134.tar.gz
chromium_src-0d8a30509157c2dd62fceec486ea4abc0efe2134.tar.bz2
cc: Remove WebCore rect use from the compositor, except within Region.
This replaces the last cases of FloatRect with gfx::RectF. It depends on the IsExpressibleAsRect() method in https://codereview.chromium.org/11364054/ and removes the stubs as well! We add an API to the Region class that is intended to be our final Region class interface. It uses an iterator to walk the rects in the Region, which is compatible with the SkRegion API, but can also hide the IntRects exposed by the WebCore Region API. Once this is done, there is no need to use cc::IntRect, and we can remove it entirely. Covered by existing tests; no change in behaviour. BUG=147395 R=enne Review URL: https://codereview.chromium.org/11360066 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165837 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/test/layer_test_common.cc')
-rw-r--r--cc/test/layer_test_common.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/cc/test/layer_test_common.cc b/cc/test/layer_test_common.cc
index 7208377..3fe716f 100644
--- a/cc/test/layer_test_common.cc
+++ b/cc/test/layer_test_common.cc
@@ -6,7 +6,6 @@
#include "cc/test/layer_test_common.h"
-#include "FloatRect.h"
#include "Region.h"
#include "cc/draw_quad.h"
#include "cc/math_util.h"
@@ -25,12 +24,11 @@ const char* quadString = " Quad: ";
bool canRectFBeSafelyRoundedToRect(const gfx::RectF& r)
{
// Ensure that range of float values is not beyond integer range.
- if (!cc::FloatRect(r).isExpressibleAsIntRect())
+ if (!r.IsExpressibleAsRect())
return false;
// Ensure that the values are actually integers.
- if (gfx::ToFlooredPoint(r.origin()) == r.origin()
- && gfx::ToFlooredSize(r.size()) == r.size())
+ if (gfx::ToFlooredPoint(r.origin()) == r.origin() && gfx::ToFlooredSize(r.size()) == r.size())
return true;
return false;