summaryrefslogtreecommitdiffstats
path: root/cc/tiled_layer.cc
diff options
context:
space:
mode:
authordanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-31 20:52:25 +0000
committerdanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-31 20:52:25 +0000
commitf809d3bb86532d666d6094497b5b7f93f3b32a9e (patch)
treee37a05eb364b08446fbdd4a11e77a79eabf48d02 /cc/tiled_layer.cc
parentd388fe22c8c1c6e80c990be37fe067634bfed7a9 (diff)
downloadchromium_src-f809d3bb86532d666d6094497b5b7f93f3b32a9e.zip
chromium_src-f809d3bb86532d666d6094497b5b7f93f3b32a9e.tar.gz
chromium_src-f809d3bb86532d666d6094497b5b7f93f3b32a9e.tar.bz2
Use gfx:: Geometry types for the resource provider and layer updater classes.
This depends on the gfx::Vector2d class from https://codereview.chromium.org/11269022/ Covered by existing tests, just changing data types. BUG=147395 R=enne Review URL: https://codereview.chromium.org/11266030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165225 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/tiled_layer.cc')
-rw-r--r--cc/tiled_layer.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/cc/tiled_layer.cc b/cc/tiled_layer.cc
index e9a15a5..b21d911 100644
--- a/cc/tiled_layer.cc
+++ b/cc/tiled_layer.cc
@@ -459,7 +459,7 @@ void TiledLayer::updateTileTextures(const IntRect& paintRect, int left, int top,
// However, we can't free the memory backing the SkCanvas until the paint finishes,
// so we grab a local reference here to hold the updater alive until the paint completes.
scoped_refptr<LayerUpdater> protector(updater());
- IntRect paintedOpaqueRect;
+ gfx::Rect paintedOpaqueRect;
updater()->prepareToUpdate(paintRect, m_tiler->tileSize(), 1 / widthScale, 1 / heightScale, paintedOpaqueRect, stats);
for (int j = top; j <= bottom; ++j) {
@@ -480,7 +480,7 @@ void TiledLayer::updateTileTextures(const IntRect& paintRect, int left, int top,
// Save what was painted opaque in the tile. Keep the old area if the paint didn't touch it, and didn't paint some
// other part of the tile opaque.
IntRect tilePaintedRect = intersection(tileRect, paintRect);
- IntRect tilePaintedOpaqueRect = intersection(tileRect, paintedOpaqueRect);
+ IntRect tilePaintedOpaqueRect = intersection(tileRect, cc::IntRect(paintedOpaqueRect));
if (!tilePaintedRect.isEmpty()) {
IntRect paintInsideTileOpaqueRect = intersection(tile->opaqueRect(), tilePaintedRect);
bool paintInsideTileOpaqueRectIsNonOpaque = !tilePaintedOpaqueRect.contains(paintInsideTileOpaqueRect);
@@ -505,14 +505,14 @@ void TiledLayer::updateTileTextures(const IntRect& paintRect, int left, int top,
const IntPoint anchor = m_tiler->tileRect(tile).location();
// Calculate tile-space rectangle to upload into.
- IntSize destOffset(sourceRect.x() - anchor.x(), sourceRect.y() - anchor.y());
- if (destOffset.width() < 0)
+ gfx::Vector2d destOffset(sourceRect.x() - anchor.x(), sourceRect.y() - anchor.y());
+ if (destOffset.x() < 0)
CRASH();
- if (destOffset.height() < 0)
+ if (destOffset.y() < 0)
CRASH();
// Offset from paint rectangle to this tile's dirty rectangle.
- IntPoint paintOffset(sourceRect.x() - paintRect.x(), sourceRect.y() - paintRect.y());
+ gfx::Vector2d paintOffset(sourceRect.x() - paintRect.x(), sourceRect.y() - paintRect.y());
if (paintOffset.x() < 0)
CRASH();
if (paintOffset.y() < 0)