OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/trees/draw_property_utils.h" | 5 #include "cc/trees/draw_property_utils.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
327 // case where we may animate to a non-singular transform and wish to | 327 // case where we may animate to a non-singular transform and wish to |
328 // pre-raster. | 328 // pre-raster. |
329 if (!HasInvertibleOrAnimatedTransform(layer)) | 329 if (!HasInvertibleOrAnimatedTransform(layer)) |
330 return true; | 330 return true; |
331 | 331 |
332 // When we need to do a readback/copy of a layer's output, we can not skip | 332 // When we need to do a readback/copy of a layer's output, we can not skip |
333 // it or any of its ancestors. | 333 // it or any of its ancestors. |
334 if (layer->num_copy_requests_in_target_subtree() > 0) | 334 if (layer->num_copy_requests_in_target_subtree() > 0) |
335 return false; | 335 return false; |
336 | 336 |
337 // We cannot skip the the subtree if a descendant has a wheel or touch handler | 337 // We cannot skip the the subtree if a descendant has a touch handler |
338 // or the hit testing code will break (it requires fresh transforms, etc). | 338 // or the hit testing code will break (it requires fresh transforms, etc). |
339 // Though we don't need visible rect for hit testing, we need render surface's | 339 // Though we don't need visible rect for hit testing, we need render surface's |
340 // drawable content rect which depends on layer's drawable content rect which | 340 // drawable content rect which depends on layer's drawable content rect which |
341 // in turn depends on layer's clip rect that is computed while computing | 341 // in turn depends on layer's clip rect that is computed while computing |
342 // visible rects. | 342 // visible rects. |
343 if (layer->layer_or_descendant_has_input_handler()) | 343 if (layer->layer_or_descendant_has_touch_handler()) |
344 return false; | 344 return false; |
345 | 345 |
346 // If the layer is not drawn, then skip it and its subtree. | 346 // If the layer is not drawn, then skip it and its subtree. |
347 if (!layer_is_drawn) | 347 if (!layer_is_drawn) |
348 return true; | 348 return true; |
349 | 349 |
350 if (layer->render_surface() && !layer->double_sided() && | 350 if (layer->render_surface() && !layer->double_sided() && |
351 IsSurfaceBackFaceVisible(layer, tree)) | 351 IsSurfaceBackFaceVisible(layer, tree)) |
352 return true; | 352 return true; |
353 | 353 |
(...skipping 845 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1199 | 1199 |
1200 void UpdateElasticOverscrollInPropertyTrees( | 1200 void UpdateElasticOverscrollInPropertyTrees( |
1201 PropertyTrees* property_trees, | 1201 PropertyTrees* property_trees, |
1202 const Layer* overscroll_elasticity_layer, | 1202 const Layer* overscroll_elasticity_layer, |
1203 const gfx::Vector2dF& elastic_overscroll) { | 1203 const gfx::Vector2dF& elastic_overscroll) { |
1204 UpdateElasticOverscrollInPropertyTreesInternal( | 1204 UpdateElasticOverscrollInPropertyTreesInternal( |
1205 property_trees, overscroll_elasticity_layer, elastic_overscroll); | 1205 property_trees, overscroll_elasticity_layer, elastic_overscroll); |
1206 } | 1206 } |
1207 | 1207 |
1208 } // namespace cc | 1208 } // namespace cc |
OLD | NEW |