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

Side by Side Diff: cc/debug/benchmark_instrumentation.h

Issue 1057283003: Remove parts of //cc we aren't using (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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
« no previous file with comments | « cc/cc_unittests.isolate ('k') | cc/debug/benchmark_instrumentation.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CC_DEBUG_BENCHMARK_INSTRUMENTATION_H_
6 #define CC_DEBUG_BENCHMARK_INSTRUMENTATION_H_
7
8 #include "cc/base/cc_export.h"
9 #include "cc/debug/rendering_stats.h"
10
11 namespace cc {
12 namespace benchmark_instrumentation {
13
14 // Please do not change the trace events in this file without updating
15 // tools/perf/measurements/rendering_stats.py accordingly.
16 // The benchmarks search for events and their arguments by name.
17
18 namespace internal {
19 const char kCategory[] = "cc,benchmark";
20 const char kBeginFrameId[] = "begin_frame_id";
21 } // namespace internal
22
23 const char kSendBeginFrame[] = "ThreadProxy::ScheduledActionSendBeginMainFrame";
24 const char kDoBeginFrame[] = "ThreadProxy::BeginMainFrame";
25
26 class ScopedBeginFrameTask {
27 public:
28 ScopedBeginFrameTask(const char* event_name, unsigned int begin_frame_id)
29 : event_name_(event_name) {
30 TRACE_EVENT_BEGIN1(internal::kCategory,
31 event_name_,
32 internal::kBeginFrameId,
33 begin_frame_id);
34 }
35 ~ScopedBeginFrameTask() {
36 TRACE_EVENT_END0(internal::kCategory, event_name_);
37 }
38
39 private:
40 const char* event_name_;
41
42 DISALLOW_COPY_AND_ASSIGN(ScopedBeginFrameTask);
43 };
44
45 void IssueImplThreadRenderingStatsEvent(const RenderingStats& stats);
46 void CC_EXPORT IssueDisplayRenderingStatsEvent();
47
48 } // namespace benchmark_instrumentation
49 } // namespace cc
50
51 #endif // CC_DEBUG_BENCHMARK_INSTRUMENTATION_H_
OLDNEW
« no previous file with comments | « cc/cc_unittests.isolate ('k') | cc/debug/benchmark_instrumentation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698