Chromium Code Reviews| Index: cc/resources/tile.h |
| diff --git a/cc/resources/tile.h b/cc/resources/tile.h |
| index a35cffe86f5fa0e59c6f4ee9a5566f8eed775e4e..576146760235dfea5acfc6e53c3bc5a9bec7e605 100644 |
| --- a/cc/resources/tile.h |
| +++ b/cc/resources/tile.h |
| @@ -7,8 +7,8 @@ |
| #include "base/memory/ref_counted.h" |
| #include "cc/base/ref_counted_managed.h" |
| -#include "cc/resources/managed_tile_state.h" |
| #include "cc/resources/raster_source.h" |
| +#include "cc/resources/tile_draw_info.h" |
| #include "cc/resources/tile_priority.h" |
| #include "ui/gfx/geometry/rect.h" |
| #include "ui/gfx/geometry/size.h" |
| @@ -96,24 +96,20 @@ class CC_EXPORT Tile : public RefCountedManaged<Tile> { |
| return !!(flags_ & USE_PICTURE_ANALYSIS); |
| } |
| - bool HasResources() const { return managed_state_.draw_info.has_resource(); } |
| + bool HasActiveTask() const { return raster_task.get() != 0; } |
|
vmpstr
2014/12/18 21:34:13
This is the same as HasRasterTask.
JungJik
2014/12/19 10:06:50
Done.
|
| + bool HasResource() const { return draw_info_.has_resource(); } |
| bool NeedsRaster() const { |
| - return managed_state_.draw_info.mode() == |
| - ManagedTileState::DrawInfo::PICTURE_PILE_MODE || |
| - !managed_state_.draw_info.IsReadyToDraw(); |
| + return draw_info_.mode() == TileDrawInfo::PICTURE_PILE_MODE || |
| + !draw_info_.IsReadyToDraw(); |
| } |
| void AsValueInto(base::debug::TracedValue* dict) const; |
| - inline bool IsReadyToDraw() const { |
| - return managed_state_.draw_info.IsReadyToDraw(); |
| - } |
| + inline bool IsReadyToDraw() const { return draw_info_.IsReadyToDraw(); } |
| - const ManagedTileState::DrawInfo& draw_info() const { |
| - return managed_state_.draw_info; |
| - } |
| + const TileDrawInfo& draw_info() const { return draw_info_; } |
| - ManagedTileState::DrawInfo& draw_info() { return managed_state_.draw_info; } |
| + TileDrawInfo& draw_info() { return draw_info_; } |
| float contents_scale() const { return contents_scale_; } |
| gfx::Rect content_rect() const { return content_rect_; } |
| @@ -159,9 +155,6 @@ class CC_EXPORT Tile : public RefCountedManaged<Tile> { |
| int flags); |
| ~Tile(); |
| - ManagedTileState& managed_state() { return managed_state_; } |
| - const ManagedTileState& managed_state() const { return managed_state_; } |
| - |
| bool HasRasterTask() const; |
| TileManager* tile_manager_; |
| @@ -172,7 +165,8 @@ class CC_EXPORT Tile : public RefCountedManaged<Tile> { |
| bool is_occluded_[NUM_TREES]; |
| TilePriority priority_[NUM_TREES]; |
| - ManagedTileState managed_state_; |
| + TileDrawInfo draw_info_; |
| + |
| int layer_id_; |
| int source_frame_number_; |
| int flags_; |
| @@ -185,6 +179,10 @@ class CC_EXPORT Tile : public RefCountedManaged<Tile> { |
| Id id_; |
| static Id s_next_id_; |
| + unsigned scheduled_priority; |
|
vmpstr
2014/12/18 21:34:13
This should have a trailing underscore.
JungJik
2014/12/19 10:06:50
Done.
|
| + |
| + scoped_refptr<RasterTask> raster_task; |
|
vmpstr
2014/12/18 21:34:13
This should have a trailing underscore.
JungJik
2014/12/19 10:06:50
Done. PTAL. thanks for the review.
|
| + |
| DISALLOW_COPY_AND_ASSIGN(Tile); |
| }; |