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_impl.h" | 5 #include "cc/trees/layer_tree_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 1791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1802 | 1802 |
1803 float intersect_distance = 0.f; | 1803 float intersect_distance = 0.f; |
1804 viewport_bound.visible = PointHitsLayer( | 1804 viewport_bound.visible = PointHitsLayer( |
1805 layer, visibility_point, &intersect_distance, transform_tree, clip_tree); | 1805 layer, visibility_point, &intersect_distance, transform_tree, clip_tree); |
1806 | 1806 |
1807 return viewport_bound; | 1807 return viewport_bound; |
1808 } | 1808 } |
1809 | 1809 |
1810 void LayerTreeImpl::GetViewportSelection(ViewportSelection* selection) { | 1810 void LayerTreeImpl::GetViewportSelection(ViewportSelection* selection) { |
1811 DCHECK(selection); | 1811 DCHECK(selection); |
1812 | |
1813 selection->start = ComputeViewportSelectionBound( | 1812 selection->start = ComputeViewportSelectionBound( |
1814 selection_.start, | 1813 selection_.start, |
1815 selection_.start.layer_id ? LayerById(selection_.start.layer_id) : NULL, | 1814 selection_.start.layer_id ? LayerById(selection_.start.layer_id) : NULL, |
1816 device_scale_factor(), property_trees_.transform_tree, | 1815 device_scale_factor() * painted_device_scale_factor(), |
1817 property_trees_.clip_tree); | 1816 property_trees_.transform_tree, property_trees_.clip_tree); |
1818 selection->is_editable = selection_.is_editable; | 1817 selection->is_editable = selection_.is_editable; |
1819 selection->is_empty_text_form_control = selection_.is_empty_text_form_control; | 1818 selection->is_empty_text_form_control = selection_.is_empty_text_form_control; |
1820 if (selection->start.type == SELECTION_BOUND_CENTER || | 1819 if (selection->start.type == SELECTION_BOUND_CENTER || |
1821 selection->start.type == SELECTION_BOUND_EMPTY) { | 1820 selection->start.type == SELECTION_BOUND_EMPTY) { |
1822 selection->end = selection->start; | 1821 selection->end = selection->start; |
1823 } else { | 1822 } else { |
1824 selection->end = ComputeViewportSelectionBound( | 1823 selection->end = ComputeViewportSelectionBound( |
1825 selection_.end, | 1824 selection_.end, |
1826 selection_.end.layer_id ? LayerById(selection_.end.layer_id) : NULL, | 1825 selection_.end.layer_id ? LayerById(selection_.end.layer_id) : NULL, |
1827 device_scale_factor(), property_trees_.transform_tree, | 1826 device_scale_factor() * painted_device_scale_factor(), |
1828 property_trees_.clip_tree); | 1827 property_trees_.transform_tree, property_trees_.clip_tree); |
1829 } | 1828 } |
1830 } | 1829 } |
1831 | 1830 |
1832 void LayerTreeImpl::InputScrollAnimationFinished() { | 1831 void LayerTreeImpl::InputScrollAnimationFinished() { |
1833 // TODO(majidvp): We should pass in the original starting scroll position here | 1832 // TODO(majidvp): We should pass in the original starting scroll position here |
1834 ScrollStateData scroll_state_data; | 1833 ScrollStateData scroll_state_data; |
1835 ScrollState scroll_state(scroll_state_data); | 1834 ScrollState scroll_state(scroll_state_data); |
1836 layer_tree_host_impl_->ScrollEnd(&scroll_state); | 1835 layer_tree_host_impl_->ScrollEnd(&scroll_state); |
1837 } | 1836 } |
1838 | 1837 |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2022 const gfx::BoxF& box, | 2021 const gfx::BoxF& box, |
2023 gfx::BoxF* bounds) const { | 2022 gfx::BoxF* bounds) const { |
2024 *bounds = gfx::BoxF(); | 2023 *bounds = gfx::BoxF(); |
2025 return layer_tree_host_impl_->animation_host() | 2024 return layer_tree_host_impl_->animation_host() |
2026 ? layer_tree_host_impl_->animation_host() | 2025 ? layer_tree_host_impl_->animation_host() |
2027 ->TransformAnimationBoundsForBox(layer->id(), box, bounds) | 2026 ->TransformAnimationBoundsForBox(layer->id(), box, bounds) |
2028 : true; | 2027 : true; |
2029 } | 2028 } |
2030 | 2029 |
2031 } // namespace cc | 2030 } // namespace cc |
OLD | NEW |