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

Unified Diff: cc/trees/layer_tree_impl.cc

Issue 2906813002: Remove Compositing.LayerTreeImpl.FindClosestMatchingLayerUs histogram (Closed)
Patch Set: Rebase , comments Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_impl.cc
diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc
index abf32770a29a23b32b6715264309362efc91c56a..77bcd154fa4313631b29e546319c4a00fa6fd22f 100644
--- a/cc/trees/layer_tree_impl.cc
+++ b/cc/trees/layer_tree_impl.cc
@@ -1914,37 +1914,32 @@ static void FindClosestMatchingLayer(const gfx::PointF& screen_space_point,
const Functor& func,
FindClosestMatchingLayerState* state) {
// We want to iterate from front to back when hit testing.
- {
- base::ElapsedTimer timer;
- for (auto* layer : base::Reversed(*root_layer->layer_tree_impl())) {
- if (!func(layer))
- continue;
+ for (auto* layer : base::Reversed(*root_layer->layer_tree_impl())) {
+ if (!func(layer))
+ continue;
- float distance_to_intersection = 0.f;
- bool hit = false;
- if (layer->Is3dSorted())
- hit = PointHitsLayer(layer, screen_space_point,
- &distance_to_intersection);
- else
- hit = PointHitsLayer(layer, screen_space_point, nullptr);
+ float distance_to_intersection = 0.f;
+ bool hit = false;
+ if (layer->Is3dSorted())
+ hit =
+ PointHitsLayer(layer, screen_space_point, &distance_to_intersection);
+ else
+ hit = PointHitsLayer(layer, screen_space_point, nullptr);
- if (!hit)
- continue;
+ if (!hit)
+ continue;
- bool in_front_of_previous_candidate =
- state->closest_match &&
- layer->GetSortingContextId() ==
- state->closest_match->GetSortingContextId() &&
- distance_to_intersection >
- state->closest_distance + std::numeric_limits<float>::epsilon();
+ bool in_front_of_previous_candidate =
+ state->closest_match &&
+ layer->GetSortingContextId() ==
+ state->closest_match->GetSortingContextId() &&
+ distance_to_intersection >
+ state->closest_distance + std::numeric_limits<float>::epsilon();
- if (!state->closest_match || in_front_of_previous_candidate) {
- state->closest_distance = distance_to_intersection;
- state->closest_match = layer;
- }
+ if (!state->closest_match || in_front_of_previous_candidate) {
+ state->closest_distance = distance_to_intersection;
+ state->closest_match = layer;
}
- UMA_HISTOGRAM_COUNTS("Compositing.LayerTreeImpl.FindClosestMatchingLayerUs",
- timer.Elapsed().InMicroseconds());
}
}
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698