Index: cc/resources/tile.h |
diff --git a/cc/resources/tile.h b/cc/resources/tile.h |
index dcc8566fe4b7692ec29a53ae0d9018f58c3b762c..33f369f43fcf0585dba5a85afbba77bda1cb783c 100644 |
--- a/cc/resources/tile.h |
+++ b/cc/resources/tile.h |
@@ -27,50 +27,17 @@ class CC_EXPORT Tile : public RefCountedManaged<Tile> { |
return id_; |
} |
- RasterSource* raster_source() { return raster_source_.get(); } |
+ RasterSource* raster_source() { return raster_source_->get(); } |
- const RasterSource* raster_source() const { return raster_source_.get(); } |
+ const RasterSource* raster_source() const { return raster_source_->get(); } |
- const TilePriority& priority(WhichTree tree) const { |
- return priority_[tree]; |
- } |
- |
- TilePriority priority_for_tree_priority(TreePriority tree_priority) const { |
- switch (tree_priority) { |
- case SMOOTHNESS_TAKES_PRIORITY: |
- return priority_[ACTIVE_TREE]; |
- case NEW_CONTENT_TAKES_PRIORITY: |
- return priority_[PENDING_TREE]; |
- case SAME_PRIORITY_FOR_BOTH_TREES: |
- return combined_priority(); |
- default: |
- NOTREACHED(); |
- return TilePriority(); |
- } |
- } |
+ const TilePriority& priority() const { return priority_; } |
- TilePriority combined_priority() const { |
- return TilePriority(priority_[ACTIVE_TREE], |
- priority_[PENDING_TREE]); |
- } |
- |
- void SetPriority(WhichTree tree, const TilePriority& priority) { |
- priority_[tree] = priority; |
- } |
+ void set_priority(const TilePriority& priority) { priority_ = priority; } |
// TODO(vmpstr): Move this to the iterators. |
- void set_is_occluded(WhichTree tree, bool is_occluded) { |
- is_occluded_[tree] = is_occluded; |
- } |
- |
- bool is_occluded(WhichTree tree) const { return is_occluded_[tree]; } |
- |
- void set_shared(bool is_shared) { is_shared_ = is_shared; } |
- bool is_shared() const { return is_shared_; } |
- |
- bool is_occluded_combined() const { |
- return is_occluded_[ACTIVE_TREE] && is_occluded_[PENDING_TREE]; |
- } |
+ void set_is_occluded(bool is_occluded) { is_occluded_ = is_occluded; } |
+ bool is_occluded() const { return is_occluded_; } |
// TODO(vmpstr): Move this to the iterators. |
bool required_for_activation() const { return required_for_activation_; } |
@@ -108,8 +75,8 @@ class CC_EXPORT Tile : public RefCountedManaged<Tile> { |
int source_frame_number() const { return source_frame_number_; } |
- void set_raster_source(scoped_refptr<RasterSource> raster_source) { |
- DCHECK(raster_source->CoversRect(content_rect_, contents_scale_)) |
+ void set_raster_source(scoped_refptr<RasterSource>* raster_source) { |
+ DCHECK((*raster_source)->CoversRect(content_rect_, contents_scale_)) |
<< "Recording rect: " |
<< gfx::ScaleToEnclosingRect(content_rect_, 1.f / contents_scale_) |
.ToString(); |
@@ -136,7 +103,7 @@ class CC_EXPORT Tile : public RefCountedManaged<Tile> { |
// Methods called by by tile manager. |
Tile(TileManager* tile_manager, |
- RasterSource* raster_source, |
+ scoped_refptr<RasterSource>* raster_source, |
const gfx::Size& desired_texture_size, |
const gfx::Rect& content_rect, |
float contents_scale, |
@@ -147,13 +114,13 @@ class CC_EXPORT Tile : public RefCountedManaged<Tile> { |
bool HasRasterTask() const { return !!raster_task_.get(); } |
- scoped_refptr<RasterSource> raster_source_; |
+ scoped_refptr<RasterSource>* raster_source_; |
gfx::Size desired_texture_size_; |
gfx::Rect content_rect_; |
float contents_scale_; |
- bool is_occluded_[LAST_TREE + 1]; |
+ bool is_occluded_; |
- TilePriority priority_[LAST_TREE + 1]; |
+ TilePriority priority_; |
TileDrawInfo draw_info_; |
int layer_id_; |
@@ -161,7 +128,6 @@ class CC_EXPORT Tile : public RefCountedManaged<Tile> { |
int flags_; |
int tiling_i_index_; |
int tiling_j_index_; |
- bool is_shared_ : 1; |
bool required_for_activation_ : 1; |
bool required_for_draw_ : 1; |