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

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

Issue 2201853002: Blink handle selection handle visibility (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: default handle visibility should be false Created 4 years, 4 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
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 1913 matching lines...) Expand 10 before | Expand all | Expand 10 after
1924 bool update_lcd_text = false; 1924 bool update_lcd_text = false;
1925 if (!UpdateDrawProperties(update_lcd_text)) 1925 if (!UpdateDrawProperties(update_lcd_text))
1926 return NULL; 1926 return NULL;
1927 FindTouchEventLayerFunctor func = {screen_space_point}; 1927 FindTouchEventLayerFunctor func = {screen_space_point};
1928 FindClosestMatchingLayerState state; 1928 FindClosestMatchingLayerState state;
1929 FindClosestMatchingLayer(screen_space_point, layer_list_[0], func, &state); 1929 FindClosestMatchingLayer(screen_space_point, layer_list_[0], func, &state);
1930 return state.closest_match; 1930 return state.closest_match;
1931 } 1931 }
1932 1932
1933 void LayerTreeImpl::RegisterSelection(const LayerSelection& selection) { 1933 void LayerTreeImpl::RegisterSelection(const LayerSelection& selection) {
1934 selection_changed_ = selection_ != selection;
aelias_OOO_until_Jul13 2016/08/08 21:30:51 This relies on RegisterSelection being called agai
amaralp 2016/10/14 00:53:06 Done.
1934 selection_ = selection; 1935 selection_ = selection;
1935 } 1936 }
1936 1937
1938 bool LayerTreeImpl::SelectionChanged() {
1939 return selection_changed_;
1940 }
1941
1937 static gfx::SelectionBound ComputeViewportSelectionBound( 1942 static gfx::SelectionBound ComputeViewportSelectionBound(
1938 const LayerSelectionBound& layer_bound, 1943 const LayerSelectionBound& layer_bound,
1939 LayerImpl* layer, 1944 LayerImpl* layer,
1940 float device_scale_factor) { 1945 float device_scale_factor) {
1941 gfx::SelectionBound viewport_bound; 1946 gfx::SelectionBound viewport_bound;
1942 viewport_bound.set_type(layer_bound.type); 1947 viewport_bound.set_type(layer_bound.type);
1943 1948
1944 if (!layer || layer_bound.type == gfx::SelectionBound::EMPTY) 1949 if (!layer || layer_bound.type == gfx::SelectionBound::EMPTY)
1945 return viewport_bound; 1950 return viewport_bound;
1946 1951
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
2033 2038
2034 void LayerTreeImpl::ResetAllChangeTracking() { 2039 void LayerTreeImpl::ResetAllChangeTracking() {
2035 layers_that_should_push_properties_.clear(); 2040 layers_that_should_push_properties_.clear();
2036 // Iterate over all layers, including masks and replicas. 2041 // Iterate over all layers, including masks and replicas.
2037 for (auto& layer : *layers_) 2042 for (auto& layer : *layers_)
2038 layer->ResetChangeTracking(); 2043 layer->ResetChangeTracking();
2039 property_trees_.ResetAllChangeTracking(); 2044 property_trees_.ResetAllChangeTracking();
2040 } 2045 }
2041 2046
2042 } // namespace cc 2047 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698