Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(101)

Side by Side Diff: cc/trees/layer_tree_impl.cc

Issue 2691583003: Removed fields from Selection classes (Closed)
Patch Set: Forgot to remove fields from test Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/ipc/struct_traits_unittest.cc ('k') | cc/trees/layer_tree_impl_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « cc/ipc/struct_traits_unittest.cc ('k') | cc/trees/layer_tree_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698