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

Unified Diff: cc/resources/tile.h

Issue 377793003: Consider occluded tiles during eviction with occluded as Tile property. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 5 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/resources/picture_layer_tiling.cc ('k') | cc/resources/tile_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/tile.h
diff --git a/cc/resources/tile.h b/cc/resources/tile.h
index b6d87b0c5d042fb20e066624f68d89d15ff7d3fb..9aeabfa190ae9b85b7ab1f6f1e595a361d9d9c62 100644
--- a/cc/resources/tile.h
+++ b/cc/resources/tile.h
@@ -48,9 +48,10 @@ class CC_EXPORT Tile : public RefCountedManaged<Tile> {
return priority_[PENDING_TREE];
case SAME_PRIORITY_FOR_BOTH_TREES:
return combined_priority();
+ default:
+ NOTREACHED();
+ return TilePriority();
}
- NOTREACHED();
- return TilePriority();
}
TilePriority combined_priority() const {
@@ -60,6 +61,26 @@ 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];
+ default:
+ NOTREACHED();
+ return false;
+ }
+ }
+
void MarkRequiredForActivation();
bool required_for_activation() const {
@@ -130,12 +151,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;
« no previous file with comments | « cc/resources/picture_layer_tiling.cc ('k') | cc/resources/tile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698