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

Side by Side Diff: cc/trees/single_thread_proxy.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_impl.cc ('k') | cc/trees/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/single_thread_proxy.h" 5 #include "cc/trees/single_thread_proxy.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "cc/debug/benchmark_instrumentation.h"
9 #include "cc/output/context_provider.h" 10 #include "cc/output/context_provider.h"
10 #include "cc/output/output_surface.h" 11 #include "cc/output/output_surface.h"
11 #include "cc/quads/draw_quad.h" 12 #include "cc/quads/draw_quad.h"
12 #include "cc/resources/prioritized_resource_manager.h" 13 #include "cc/resources/prioritized_resource_manager.h"
13 #include "cc/resources/resource_update_controller.h" 14 #include "cc/resources/resource_update_controller.h"
14 #include "cc/trees/blocking_task_runner.h" 15 #include "cc/trees/blocking_task_runner.h"
15 #include "cc/trees/layer_tree_host.h" 16 #include "cc/trees/layer_tree_host.h"
16 #include "cc/trees/layer_tree_impl.h" 17 #include "cc/trees/layer_tree_impl.h"
17 18
18 namespace cc { 19 namespace cc {
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 // In the single-threaded case, the scale and scroll deltas should never be 219 // In the single-threaded case, the scale and scroll deltas should never be
219 // touched on the impl layer tree. 220 // touched on the impl layer tree.
220 scoped_ptr<ScrollAndScaleSet> scroll_info = 221 scoped_ptr<ScrollAndScaleSet> scroll_info =
221 layer_tree_host_impl_->ProcessScrollDeltas(); 222 layer_tree_host_impl_->ProcessScrollDeltas();
222 DCHECK(!scroll_info->scrolls.size()); 223 DCHECK(!scroll_info->scrolls.size());
223 DCHECK_EQ(1.f, scroll_info->page_scale_delta); 224 DCHECK_EQ(1.f, scroll_info->page_scale_delta);
224 #endif 225 #endif
225 226
226 RenderingStatsInstrumentation* stats_instrumentation = 227 RenderingStatsInstrumentation* stats_instrumentation =
227 layer_tree_host_->rendering_stats_instrumentation(); 228 layer_tree_host_->rendering_stats_instrumentation();
228 stats_instrumentation->IssueTraceEventForMainThreadStats(); 229 BenchmarkInstrumentation::IssueMainThreadRenderingStatsEvent(
230 stats_instrumentation->main_thread_rendering_stats());
229 stats_instrumentation->AccumulateAndClearMainThreadStats(); 231 stats_instrumentation->AccumulateAndClearMainThreadStats();
230 } 232 }
231 layer_tree_host_->CommitComplete(); 233 layer_tree_host_->CommitComplete();
232 next_frame_is_newly_committed_frame_ = true; 234 next_frame_is_newly_committed_frame_ = true;
233 } 235 }
234 236
235 void SingleThreadProxy::SetNeedsCommit() { 237 void SingleThreadProxy::SetNeedsCommit() {
236 DCHECK(Proxy::IsMainThread()); 238 DCHECK(Proxy::IsMainThread());
237 layer_tree_host_->ScheduleComposite(); 239 layer_tree_host_->ScheduleComposite();
238 } 240 }
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 void SingleThreadProxy::DidSwapFrame() { 527 void SingleThreadProxy::DidSwapFrame() {
526 if (next_frame_is_newly_committed_frame_) { 528 if (next_frame_is_newly_committed_frame_) {
527 next_frame_is_newly_committed_frame_ = false; 529 next_frame_is_newly_committed_frame_ = false;
528 layer_tree_host_->DidCommitAndDrawFrame(); 530 layer_tree_host_->DidCommitAndDrawFrame();
529 } 531 }
530 } 532 }
531 533
532 bool SingleThreadProxy::CommitPendingForTesting() { return false; } 534 bool SingleThreadProxy::CommitPendingForTesting() { return false; }
533 535
534 } // namespace cc 536 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | cc/trees/thread_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698