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

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

Issue 2615773003: Replace LayerImpl::sorting_context_id with transform reference. (Closed)
Patch Set: Update tests. Created 3 years, 11 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 1869 matching lines...) Expand 10 before | Expand all | Expand 10 after
1880 hit = 1880 hit =
1881 PointHitsLayer(layer, screen_space_point, &distance_to_intersection); 1881 PointHitsLayer(layer, screen_space_point, &distance_to_intersection);
1882 else 1882 else
1883 hit = PointHitsLayer(layer, screen_space_point, nullptr); 1883 hit = PointHitsLayer(layer, screen_space_point, nullptr);
1884 1884
1885 if (!hit) 1885 if (!hit)
1886 continue; 1886 continue;
1887 1887
1888 bool in_front_of_previous_candidate = 1888 bool in_front_of_previous_candidate =
1889 state->closest_match && 1889 state->closest_match &&
1890 layer->sorting_context_id() == 1890 layer->GetSortingContextId() ==
1891 state->closest_match->sorting_context_id() && 1891 state->closest_match->GetSortingContextId() &&
1892 distance_to_intersection > 1892 distance_to_intersection >
1893 state->closest_distance + std::numeric_limits<float>::epsilon(); 1893 state->closest_distance + std::numeric_limits<float>::epsilon();
1894 1894
1895 if (!state->closest_match || in_front_of_previous_candidate) { 1895 if (!state->closest_match || in_front_of_previous_candidate) {
1896 state->closest_distance = distance_to_intersection; 1896 state->closest_distance = distance_to_intersection;
1897 state->closest_match = layer; 1897 state->closest_match = layer;
1898 } 1898 }
1899 } 1899 }
1900 } 1900 }
1901 1901
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
2084 2084
2085 void LayerTreeImpl::ResetAllChangeTracking() { 2085 void LayerTreeImpl::ResetAllChangeTracking() {
2086 layers_that_should_push_properties_.clear(); 2086 layers_that_should_push_properties_.clear();
2087 // Iterate over all layers, including masks. 2087 // Iterate over all layers, including masks.
2088 for (auto& layer : *layers_) 2088 for (auto& layer : *layers_)
2089 layer->ResetChangeTracking(); 2089 layer->ResetChangeTracking();
2090 property_trees_.ResetAllChangeTracking(); 2090 property_trees_.ResetAllChangeTracking();
2091 } 2091 }
2092 2092
2093 } // namespace cc 2093 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698