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 1953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1964 bool update_lcd_text = false; | 1964 bool update_lcd_text = false; |
1965 if (!UpdateDrawProperties(update_lcd_text)) | 1965 if (!UpdateDrawProperties(update_lcd_text)) |
1966 return NULL; | 1966 return NULL; |
1967 FindTouchEventLayerFunctor func = {screen_space_point}; | 1967 FindTouchEventLayerFunctor func = {screen_space_point}; |
1968 FindClosestMatchingLayerState state; | 1968 FindClosestMatchingLayerState state; |
1969 FindClosestMatchingLayer(screen_space_point, layer_list_[0], func, &state); | 1969 FindClosestMatchingLayer(screen_space_point, layer_list_[0], func, &state); |
1970 return state.closest_match; | 1970 return state.closest_match; |
1971 } | 1971 } |
1972 | 1972 |
1973 void LayerTreeImpl::RegisterSelection(const LayerSelection& selection) { | 1973 void LayerTreeImpl::RegisterSelection(const LayerSelection& selection) { |
1974 if (selection_ == selection) | |
1975 return; | |
1976 | |
1977 if (IsActiveTree()) | |
1978 layer_tree_host_impl_->HandleVisibilityChanged(); | |
danakj
2016/10/20 22:40:26
I think a nicer way to frame this is to have the b
amaralp
2016/10/21 03:47:19
Done.
amaralp
2016/10/21 03:47:19
Done.
| |
1979 | |
1974 selection_ = selection; | 1980 selection_ = selection; |
1975 } | 1981 } |
1976 | 1982 |
1977 static gfx::SelectionBound ComputeViewportSelectionBound( | 1983 static gfx::SelectionBound ComputeViewportSelectionBound( |
1978 const LayerSelectionBound& layer_bound, | 1984 const LayerSelectionBound& layer_bound, |
1979 LayerImpl* layer, | 1985 LayerImpl* layer, |
1980 float device_scale_factor) { | 1986 float device_scale_factor) { |
1981 gfx::SelectionBound viewport_bound; | 1987 gfx::SelectionBound viewport_bound; |
1982 viewport_bound.set_type(layer_bound.type); | 1988 viewport_bound.set_type(layer_bound.type); |
1983 | 1989 |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2073 | 2079 |
2074 void LayerTreeImpl::ResetAllChangeTracking() { | 2080 void LayerTreeImpl::ResetAllChangeTracking() { |
2075 layers_that_should_push_properties_.clear(); | 2081 layers_that_should_push_properties_.clear(); |
2076 // Iterate over all layers, including masks. | 2082 // Iterate over all layers, including masks. |
2077 for (auto& layer : *layers_) | 2083 for (auto& layer : *layers_) |
2078 layer->ResetChangeTracking(); | 2084 layer->ResetChangeTracking(); |
2079 property_trees_.ResetAllChangeTracking(); | 2085 property_trees_.ResetAllChangeTracking(); |
2080 } | 2086 } |
2081 | 2087 |
2082 } // namespace cc | 2088 } // namespace cc |
OLD | NEW |