OLD | NEW |
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/trees/layer_tree_host_common.h" | 5 #include "cc/trees/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/base/math_util.h" | 10 #include "cc/base/math_util.h" |
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 // | 369 // |
370 // These are allowed on the root surface, as they don't require the surface to | 370 // These are allowed on the root surface, as they don't require the surface to |
371 // be used as a contributing surface in order to apply correctly. | 371 // be used as a contributing surface in order to apply correctly. |
372 // | 372 // |
373 | 373 |
374 // If we force it. | 374 // If we force it. |
375 if (layer->force_render_surface()) | 375 if (layer->force_render_surface()) |
376 return true; | 376 return true; |
377 | 377 |
378 // If we'll make a copy of the layer's contents. | 378 // If we'll make a copy of the layer's contents. |
379 if (layer->HasRequestCopyCallback()) | 379 if (layer->HasCopyRequest()) |
380 return true; | 380 return true; |
381 | 381 |
382 return false; | 382 return false; |
383 } | 383 } |
384 | 384 |
385 static LayerImpl* NextTargetSurface(LayerImpl* layer) { | 385 static LayerImpl* NextTargetSurface(LayerImpl* layer) { |
386 return layer->parent() ? layer->parent()->render_target() : 0; | 386 return layer->parent() ? layer->parent()->render_target() : 0; |
387 } | 387 } |
388 | 388 |
389 // This function returns a translation matrix that can be applied on a vector | 389 // This function returns a translation matrix that can be applied on a vector |
(...skipping 1431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1821 // At this point, we think the point does hit the touch event handler region | 1821 // At this point, we think the point does hit the touch event handler region |
1822 // on the layer, but we need to walk up the parents to ensure that the layer | 1822 // on the layer, but we need to walk up the parents to ensure that the layer |
1823 // was not clipped in such a way that the hit point actually should not hit | 1823 // was not clipped in such a way that the hit point actually should not hit |
1824 // the layer. | 1824 // the layer. |
1825 if (PointIsClippedBySurfaceOrClipRect(screen_space_point, layer_impl)) | 1825 if (PointIsClippedBySurfaceOrClipRect(screen_space_point, layer_impl)) |
1826 return false; | 1826 return false; |
1827 | 1827 |
1828 return true; | 1828 return true; |
1829 } | 1829 } |
1830 } // namespace cc | 1830 } // namespace cc |
OLD | NEW |