| 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 1869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |