diff options
Diffstat (limited to 'chromium/cc/debug/devtools_instrumentation.h')
-rw-r--r-- | chromium/cc/debug/devtools_instrumentation.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/chromium/cc/debug/devtools_instrumentation.h b/chromium/cc/debug/devtools_instrumentation.h index 7a77d404454..eea9e62f02a 100644 --- a/chromium/cc/debug/devtools_instrumentation.h +++ b/chromium/cc/debug/devtools_instrumentation.h @@ -14,11 +14,13 @@ namespace internal { const char kCategory[] = "cc,devtools"; const char kLayerId[] = "layerId"; const char kLayerTreeId[] = "layerTreeId"; +const char kPixelRefId[] = "pixelRefId"; + +const char kImageDecodeTask[] = "ImageDecodeTask"; } const char kPaintLayer[] = "PaintLayer"; const char kRasterTask[] = "RasterTask"; -const char kImageDecodeTask[] = "ImageDecodeTask"; const char kPaintSetup[] = "PaintSetup"; const char kUpdateLayer[] = "UpdateLayer"; @@ -38,6 +40,19 @@ class ScopedLayerTask { DISALLOW_COPY_AND_ASSIGN(ScopedLayerTask); }; +class ScopedImageDecodeTask { + public: + explicit ScopedImageDecodeTask(void* pixelRef) { + TRACE_EVENT_BEGIN1(internal::kCategory, internal::kImageDecodeTask, + internal::kPixelRefId, reinterpret_cast<uint64>(pixelRef)); + } + ~ScopedImageDecodeTask() { + TRACE_EVENT_END0(internal::kCategory, internal::kImageDecodeTask); + } + private: + DISALLOW_COPY_AND_ASSIGN(ScopedImageDecodeTask); +}; + class ScopedLayerTreeTask { public: ScopedLayerTreeTask(const char* event_name, |