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

Side by Side Diff: cc/layers/layer.cc

Issue 1232573005: cc: Make sure we don't insert or remove layers during painting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | cc/trees/layer_tree_host.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/layers/layer.h" 5 #include "cc/layers/layer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/atomic_sequence_num.h" 9 #include "base/atomic_sequence_num.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 if (layer_tree_host_ == host) 128 if (layer_tree_host_ == host)
129 return; 129 return;
130 130
131 if (layer_tree_host_) { 131 if (layer_tree_host_) {
132 layer_tree_host_->property_trees()->needs_rebuild = true; 132 layer_tree_host_->property_trees()->needs_rebuild = true;
133 layer_tree_host_->UnregisterLayer(this); 133 layer_tree_host_->UnregisterLayer(this);
134 } 134 }
135 if (host) { 135 if (host) {
136 host->property_trees()->needs_rebuild = true; 136 host->property_trees()->needs_rebuild = true;
137 host->RegisterLayer(this); 137 host->RegisterLayer(this);
138 DCHECK(!host->in_update());
enne (OOO) 2015/07/10 20:29:21 Reuse host->in_paint_layer_contents()?
ajuma 2015/07/10 20:52:53 Done, and moved the DCHECK over to LayerTreeHost::
138 } 139 }
139 140
140 InvalidatePropertyTreesIndices(); 141 InvalidatePropertyTreesIndices();
141 142
142 layer_tree_host_ = host; 143 layer_tree_host_ = host;
143 144
144 // When changing hosts, the layer needs to commit its properties to the impl 145 // When changing hosts, the layer needs to commit its properties to the impl
145 // side for the new host. 146 // side for the new host.
146 SetNeedsPushProperties(); 147 SetNeedsPushProperties();
147 148
(...skipping 1511 matching lines...) Expand 10 before | Expand all | Expand 10 after
1659 ? layer_tree_host()->meta_information_sequence_number() 1660 ? layer_tree_host()->meta_information_sequence_number()
1660 : 0; 1661 : 0;
1661 } 1662 }
1662 1663
1663 bool Layer::sorted_for_recursion() { 1664 bool Layer::sorted_for_recursion() {
1664 return sorted_for_recursion_tracker_ == 1665 return sorted_for_recursion_tracker_ ==
1665 layer_tree_host()->meta_information_sequence_number(); 1666 layer_tree_host()->meta_information_sequence_number();
1666 } 1667 }
1667 1668
1668 } // namespace cc 1669 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/trees/layer_tree_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698