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

Unified Diff: Source/core/platform/PlatformInstrumentation.h

Issue 16878004: DevTools: add instrumentation for deferred canvas rasterization (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/platform/PlatformInstrumentation.h
diff --git a/Source/core/platform/PlatformInstrumentation.h b/Source/core/platform/PlatformInstrumentation.h
index 5c449930b19e3eee165fbd14b65430828f46b923..ec8bd8ab6758eea07b0e858ff42c76fedc8b8d1a 100644
--- a/Source/core/platform/PlatformInstrumentation.h
+++ b/Source/core/platform/PlatformInstrumentation.h
@@ -52,6 +52,7 @@ class PlatformInstrumentation {
public:
static const char ImageDecodeEvent[];
static const char ImageResizeEvent[];
+ static const char RasterizeCanvasEvent[];
static const char ImageTypeArgument[];
static const char CachedArgument[];
@@ -64,6 +65,9 @@ public:
static void willResizeImage(bool shouldCache);
static void didResizeImage();
+ static void willRasterizeCanvas();
+ static void didRasterizeCanvas();
+
private:
static const char CategoryName[];
@@ -100,6 +104,16 @@ inline void PlatformInstrumentation::didResizeImage()
m_client->didResizeImage();
}
+inline void PlatformInstrumentation::willRasterizeCanvas()
+{
+ TRACE_EVENT_BEGIN0(CategoryName, RasterizeCanvasEvent);
+}
+
+inline void PlatformInstrumentation::didRasterizeCanvas()
+{
+ TRACE_EVENT_END0(CategoryName, RasterizeCanvasEvent);
+}
+
} // namespace WebCore
#endif // PlatformInstrumentation_h

Powered by Google App Engine
This is Rietveld 408576698