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

Side by Side Diff: cc/layer_tree_host_common.cc

Issue 11639050: cc: Support mask layers in impl-side painting (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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
« no previous file with comments | « no previous file | cc/layer_tree_impl.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 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 #include "cc/layer_tree_host_common.h" 5 #include "cc/layer_tree_host_common.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "cc/layer.h" 10 #include "cc/layer.h"
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 // In particular, it should not cause the subtree to be skipped. 226 // In particular, it should not cause the subtree to be skipped.
227 return !layer->opacity() && !layer->opacityIsAnimating(); 227 return !layer->opacity() && !layer->opacityIsAnimating();
228 } 228 }
229 229
230 // Called on each layer that could be drawn after all information from 230 // Called on each layer that could be drawn after all information from
231 // calcDrawProperties has been updated on that layer. May have some false 231 // calcDrawProperties has been updated on that layer. May have some false
232 // positives (e.g. layers get this called on them but don't actually get drawn). 232 // positives (e.g. layers get this called on them but don't actually get drawn).
233 static inline void markLayerAsUpdated(LayerImpl* layer) 233 static inline void markLayerAsUpdated(LayerImpl* layer)
234 { 234 {
235 layer->didUpdateTransforms(); 235 layer->didUpdateTransforms();
236
237 // Mask layers don't get this call, so explicitly update them so they can
238 // kick off tile rasterization.
239 if (layer->maskLayer())
240 layer->maskLayer()->didUpdateTransforms();
241 if (layer->replicaLayer()) {
242 layer->replicaLayer()->didUpdateTransforms();
243 if (layer->replicaLayer()->maskLayer())
244 layer->replicaLayer()->maskLayer()->didUpdateTransforms();
245 }
236 } 246 }
237 247
238 static inline void markLayerAsUpdated(Layer* layer) 248 static inline void markLayerAsUpdated(Layer* layer)
239 { 249 {
240 } 250 }
241 251
242 template<typename LayerType> 252 template<typename LayerType>
243 static bool subtreeShouldRenderToSeparateSurface(LayerType* layer, bool axisAlig nedWithRespectToParent) 253 static bool subtreeShouldRenderToSeparateSurface(LayerType* layer, bool axisAlig nedWithRespectToParent)
244 { 254 {
245 // 255 //
(...skipping 872 matching lines...) Expand 10 before | Expand all | Expand 10 after
1118 1128
1119 // At this point, we think the point does hit the touch event handler region o n the layer, but we need to walk up 1129 // At this point, we think the point does hit the touch event handler region o n the layer, but we need to walk up
1120 // the parents to ensure that the layer was not clipped in such a way that the 1130 // the parents to ensure that the layer was not clipped in such a way that the
1121 // hit point actually should not hit the layer. 1131 // hit point actually should not hit the layer.
1122 if (pointIsClippedBySurfaceOrClipRect(screenSpacePoint, layerImpl)) 1132 if (pointIsClippedBySurfaceOrClipRect(screenSpacePoint, layerImpl))
1123 return false; 1133 return false;
1124 1134
1125 return true; 1135 return true;
1126 } 1136 }
1127 } // namespace cc 1137 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/layer_tree_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698