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

Side by Side Diff: cc/trees/layer_tree_host_impl.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/trees/layer_tree_host.cc ('k') | cc/trees/single_thread_proxy.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_impl.h" 5 #include "cc/trees/layer_tree_host_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/containers/hash_tables.h" 11 #include "base/containers/hash_tables.h"
12 #include "base/json/json_writer.h" 12 #include "base/json/json_writer.h"
13 #include "base/metrics/histogram.h" 13 #include "base/metrics/histogram.h"
14 #include "base/stl_util.h" 14 #include "base/stl_util.h"
15 #include "base/strings/stringprintf.h" 15 #include "base/strings/stringprintf.h"
16 #include "cc/animation/scrollbar_animation_controller.h" 16 #include "cc/animation/scrollbar_animation_controller.h"
17 #include "cc/animation/timing_function.h" 17 #include "cc/animation/timing_function.h"
18 #include "cc/base/math_util.h" 18 #include "cc/base/math_util.h"
19 #include "cc/base/util.h" 19 #include "cc/base/util.h"
20 #include "cc/debug/benchmark_instrumentation.h"
20 #include "cc/debug/debug_rect_history.h" 21 #include "cc/debug/debug_rect_history.h"
21 #include "cc/debug/frame_rate_counter.h" 22 #include "cc/debug/frame_rate_counter.h"
22 #include "cc/debug/overdraw_metrics.h" 23 #include "cc/debug/overdraw_metrics.h"
23 #include "cc/debug/paint_time_counter.h" 24 #include "cc/debug/paint_time_counter.h"
24 #include "cc/debug/rendering_stats_instrumentation.h" 25 #include "cc/debug/rendering_stats_instrumentation.h"
25 #include "cc/debug/traced_value.h" 26 #include "cc/debug/traced_value.h"
26 #include "cc/input/page_scale_animation.h" 27 #include "cc/input/page_scale_animation.h"
27 #include "cc/input/top_controls_manager.h" 28 #include "cc/input/top_controls_manager.h"
28 #include "cc/layers/append_quads_data.h" 29 #include "cc/layers/append_quads_data.h"
29 #include "cc/layers/heads_up_display_layer_impl.h" 30 #include "cc/layers/heads_up_display_layer_impl.h"
(...skipping 1319 matching lines...) Expand 10 before | Expand all | Expand 10 after
1349 // The next frame should start by assuming nothing has changed, and changes 1350 // The next frame should start by assuming nothing has changed, and changes
1350 // are noted as they occur. 1351 // are noted as they occur.
1351 // TODO(boliu): If we did a temporary software renderer frame, propogate the 1352 // TODO(boliu): If we did a temporary software renderer frame, propogate the
1352 // damage forward to the next frame. 1353 // damage forward to the next frame.
1353 for (size_t i = 0; i < frame->render_surface_layer_list->size(); i++) { 1354 for (size_t i = 0; i < frame->render_surface_layer_list->size(); i++) {
1354 (*frame->render_surface_layer_list)[i]->render_surface()->damage_tracker()-> 1355 (*frame->render_surface_layer_list)[i]->render_surface()->damage_tracker()->
1355 DidDrawDamagedArea(); 1356 DidDrawDamagedArea();
1356 } 1357 }
1357 active_tree_->root_layer()->ResetAllChangeTrackingForSubtree(); 1358 active_tree_->root_layer()->ResetAllChangeTrackingForSubtree();
1358 1359
1359 rendering_stats_instrumentation_->IssueTraceEventForImplThreadStats(); 1360 BenchmarkInstrumentation::IssueImplThreadRenderingStatsEvent(
1361 rendering_stats_instrumentation_->impl_thread_rendering_stats());
1360 rendering_stats_instrumentation_->AccumulateAndClearImplThreadStats(); 1362 rendering_stats_instrumentation_->AccumulateAndClearImplThreadStats();
1361 } 1363 }
1362 1364
1363 void LayerTreeHostImpl::DidDrawAllLayers(const FrameData& frame) { 1365 void LayerTreeHostImpl::DidDrawAllLayers(const FrameData& frame) {
1364 for (size_t i = 0; i < frame.will_draw_layers.size(); ++i) 1366 for (size_t i = 0; i < frame.will_draw_layers.size(); ++i)
1365 frame.will_draw_layers[i]->DidDraw(resource_provider_.get()); 1367 frame.will_draw_layers[i]->DidDraw(resource_provider_.get());
1366 1368
1367 // Once all layers have been drawn, pending texture uploads should no 1369 // Once all layers have been drawn, pending texture uploads should no
1368 // longer block future uploads. 1370 // longer block future uploads.
1369 resource_provider_->MarkPendingUploadsAsNonBlocking(); 1371 resource_provider_->MarkPendingUploadsAsNonBlocking();
(...skipping 1435 matching lines...) Expand 10 before | Expand all | Expand 10 after
2805 std::set<UIResourceId>::iterator found_in_evicted = 2807 std::set<UIResourceId>::iterator found_in_evicted =
2806 evicted_ui_resources_.find(uid); 2808 evicted_ui_resources_.find(uid);
2807 if (found_in_evicted == evicted_ui_resources_.end()) 2809 if (found_in_evicted == evicted_ui_resources_.end())
2808 return; 2810 return;
2809 evicted_ui_resources_.erase(found_in_evicted); 2811 evicted_ui_resources_.erase(found_in_evicted);
2810 if (evicted_ui_resources_.empty()) 2812 if (evicted_ui_resources_.empty())
2811 client_->OnCanDrawStateChanged(CanDraw()); 2813 client_->OnCanDrawStateChanged(CanDraw());
2812 } 2814 }
2813 2815
2814 } // namespace cc 2816 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host.cc ('k') | cc/trees/single_thread_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698