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

Unified Diff: cc/tiled_layer.cc

Issue 11266030: Use gfx:: Geometry types for the resource provider and layer updater classes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: uint8 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
« no previous file with comments | « cc/texture_uploader_unittest.cc ('k') | cc/tiled_layer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/tiled_layer.cc
diff --git a/cc/tiled_layer.cc b/cc/tiled_layer.cc
index e9a15a5f60cbce6408f5c1fc2c7be1b7a46b4701..b21d9115435c38b7b345da1300e3e8fe41829fec 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)
« no previous file with comments | « cc/texture_uploader_unittest.cc ('k') | cc/tiled_layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698