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

Unified Diff: cc/picture_layer_tiling.h

Issue 12289020: cc: Make the TileManager operate on ManagedTileState directly (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix clang dtor nits Created 7 years, 10 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 | « no previous file | cc/picture_layer_tiling.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/picture_layer_tiling.h
diff --git a/cc/picture_layer_tiling.h b/cc/picture_layer_tiling.h
index bf504b8386ba13362a05668c8d45143f5feee3db..bd1c21af9b1cfc5a9fc547a16e5a192a4b941335 100644
--- a/cc/picture_layer_tiling.h
+++ b/cc/picture_layer_tiling.h
@@ -19,6 +19,7 @@
namespace cc {
class PictureLayerTiling;
+class ManagedTileState;
class PictureLayerTilingClient {
public:
@@ -33,6 +34,16 @@ class PictureLayerTilingClient {
gfx::Size content_bounds) = 0;
};
+class TileHandle {
+ public:
+ TileHandle(scoped_refptr<Tile> tile);
+ ~TileHandle();
+ Tile* tile() const { return tile_.get(); }
+ private:
+ scoped_refptr<Tile> tile_;
+ scoped_refptr<ManagedTileState> managed_tile_state_;
+};
+
class CC_EXPORT PictureLayerTiling {
public:
~PictureLayerTiling();
@@ -61,7 +72,7 @@ class CC_EXPORT PictureLayerTiling {
std::vector<Tile*> all_tiles;
for (TileMap::const_iterator it = tiles_.begin();
it != tiles_.end(); ++it)
- all_tiles.push_back(it->second);
+ all_tiles.push_back(it->second.tile());
return all_tiles;
}
@@ -148,7 +159,7 @@ class CC_EXPORT PictureLayerTiling {
protected:
typedef std::pair<int, int> TileMapKey;
- typedef base::hash_map<TileMapKey, scoped_refptr<Tile> > TileMap;
+ typedef base::hash_map<TileMapKey, TileHandle> TileMap;
PictureLayerTiling(float contents_scale);
Tile* TileAt(int, int) const;
« no previous file with comments | « no previous file | cc/picture_layer_tiling.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698