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

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

Issue 25353009: telemetry: Refactored rasterize_and_record measurement. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Made BenchmarkInstrumentation a class. Created 7 years, 2 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
« no previous file with comments | « cc/resources/raster_worker_pool.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_host.h" 5 #include "cc/trees/layer_tree_host.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <stack> 8 #include <stack>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/command_line.h" 11 #include "base/command_line.h"
12 #include "base/debug/trace_event.h" 12 #include "base/debug/trace_event.h"
13 #include "base/message_loop/message_loop.h" 13 #include "base/message_loop/message_loop.h"
14 #include "base/metrics/histogram.h" 14 #include "base/metrics/histogram.h"
15 #include "base/stl_util.h" 15 #include "base/stl_util.h"
16 #include "base/strings/string_number_conversions.h" 16 #include "base/strings/string_number_conversions.h"
17 #include "cc/animation/animation_registrar.h" 17 #include "cc/animation/animation_registrar.h"
18 #include "cc/animation/layer_animation_controller.h" 18 #include "cc/animation/layer_animation_controller.h"
19 #include "cc/base/math_util.h" 19 #include "cc/base/math_util.h"
20 #include "cc/debug/benchmark_instrumentation.h"
21 #include "cc/debug/devtools_instrumentation.h" 20 #include "cc/debug/devtools_instrumentation.h"
22 #include "cc/debug/overdraw_metrics.h" 21 #include "cc/debug/overdraw_metrics.h"
23 #include "cc/debug/rendering_stats_instrumentation.h" 22 #include "cc/debug/rendering_stats_instrumentation.h"
24 #include "cc/input/top_controls_manager.h" 23 #include "cc/input/top_controls_manager.h"
25 #include "cc/layers/heads_up_display_layer.h" 24 #include "cc/layers/heads_up_display_layer.h"
26 #include "cc/layers/heads_up_display_layer_impl.h" 25 #include "cc/layers/heads_up_display_layer_impl.h"
27 #include "cc/layers/layer.h" 26 #include "cc/layers/layer.h"
28 #include "cc/layers/layer_iterator.h" 27 #include "cc/layers/layer_iterator.h"
29 #include "cc/layers/painted_scrollbar_layer.h" 28 #include "cc/layers/painted_scrollbar_layer.h"
30 #include "cc/layers/render_surface.h" 29 #include "cc/layers/render_surface.h"
(...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after
760 lcd_text_metrics_.total_num_cc_layers_will_use_lcd_text++; 759 lcd_text_metrics_.total_num_cc_layers_will_use_lcd_text++;
761 } 760 }
762 } 761 }
763 762
764 bool LayerTreeHost::UsingSharedMemoryResources() { 763 bool LayerTreeHost::UsingSharedMemoryResources() {
765 return GetRendererCapabilities().using_shared_memory_resources; 764 return GetRendererCapabilities().using_shared_memory_resources;
766 } 765 }
767 766
768 bool LayerTreeHost::UpdateLayers(Layer* root_layer, 767 bool LayerTreeHost::UpdateLayers(Layer* root_layer,
769 ResourceUpdateQueue* queue) { 768 ResourceUpdateQueue* queue) {
770 TRACE_EVENT1(benchmark_instrumentation::kCategory, 769 TRACE_EVENT1("cc", "LayerTreeHost::UpdateLayers",
771 benchmark_instrumentation::kLayerTreeHostUpdateLayers, 770 "source_frame_number", source_frame_number());
772 benchmark_instrumentation::kSourceFrameNumber,
773 source_frame_number());
774 771
775 RenderSurfaceLayerList update_list; 772 RenderSurfaceLayerList update_list;
776 { 773 {
777 UpdateHudLayer(); 774 UpdateHudLayer();
778 775
779 Layer* root_scroll = FindFirstScrollableLayer(root_layer); 776 Layer* root_scroll = FindFirstScrollableLayer(root_layer);
780 Layer* page_scale_layer = page_scale_layer_; 777 Layer* page_scale_layer = page_scale_layer_;
781 if (!page_scale_layer && root_scroll) 778 if (!page_scale_layer && root_scroll)
782 page_scale_layer = root_scroll->parent(); 779 page_scale_layer = root_scroll->parent();
783 780
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
1242 void LayerTreeHost::RegisterViewportLayers( 1239 void LayerTreeHost::RegisterViewportLayers(
1243 scoped_refptr<Layer> page_scale_layer, 1240 scoped_refptr<Layer> page_scale_layer,
1244 scoped_refptr<Layer> inner_viewport_scroll_layer, 1241 scoped_refptr<Layer> inner_viewport_scroll_layer,
1245 scoped_refptr<Layer> outer_viewport_scroll_layer) { 1242 scoped_refptr<Layer> outer_viewport_scroll_layer) {
1246 page_scale_layer_ = page_scale_layer; 1243 page_scale_layer_ = page_scale_layer;
1247 inner_viewport_scroll_layer_ = inner_viewport_scroll_layer; 1244 inner_viewport_scroll_layer_ = inner_viewport_scroll_layer;
1248 outer_viewport_scroll_layer_ = outer_viewport_scroll_layer; 1245 outer_viewport_scroll_layer_ = outer_viewport_scroll_layer;
1249 } 1246 }
1250 1247
1251 } // namespace cc 1248 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/raster_worker_pool.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698