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

Unified Diff: cc/tile.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 | « cc/picture_layer_tiling_set_unittest.cc ('k') | cc/tile.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/tile.h
diff --git a/cc/tile.h b/cc/tile.h
index 9d2c2f07a664cd3c2ad0cfca396969eac1e84144..358105927a803c8484d6d43f81dfe6a2358543bc 100644
--- a/cc/tile.h
+++ b/cc/tile.h
@@ -30,6 +30,10 @@ class CC_EXPORT Tile : public base::RefCounted<Tile> {
gfx::Rect opaque_rect,
float contents_scale);
+ TileManager* tile_manager() {
+ return tile_manager_;
+ }
+
PicturePileImpl* picture_pile() {
return picture_pile_.get();
}
@@ -52,17 +56,19 @@ class CC_EXPORT Tile : public base::RefCounted<Tile> {
// Returns 0 if not drawable.
ResourceProvider::ResourceId GetResourceId() const {
- if (!managed_state_.resource)
+ if (!managed_state_)
+ return 0;
+ if (!managed_state_->resource)
return 0;
- if (managed_state_.resource_is_being_initialized)
+ if (managed_state_->resource_is_being_initialized)
return 0;
- return managed_state_.resource->id();
+ return managed_state_->resource->id();
}
const gfx::Rect& opaque_rect() const { return opaque_rect_; }
- bool contents_swizzled() const { return managed_state_.contents_swizzled; }
+ bool contents_swizzled() const { return managed_state_->contents_swizzled; }
float contents_scale() const { return contents_scale_; }
gfx::Rect content_rect() const { return content_rect_; }
@@ -71,14 +77,14 @@ class CC_EXPORT Tile : public base::RefCounted<Tile> {
picture_pile_ = pile;
}
- ManagedTileState& ManagedStateForTesting() { return managed_state_; }
+ ManagedTileState* ManagedStateForTesting() { return managed_state_; }
private:
// Methods called by by tile manager.
friend class TileManager;
friend class BinComparator;
- ManagedTileState& managed_state() { return managed_state_; }
- const ManagedTileState& managed_state() const { return managed_state_; }
+ ManagedTileState* managed_state() { return managed_state_; }
+ const ManagedTileState* managed_state() const { return managed_state_; }
inline size_t bytes_consumed_if_allocated() const {
DCHECK(format_ == GL_RGBA);
@@ -99,7 +105,7 @@ class CC_EXPORT Tile : public base::RefCounted<Tile> {
gfx::Rect opaque_rect_;
TilePriority priority_[NUM_BIN_PRIORITIES];
- ManagedTileState managed_state_;
+ ManagedTileState* managed_state_;
};
} // namespace cc
« no previous file with comments | « cc/picture_layer_tiling_set_unittest.cc ('k') | cc/tile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698