Index: cc/resources/tile.h |
diff --git a/cc/resources/tile.h b/cc/resources/tile.h |
index 716ea99024703a4e4e8b0363d8d427201770ff6a..93e704b48182a33470befcef7602f8d0bfcbdb1c 100644 |
--- a/cc/resources/tile.h |
+++ b/cc/resources/tile.h |
@@ -60,6 +60,25 @@ class CC_EXPORT Tile : public RefCountedManaged<Tile> { |
void SetPriority(WhichTree tree, const TilePriority& priority); |
+ void set_is_occluded(WhichTree tree, bool is_occluded) { |
+ is_occluded_[tree] = is_occluded; |
+ } |
+ |
+ bool is_occluded(WhichTree tree) const { return is_occluded_[tree]; } |
+ |
+ bool is_occluded_for_tree_priority(TreePriority tree_priority) const { |
+ switch (tree_priority) { |
+ case SMOOTHNESS_TAKES_PRIORITY: |
+ return is_occluded_[ACTIVE_TREE]; |
+ case NEW_CONTENT_TAKES_PRIORITY: |
+ return is_occluded_[PENDING_TREE]; |
+ case SAME_PRIORITY_FOR_BOTH_TREES: |
+ return is_occluded_[ACTIVE_TREE] && is_occluded_[PENDING_TREE]; |
+ } |
+ NOTREACHED(); |
+ return false; |
+ } |
+ |
void MarkRequiredForActivation(); |
bool required_for_activation() const { |
@@ -128,12 +147,6 @@ class CC_EXPORT Tile : public RefCountedManaged<Tile> { |
return managed_state_.tile_versions[mode]; |
} |
- void set_is_occluded(WhichTree tree, bool is_occluded) { |
- is_occluded_[tree] = is_occluded; |
- } |
- |
- bool is_occluded(WhichTree tree) const { return is_occluded_[tree]; } |
- |
private: |
friend class TileManager; |
friend class PrioritizedTileSet; |