| 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 2041 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2052 } | 2052 } |
| 2053 | 2053 |
| 2054 void LayerTreeImpl::GetViewportSelection( | 2054 void LayerTreeImpl::GetViewportSelection( |
| 2055 Selection<gfx::SelectionBound>* selection) { | 2055 Selection<gfx::SelectionBound>* selection) { |
| 2056 DCHECK(selection); | 2056 DCHECK(selection); |
| 2057 | 2057 |
| 2058 selection->start = ComputeViewportSelectionBound( | 2058 selection->start = ComputeViewportSelectionBound( |
| 2059 selection_.start, | 2059 selection_.start, |
| 2060 selection_.start.layer_id ? LayerById(selection_.start.layer_id) : NULL, | 2060 selection_.start.layer_id ? LayerById(selection_.start.layer_id) : NULL, |
| 2061 device_scale_factor()); | 2061 device_scale_factor()); |
| 2062 selection->is_editable = selection_.is_editable; | |
| 2063 selection->is_empty_text_form_control = selection_.is_empty_text_form_control; | |
| 2064 if (selection->start.type() == gfx::SelectionBound::CENTER || | 2062 if (selection->start.type() == gfx::SelectionBound::CENTER || |
| 2065 selection->start.type() == gfx::SelectionBound::EMPTY) { | 2063 selection->start.type() == gfx::SelectionBound::EMPTY) { |
| 2066 selection->end = selection->start; | 2064 selection->end = selection->start; |
| 2067 } else { | 2065 } else { |
| 2068 selection->end = ComputeViewportSelectionBound( | 2066 selection->end = ComputeViewportSelectionBound( |
| 2069 selection_.end, | 2067 selection_.end, |
| 2070 selection_.end.layer_id ? LayerById(selection_.end.layer_id) : NULL, | 2068 selection_.end.layer_id ? LayerById(selection_.end.layer_id) : NULL, |
| 2071 device_scale_factor()); | 2069 device_scale_factor()); |
| 2072 } | 2070 } |
| 2073 } | 2071 } |
| (...skipping 19 matching lines...) Expand all Loading... |
| 2093 | 2091 |
| 2094 void LayerTreeImpl::ResetAllChangeTracking() { | 2092 void LayerTreeImpl::ResetAllChangeTracking() { |
| 2095 layers_that_should_push_properties_.clear(); | 2093 layers_that_should_push_properties_.clear(); |
| 2096 // Iterate over all layers, including masks. | 2094 // Iterate over all layers, including masks. |
| 2097 for (auto& layer : *layers_) | 2095 for (auto& layer : *layers_) |
| 2098 layer->ResetChangeTracking(); | 2096 layer->ResetChangeTracking(); |
| 2099 property_trees_.ResetAllChangeTracking(); | 2097 property_trees_.ResetAllChangeTracking(); |
| 2100 } | 2098 } |
| 2101 | 2099 |
| 2102 } // namespace cc | 2100 } // namespace cc |
| OLD | NEW |