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

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: Add TileManager unit test 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
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;

Powered by Google App Engine
This is Rietveld 408576698