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

Unified Diff: Source/core/platform/graphics/chromium/Canvas2DLayerBridge.cpp

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
« no previous file with comments | « Source/core/platform/PlatformInstrumentation.cpp ('k') | Source/core/rendering/RenderLayerBacking.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/platform/graphics/chromium/Canvas2DLayerBridge.cpp
diff --git a/Source/core/platform/graphics/chromium/Canvas2DLayerBridge.cpp b/Source/core/platform/graphics/chromium/Canvas2DLayerBridge.cpp
index 8dc281fa16fec3e68dbf961c6abcfa40d73e32c0..6959990299972a47d59f3993a4c70821983e0c9e 100644
--- a/Source/core/platform/graphics/chromium/Canvas2DLayerBridge.cpp
+++ b/Source/core/platform/graphics/chromium/Canvas2DLayerBridge.cpp
@@ -30,6 +30,7 @@
#include "GrContext.h"
#include "SkDevice.h"
#include "SkSurface.h"
+#include "core/platform/PlatformInstrumentation.h"
#include "core/platform/chromium/TraceEvent.h"
#include "core/platform/graphics/GraphicsContext3D.h"
#include "core/platform/graphics/GraphicsLayer.h"
@@ -194,6 +195,7 @@ bool Canvas2DLayerBridge::prepareMailbox(WebKit::WebExternalTextureMailbox* outM
// Early exit if canvas was not drawn to since last prepareMailbox
if (image->uniqueID() == m_lastImageId)
return false;
+ PlatformInstrumentation::willRasterizeCanvas();
Justin Novosad 2013/06/26 21:06:49 This will only measure deferred canvas rendering i
caseq 2013/06/27 17:03:50 Thanks, Justin, it's very helpful! I was originall
m_lastImageId = image->uniqueID();
mailboxInfo = createMailboxInfo();
@@ -224,6 +226,7 @@ bool Canvas2DLayerBridge::prepareMailbox(WebKit::WebExternalTextureMailbox* outM
m_context->grContext()->resetContext();
*outMailbox = mailboxInfo->m_mailbox;
+ PlatformInstrumentation::didRasterizeCanvas();
return true;
#else
ASSERT_NOT_REACHED();
« no previous file with comments | « Source/core/platform/PlatformInstrumentation.cpp ('k') | Source/core/rendering/RenderLayerBacking.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698