| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef CC_DEBUG_FRAME_VIEWER_INSTRUMENTATION_H_ | 5 #ifndef CC_DEBUG_FRAME_VIEWER_INSTRUMENTATION_H_ |
| 6 #define CC_DEBUG_FRAME_VIEWER_INSTRUMENTATION_H_ | 6 #define CC_DEBUG_FRAME_VIEWER_INSTRUMENTATION_H_ |
| 7 | 7 |
| 8 #include "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
| 9 #include "cc/resources/tile.h" | 9 #include "cc/resources/tile.h" |
| 10 | 10 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 | 22 |
| 23 const char kAnalyzeTask[] = "AnalyzeTask"; | 23 const char kAnalyzeTask[] = "AnalyzeTask"; |
| 24 const char kRasterTask[] = "RasterTask"; | 24 const char kRasterTask[] = "RasterTask"; |
| 25 | 25 |
| 26 scoped_refptr<base::debug::ConvertableToTraceFormat> TileDataAsValue( | 26 scoped_refptr<base::debug::ConvertableToTraceFormat> TileDataAsValue( |
| 27 const void* tile_id, | 27 const void* tile_id, |
| 28 TileResolution tile_resolution, | 28 TileResolution tile_resolution, |
| 29 int source_frame_number, | 29 int source_frame_number, |
| 30 int layer_id) { | 30 int layer_id) { |
| 31 scoped_refptr<base::debug::TracedValue> res(new base::debug::TracedValue()); | 31 scoped_refptr<base::debug::TracedValue> res(new base::debug::TracedValue()); |
| 32 TracedValue::SetIDRef(tile_id, res, internal::kTileId); | 32 TracedValue::SetIDRef(tile_id, res.get(), internal::kTileId); |
| 33 res->SetString(internal::kTileResolution, | 33 res->SetString(internal::kTileResolution, |
| 34 TileResolutionToString(tile_resolution)); | 34 TileResolutionToString(tile_resolution)); |
| 35 res->SetInteger(internal::kSourceFrameNumber, source_frame_number); | 35 res->SetInteger(internal::kSourceFrameNumber, source_frame_number); |
| 36 res->SetInteger(internal::kLayerId, layer_id); | 36 res->SetInteger(internal::kLayerId, layer_id); |
| 37 return res; | 37 return res; |
| 38 } | 38 } |
| 39 | 39 |
| 40 } // namespace internal | 40 } // namespace internal |
| 41 | 41 |
| 42 class ScopedAnalyzeTask { | 42 class ScopedAnalyzeTask { |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 } | 81 } |
| 82 | 82 |
| 83 private: | 83 private: |
| 84 DISALLOW_COPY_AND_ASSIGN(ScopedRasterTask); | 84 DISALLOW_COPY_AND_ASSIGN(ScopedRasterTask); |
| 85 }; | 85 }; |
| 86 | 86 |
| 87 } // namespace frame_viewer_instrumentation | 87 } // namespace frame_viewer_instrumentation |
| 88 } // namespace cc | 88 } // namespace cc |
| 89 | 89 |
| 90 #endif // CC_DEBUG_FRAME_VIEWER_INSTRUMENTATION_H_ | 90 #endif // CC_DEBUG_FRAME_VIEWER_INSTRUMENTATION_H_ |
| OLD | NEW |