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

Unified Diff: cc/trees/layer_tree_impl.h

Issue 2873313004: Harmonize LayerTreeHost/LayerTreeHostImpl synchronization steps (Closed)
Patch Set: More harmonious Created 3 years, 7 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/trees/layer_tree_impl.h
diff --git a/cc/trees/layer_tree_impl.h b/cc/trees/layer_tree_impl.h
index 05e54add9ff4d617bc0f5062f6bce38efc75ab54..72b69e0d7c66c8f9ca2655d461a6fe91ac7f6ad9 100644
--- a/cc/trees/layer_tree_impl.h
+++ b/cc/trees/layer_tree_impl.h
@@ -131,6 +131,17 @@ class CC_EXPORT LayerTreeImpl {
void SetPropertyTrees(PropertyTrees* property_trees);
PropertyTrees* property_trees() { return &property_trees_; }
+#if DCHECK_IS_ON()
+ // Returns true if the layer tree properties are safe to access. This occurs
+ // when the layer tree host is not currently syncing properties, or when a
+ // sync is in process but the property tree has been updated. See:
+ // |LayerTreeHostImpl::SyncState|.
+ bool PropertyTreeSyncComplete() const {
+ return layer_tree_host_impl_->SyncStateComplete(SYNCED_PROPERTY_TREES);
enne (OOO) 2017/05/12 17:25:06 Is it possible to just have this hidden inside of
pdr. 2017/05/15 18:30:24 I've added a TODO comment here that we want to do
+ }
+#endif
+
+ void PushPropertyTreesTo(LayerTreeImpl* tree_impl);
void PushPropertiesTo(LayerTreeImpl* tree_impl);
void MoveChangeTrackingToLayers();

Powered by Google App Engine
This is Rietveld 408576698