Chromium Code Reviews| Index: cc/tile.h |
| diff --git a/cc/tile.h b/cc/tile.h |
| index 1c988c2dc998e95910cb4de1493e23b793876bd8..b1970df7c796766de132eeaf9bd0fdc433ed9c5f 100644 |
| --- a/cc/tile.h |
| +++ b/cc/tile.h |
| @@ -10,7 +10,7 @@ |
| #include "base/memory/scoped_vector.h" |
| #include "cc/layer_tree_host_impl.h" |
| #include "cc/picture_pile_impl.h" |
| -#include "cc/resource_provider.h" |
| +#include "cc/tile_drawing_info.h" |
| #include "cc/tile_manager.h" |
| #include "cc/tile_priority.h" |
| #include "ui/gfx/rect.h" |
| @@ -51,20 +51,11 @@ class CC_EXPORT Tile : public base::RefCounted<Tile> { |
| scoped_ptr<base::Value> AsValue() const; |
| - // Returns 0 if not drawable. |
| - ResourceProvider::ResourceId GetResourceId() const { |
| - if (!managed_state_.resource) |
| - return 0; |
| - if (managed_state_.resource_is_being_initialized) |
| - return 0; |
| - |
| - return managed_state_.resource->id(); |
| - } |
| + const TileDrawingInfo& drawing_info() const { return drawing_info_; } |
| + TileDrawingInfo& drawing_info() { return drawing_info_; } |
| const gfx::Rect& opaque_rect() const { return opaque_rect_; } |
| - bool contents_swizzled() const { return managed_state_.contents_swizzled; } |
| - |
| float contents_scale() const { return contents_scale_; } |
| gfx::Rect content_rect() const { return content_rect_; } |
| @@ -81,10 +72,12 @@ class CC_EXPORT Tile : public base::RefCounted<Tile> { |
| // Methods called by by tile manager. |
| friend class TileManager; |
| friend class BinComparator; |
| + friend class TileDrawingInfo; |
| + |
| ManagedTileState& managed_state() { return managed_state_; } |
| const ManagedTileState& managed_state() const { return managed_state_; } |
| - inline size_t bytes_consumed_if_allocated() const { |
| + inline size_t bytes_consumed_if_texture_allocated() const { |
|
reveman
2013/03/07 22:02:14
I don't think you want to use texture here. textur
|
| DCHECK(format_ == GL_RGBA); |
| return 4 * tile_size_.width() * tile_size_.height(); |
| } |
| @@ -105,6 +98,7 @@ class CC_EXPORT Tile : public base::RefCounted<Tile> { |
| TilePriority priority_[NUM_BIN_PRIORITIES]; |
| ManagedTileState managed_state_; |
| int layer_id_; |
| + TileDrawingInfo drawing_info_; |
|
reveman
2013/03/07 22:02:14
The drawing state is maintained by the tile manage
|
| }; |
| } // namespace cc |