diff options
author | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-03 02:59:15 +0000 |
---|---|---|
committer | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-03 02:59:15 +0000 |
commit | 0d8a30509157c2dd62fceec486ea4abc0efe2134 (patch) | |
tree | 6ce8c9dafdfeed76ede03c34090960023e977fa2 /cc/tiled_layer.cc | |
parent | 03b502870bdcbdfc0d9a9494d7f45194448427cf (diff) | |
download | chromium_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/tiled_layer.cc')
-rw-r--r-- | cc/tiled_layer.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/cc/tiled_layer.cc b/cc/tiled_layer.cc index ae13eeb..74d1402 100644 --- a/cc/tiled_layer.cc +++ b/cc/tiled_layer.cc @@ -151,9 +151,8 @@ void TiledLayer::updateBounds() Region oldRegion = gfx::Rect(gfx::Point(), oldBounds); Region newRegion = gfx::Rect(gfx::Point(), newBounds); newRegion.Subtract(oldRegion); - Vector<WebCore::IntRect> rects = newRegion.rects(); - for (size_t i = 0; i < rects.size(); ++i) - invalidateContentRect(cc::IntRect(rects[i])); + for (Region::Iterator newRects(newRegion); newRects.has_rect(); newRects.next()) + invalidateContentRect(newRects.rect()); } void TiledLayer::setTileSize(const gfx::Size& size) |