| 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 1736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1747 layer, | 1747 layer, |
| 1748 globals.can_adjust_raster_scales, | 1748 globals.can_adjust_raster_scales, |
| 1749 ideal_contents_scale, | 1749 ideal_contents_scale, |
| 1750 globals.device_scale_factor, | 1750 globals.device_scale_factor, |
| 1751 data_from_ancestor.in_subtree_of_page_scale_application_layer | 1751 data_from_ancestor.in_subtree_of_page_scale_application_layer |
| 1752 ? globals.page_scale_factor | 1752 ? globals.page_scale_factor |
| 1753 : 1.f, | 1753 : 1.f, |
| 1754 combined_maximum_animation_contents_scale, | 1754 combined_maximum_animation_contents_scale, |
| 1755 animating_transform_to_screen); | 1755 animating_transform_to_screen); |
| 1756 | 1756 |
| 1757 layer_draw_properties.ideal_contents_scale = ideal_contents_scale; |
| 1758 layer_draw_properties.maximum_animation_contents_scale = |
| 1759 combined_maximum_animation_contents_scale; |
| 1760 |
| 1757 // The draw_transform that gets computed below is effectively the layer's | 1761 // The draw_transform that gets computed below is effectively the layer's |
| 1758 // draw_transform, unless the layer itself creates a render_surface. In that | 1762 // draw_transform, unless the layer itself creates a render_surface. In that |
| 1759 // case, the render_surface re-parents the transforms. | 1763 // case, the render_surface re-parents the transforms. |
| 1760 layer_draw_properties.target_space_transform = combined_transform; | 1764 layer_draw_properties.target_space_transform = combined_transform; |
| 1761 // M[draw] = M[parent] * LT * S[layer2content] | 1765 // M[draw] = M[parent] * LT * S[layer2content] |
| 1762 layer_draw_properties.target_space_transform.Scale( | 1766 layer_draw_properties.target_space_transform.Scale( |
| 1763 SK_MScalar1 / layer->contents_scale_x(), | 1767 SK_MScalar1 / layer->contents_scale_x(), |
| 1764 SK_MScalar1 / layer->contents_scale_y()); | 1768 SK_MScalar1 / layer->contents_scale_y()); |
| 1765 | 1769 |
| 1766 // The layer's screen_space_transform represents the transform between root | 1770 // The layer's screen_space_transform represents the transform between root |
| (...skipping 870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2637 // At this point, we think the point does hit the touch event handler region | 2641 // At this point, we think the point does hit the touch event handler region |
| 2638 // on the layer, but we need to walk up the parents to ensure that the layer | 2642 // on the layer, but we need to walk up the parents to ensure that the layer |
| 2639 // was not clipped in such a way that the hit point actually should not hit | 2643 // was not clipped in such a way that the hit point actually should not hit |
| 2640 // the layer. | 2644 // the layer. |
| 2641 if (PointIsClippedBySurfaceOrClipRect(screen_space_point, layer_impl)) | 2645 if (PointIsClippedBySurfaceOrClipRect(screen_space_point, layer_impl)) |
| 2642 return false; | 2646 return false; |
| 2643 | 2647 |
| 2644 return true; | 2648 return true; |
| 2645 } | 2649 } |
| 2646 } // namespace cc | 2650 } // namespace cc |
| OLD | NEW |