add a use_alsa gyp setting
[chromium-blink-merge.git] / cc / devtools_instrumentation.h
blob04b6ef8bbc6dbebead01c5a83f648920f62b020d
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.
5 #ifndef CC_DEVTOOLS_INSTRUMENTATION_H_
6 #define CC_DEVTOOLS_INSTRUMENTATION_H_
8 #include "base/debug/trace_event.h"
10 namespace cc {
11 namespace devtools_instrumentation {
13 namespace internal {
14 const char kCategory[] = "cc,devtools";
15 const char kLayerId[] = "layerId";
16 const char kPaintLayer[] = "PaintLayer";
17 const char kRasterTask[] = "RasterTask";
20 struct ScopedPaintLayer
22 ScopedPaintLayer(int layer_id) {
23 TRACE_EVENT_BEGIN1(internal::kCategory, internal::kPaintLayer,
24 internal::kLayerId, layer_id);
26 ~ScopedPaintLayer() {
27 TRACE_EVENT_END0(internal::kCategory, internal::kPaintLayer);
31 struct ScopedRasterTask
33 ScopedRasterTask(int layer_id) {
34 TRACE_EVENT_BEGIN1(internal::kCategory, internal::kRasterTask,
35 internal::kLayerId, layer_id);
37 ~ScopedRasterTask() {
38 TRACE_EVENT_END0(internal::kCategory, internal::kRasterTask);
42 struct ScopedLayerObjectTracker
43 : public base::debug::TraceScopedTrackableObject<int>
45 ScopedLayerObjectTracker(int layer_id)
46 : base::debug::TraceScopedTrackableObject<int>(
47 internal::kCategory,
48 internal::kLayerId,
49 layer_id) {
56 #endif