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

Unified Diff: cc/resources/tile.h

Issue 374653003: Track occlusion per tree on Tile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 29acf80a1e35d116e309dde63d4a9f3c8d5aa1a3..108756991d6962dd36d83afc1a7d997dba4666c7 100644
--- a/cc/resources/tile.h
+++ b/cc/resources/tile.h
@@ -128,8 +128,31 @@ class CC_EXPORT Tile : public RefCountedManaged<Tile> {
return managed_state_.tile_versions[mode];
}
- void set_is_occluded(bool is_occluded) { is_occluded_ = is_occluded; }
- bool is_occluded() const { return is_occluded_; }
+ void set_is_occluded(WhichTree tree, bool is_occluded) {
+ switch (tree) {
+ case ACTIVE_TREE:
+ is_occluded_on_active_tree_ = is_occluded;
+ break;
+ case PENDING_TREE:
+ is_occluded_on_pending_tree_ = is_occluded;
+ break;
+ default:
danakj 2014/07/07 19:26:29 don't use default: for enums, then we don't get co
+ NOTREACHED();
+ return;
+ }
+ }
+
+ bool is_occluded(WhichTree tree) const {
+ switch (tree) {
+ case ACTIVE_TREE:
+ return is_occluded_on_active_tree_;
enne (OOO) 2014/07/07 19:49:31 Should is_occluded just go on TilePriority so you
danakj 2014/07/07 20:08:04 FWIW, she did that originally but with vlad's new
+ case PENDING_TREE:
+ return is_occluded_on_pending_tree_;
+ default:
+ NOTREACHED();
danakj 2014/07/07 19:26:29 remove default: move this below the switch or alt
jbedley 2014/07/07 20:25:13 Done.
+ return false;
+ }
+ }
private:
friend class TileManager;
@@ -160,7 +183,8 @@ class CC_EXPORT Tile : public RefCountedManaged<Tile> {
gfx::Rect content_rect_;
float contents_scale_;
gfx::Rect opaque_rect_;
- bool is_occluded_;
+ bool is_occluded_on_active_tree_;
+ bool is_occluded_on_pending_tree_;
TilePriority priority_[NUM_TREES];
ManagedTileState managed_state_;

Powered by Google App Engine
This is Rietveld 408576698