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

Side by Side Diff: cc/trees/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/single_thread_proxy.cc ('k') | content/renderer/render_widget.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/thread_proxy.h" 5 #include "cc/trees/thread_proxy.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/debug/trace_event.h" 11 #include "base/debug/trace_event.h"
12 #include "base/metrics/histogram.h" 12 #include "base/metrics/histogram.h"
13 #include "cc/debug/benchmark_instrumentation.h"
13 #include "cc/input/input_handler.h" 14 #include "cc/input/input_handler.h"
14 #include "cc/output/context_provider.h" 15 #include "cc/output/context_provider.h"
15 #include "cc/output/output_surface.h" 16 #include "cc/output/output_surface.h"
16 #include "cc/quads/draw_quad.h" 17 #include "cc/quads/draw_quad.h"
17 #include "cc/resources/prioritized_resource_manager.h" 18 #include "cc/resources/prioritized_resource_manager.h"
18 #include "cc/scheduler/delay_based_time_source.h" 19 #include "cc/scheduler/delay_based_time_source.h"
19 #include "cc/scheduler/frame_rate_controller.h" 20 #include "cc/scheduler/frame_rate_controller.h"
20 #include "cc/scheduler/scheduler.h" 21 #include "cc/scheduler/scheduler.h"
21 #include "cc/trees/blocking_task_runner.h" 22 #include "cc/trees/blocking_task_runner.h"
22 #include "cc/trees/layer_tree_host.h" 23 #include "cc/trees/layer_tree_host.h"
(...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after
870 FROM_HERE, 871 FROM_HERE,
871 base::Bind(&ThreadProxy::StartCommitOnImplThread, 872 base::Bind(&ThreadProxy::StartCommitOnImplThread,
872 impl_thread_weak_ptr_, 873 impl_thread_weak_ptr_,
873 &completion, 874 &completion,
874 queue.release(), 875 queue.release(),
875 offscreen_context_provider)); 876 offscreen_context_provider));
876 completion.Wait(); 877 completion.Wait();
877 878
878 RenderingStatsInstrumentation* stats_instrumentation = 879 RenderingStatsInstrumentation* stats_instrumentation =
879 layer_tree_host_->rendering_stats_instrumentation(); 880 layer_tree_host_->rendering_stats_instrumentation();
880 stats_instrumentation->IssueTraceEventForMainThreadStats(); 881 BenchmarkInstrumentation::IssueMainThreadRenderingStatsEvent(
882 stats_instrumentation->main_thread_rendering_stats());
881 stats_instrumentation->AccumulateAndClearMainThreadStats(); 883 stats_instrumentation->AccumulateAndClearMainThreadStats();
882 } 884 }
883 885
884 layer_tree_host_->CommitComplete(); 886 layer_tree_host_->CommitComplete();
885 layer_tree_host_->DidBeginFrame(); 887 layer_tree_host_->DidBeginFrame();
886 } 888 }
887 889
888 void ThreadProxy::StartCommitOnImplThread( 890 void ThreadProxy::StartCommitOnImplThread(
889 CompletionEvent* completion, 891 CompletionEvent* completion,
890 ResourceUpdateQueue* raw_queue, 892 ResourceUpdateQueue* raw_queue,
(...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after
1577 completion_event_for_commit_held_on_tree_activation_ = NULL; 1579 completion_event_for_commit_held_on_tree_activation_ = NULL;
1578 } 1580 }
1579 1581
1580 UpdateBackgroundAnimateTicking(); 1582 UpdateBackgroundAnimateTicking();
1581 1583
1582 commit_to_activate_duration_history_.InsertSample( 1584 commit_to_activate_duration_history_.InsertSample(
1583 base::TimeTicks::HighResNow() - commit_complete_time_); 1585 base::TimeTicks::HighResNow() - commit_complete_time_);
1584 } 1586 }
1585 1587
1586 } // namespace cc 1588 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/single_thread_proxy.cc ('k') | content/renderer/render_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698