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

Side by Side Diff: cc/layer_tree_host_common.cc

Issue 10690168: Aura: Resize locks with --ui-enable-threaded-compositing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moved needing to kick a frame logic up to RWHVA from Compositor. Created 8 years, 2 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 5
6 #include "config.h" 6 #include "config.h"
7 7
8 #include "CCLayerTreeHostCommon.h" 8 #include "CCLayerTreeHostCommon.h"
9 9
10 #include "CCLayerImpl.h" 10 #include "CCLayerImpl.h"
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 // via a render surface or explicitly if the parent preserves 3D), so the 205 // via a render surface or explicitly if the parent preserves 3D), so the
206 // entire subtree can be skipped if this layer is fully transparent. 206 // entire subtree can be skipped if this layer is fully transparent.
207 return !layer->opacity(); 207 return !layer->opacity();
208 } 208 }
209 209
210 static inline bool subtreeShouldBeSkipped(LayerChromium* layer) 210 static inline bool subtreeShouldBeSkipped(LayerChromium* layer)
211 { 211 {
212 // If the opacity is being animated then the opacity on the main thread is u nreliable 212 // If the opacity is being animated then the opacity on the main thread is u nreliable
213 // (since the impl thread may be using a different opacity), so it should no t be trusted. 213 // (since the impl thread may be using a different opacity), so it should no t be trusted.
214 // In particular, it should not cause the subtree to be skipped. 214 // In particular, it should not cause the subtree to be skipped.
215 return !layer->opacity() && !layer->opacityIsAnimating(); 215 return layer->deferUpdates() || (!layer->opacity() && !layer->opacityIsAnima ting());
216 } 216 }
217 217
218 template<typename LayerType> 218 template<typename LayerType>
219 static bool subtreeShouldRenderToSeparateSurface(LayerType* layer, bool axisAlig nedWithRespectToParent) 219 static bool subtreeShouldRenderToSeparateSurface(LayerType* layer, bool axisAlig nedWithRespectToParent)
220 { 220 {
221 // The root layer has a special render surface that is set up externally, so 221 // The root layer has a special render surface that is set up externally, so
222 // it shouldn't be treated as a surface in this code. 222 // it shouldn't be treated as a surface in this code.
223 if (!layer->parent()) 223 if (!layer->parent())
224 return false; 224 return false;
225 225
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after
856 856
857 foundLayer = currentLayer; 857 foundLayer = currentLayer;
858 break; 858 break;
859 } 859 }
860 860
861 // This can potentially return 0, which means the viewportPoint did not succ essfully hit test any layers, not even the root layer. 861 // This can potentially return 0, which means the viewportPoint did not succ essfully hit test any layers, not even the root layer.
862 return foundLayer; 862 return foundLayer;
863 } 863 }
864 864
865 } // namespace cc 865 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698