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

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

Issue 1906523002: cc: Add UMA histogram for the number of render surfaces (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 816 matching lines...) Expand 10 before | Expand all | Expand 10 after
827 settings().layer_transforms_should_scale_layer_contents, 827 settings().layer_transforms_should_scale_layer_contents,
828 &render_surface_layer_list_, render_surface_layer_list_id_, 828 &render_surface_layer_list_, render_surface_layer_list_id_,
829 &property_trees_); 829 &property_trees_);
830 LayerTreeHostCommon::CalculateDrawProperties(&inputs); 830 LayerTreeHostCommon::CalculateDrawProperties(&inputs);
831 if (const char* client_name = GetClientNameForMetrics()) { 831 if (const char* client_name = GetClientNameForMetrics()) {
832 UMA_HISTOGRAM_COUNTS( 832 UMA_HISTOGRAM_COUNTS(
833 base::StringPrintf( 833 base::StringPrintf(
834 "Compositing.%s.LayerTreeImpl.CalculateDrawPropertiesUs", 834 "Compositing.%s.LayerTreeImpl.CalculateDrawPropertiesUs",
835 client_name), 835 client_name),
836 timer.Elapsed().InMicroseconds()); 836 timer.Elapsed().InMicroseconds());
837 UMA_HISTOGRAM_COUNTS_100(
838 base::StringPrintf("Compositing.%s.NumRenderSurfaces", client_name),
839 base::saturated_cast<int>(render_surface_layer_list_.size()));
837 } 840 }
838 } 841 }
839 842
840 { 843 {
841 TRACE_EVENT2("cc", "LayerTreeImpl::UpdateDrawProperties::Occlusion", 844 TRACE_EVENT2("cc", "LayerTreeImpl::UpdateDrawProperties::Occlusion",
842 "IsActive", IsActiveTree(), "SourceFrameNumber", 845 "IsActive", IsActiveTree(), "SourceFrameNumber",
843 source_frame_number_); 846 source_frame_number_);
844 OcclusionTracker occlusion_tracker( 847 OcclusionTracker occlusion_tracker(
845 root_layer()->render_surface()->content_rect()); 848 root_layer()->render_surface()->content_rect());
846 occlusion_tracker.set_minimum_tracking_size( 849 occlusion_tracker.set_minimum_tracking_size(
(...skipping 1234 matching lines...) Expand 10 before | Expand all | Expand 10 after
2081 } 2084 }
2082 2085
2083 void LayerTreeImpl::ResetAllChangeTracking(PropertyTrees::ResetFlags flag) { 2086 void LayerTreeImpl::ResetAllChangeTracking(PropertyTrees::ResetFlags flag) {
2084 layers_that_should_push_properties_.clear(); 2087 layers_that_should_push_properties_.clear();
2085 for (auto* layer : *this) 2088 for (auto* layer : *this)
2086 layer->ResetChangeTracking(); 2089 layer->ResetChangeTracking();
2087 property_trees_.ResetAllChangeTracking(flag); 2090 property_trees_.ResetAllChangeTracking(flag);
2088 } 2091 }
2089 2092
2090 } // namespace cc 2093 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698