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

Unified Diff: cc/layers/layer_impl.cc

Issue 1139573004: Reset property tree indices when layer is removed from layer tree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use sequence numbers to invalidate property tree indices. Created 5 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
« no previous file with comments | « cc/layers/layer_impl.h ('k') | cc/trees/layer_tree_host_common_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer_impl.cc
diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc
index 88885f0d1f02e5978378c1d943c9de00ce7cf7f3..1eeae36873422e5ecfc3d061363303916859be83 100644
--- a/cc/layers/layer_impl.cc
+++ b/cc/layers/layer_impl.cc
@@ -208,6 +208,21 @@ void LayerImpl::SetClipChildren(std::set<LayerImpl*>* children) {
SetNeedsPushProperties();
}
+void LayerImpl::SetTransformTreeIndex(int index) {
+ transform_tree_index_ = index;
+ SetNeedsPushProperties();
+}
+
+void LayerImpl::SetClipTreeIndex(int index) {
+ clip_tree_index_ = index;
+ SetNeedsPushProperties();
+}
+
+void LayerImpl::SetOpacityTreeIndex(int index) {
+ opacity_tree_index_ = index;
+ SetNeedsPushProperties();
+}
+
void LayerImpl::PassCopyRequests(ScopedPtrVector<CopyOutputRequest>* requests) {
if (requests->empty())
return;
@@ -552,9 +567,9 @@ void LayerImpl::PushPropertiesTo(LayerImpl* layer) {
layer->Set3dSortingContextId(sorting_context_id_);
layer->SetNumDescendantsThatDrawContent(num_descendants_that_draw_content_);
- layer->set_transform_tree_index(transform_tree_index_);
- layer->set_opacity_tree_index(opacity_tree_index_);
- layer->set_clip_tree_index(clip_tree_index_);
+ layer->SetTransformTreeIndex(transform_tree_index_);
+ layer->SetClipTreeIndex(clip_tree_index_);
+ layer->SetOpacityTreeIndex(opacity_tree_index_);
layer->set_offset_to_transform_parent(offset_to_transform_parent_);
LayerImpl* scroll_parent = nullptr;
« no previous file with comments | « cc/layers/layer_impl.h ('k') | cc/trees/layer_tree_host_common_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698