| 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 1957 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1968 bool update_lcd_text = false; | 1968 bool update_lcd_text = false; |
| 1969 if (!UpdateDrawProperties(update_lcd_text)) | 1969 if (!UpdateDrawProperties(update_lcd_text)) |
| 1970 return NULL; | 1970 return NULL; |
| 1971 FindTouchEventLayerFunctor func = {screen_space_point}; | 1971 FindTouchEventLayerFunctor func = {screen_space_point}; |
| 1972 FindClosestMatchingLayerState state; | 1972 FindClosestMatchingLayerState state; |
| 1973 FindClosestMatchingLayer(screen_space_point, layer_list_[0], func, &state); | 1973 FindClosestMatchingLayer(screen_space_point, layer_list_[0], func, &state); |
| 1974 return state.closest_match; | 1974 return state.closest_match; |
| 1975 } | 1975 } |
| 1976 | 1976 |
| 1977 void LayerTreeImpl::RegisterSelection(const LayerSelection& selection) { | 1977 void LayerTreeImpl::RegisterSelection(const LayerSelection& selection) { |
| 1978 if (selection_ == selection) |
| 1979 return; |
| 1980 |
| 1981 if (IsActiveTree()) |
| 1982 layer_tree_host_impl_->HandleVisibilityChanged(); |
| 1983 |
| 1978 selection_ = selection; | 1984 selection_ = selection; |
| 1979 } | 1985 } |
| 1980 | 1986 |
| 1981 static gfx::SelectionBound ComputeViewportSelectionBound( | 1987 static gfx::SelectionBound ComputeViewportSelectionBound( |
| 1982 const LayerSelectionBound& layer_bound, | 1988 const LayerSelectionBound& layer_bound, |
| 1983 LayerImpl* layer, | 1989 LayerImpl* layer, |
| 1984 float device_scale_factor) { | 1990 float device_scale_factor) { |
| 1985 gfx::SelectionBound viewport_bound; | 1991 gfx::SelectionBound viewport_bound; |
| 1986 viewport_bound.set_type(layer_bound.type); | 1992 viewport_bound.set_type(layer_bound.type); |
| 1987 | 1993 |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2077 | 2083 |
| 2078 void LayerTreeImpl::ResetAllChangeTracking() { | 2084 void LayerTreeImpl::ResetAllChangeTracking() { |
| 2079 layers_that_should_push_properties_.clear(); | 2085 layers_that_should_push_properties_.clear(); |
| 2080 // Iterate over all layers, including masks. | 2086 // Iterate over all layers, including masks. |
| 2081 for (auto& layer : *layers_) | 2087 for (auto& layer : *layers_) |
| 2082 layer->ResetChangeTracking(); | 2088 layer->ResetChangeTracking(); |
| 2083 property_trees_.ResetAllChangeTracking(); | 2089 property_trees_.ResetAllChangeTracking(); |
| 2084 } | 2090 } |
| 2085 | 2091 |
| 2086 } // namespace cc | 2092 } // namespace cc |
| OLD | NEW |