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

Unified Diff: cc/resources/tile.cc

Issue 343463004: Move occlusion info to TilePriority. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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.cc
diff --git a/cc/resources/tile.cc b/cc/resources/tile.cc
index 781d00899e13935ee458a7c6cef28c082d17c273..0a604e901c9861d95b018769386cc33077575ce0 100644
--- a/cc/resources/tile.cc
+++ b/cc/resources/tile.cc
@@ -30,7 +30,6 @@ Tile::Tile(TileManager* tile_manager,
content_rect_(content_rect),
contents_scale_(contents_scale),
opaque_rect_(opaque_rect),
- is_occluded_(false),
layer_id_(layer_id),
source_frame_number_(source_frame_number),
flags_(flags),
@@ -60,6 +59,14 @@ void Tile::MarkRequiredForActivation() {
tile_manager_->DidChangeTilePriority(this);
}
+void Tile::SetIsOccluded(WhichTree tree, bool occluded) {
+ if (priority_[tree].is_occluded == occluded)
+ return;
+
+ priority_[tree].is_occluded = occluded;
+ tile_manager_->DidChangeTilePriority(this);
+}
+
scoped_ptr<base::Value> Tile::AsValue() const {
scoped_ptr<base::DictionaryValue> res(new base::DictionaryValue());
TracedValue::MakeDictIntoImplicitSnapshotWithCategory(

Powered by Google App Engine
This is Rietveld 408576698