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

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

Issue 16896007: Timeline: add support 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.h ('k') | public/webpage/WebDevToolsAgent.h » ('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 0c25d1d773f4465d4a9523222349b8654fd471a5..604395add6c7a7dd045b3cb7b886339163e002f3 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"
@@ -193,6 +194,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();
m_lastImageId = image->uniqueID();
mailboxInfo = createMailboxInfo();
@@ -223,6 +225,7 @@ bool Canvas2DLayerBridge::prepareMailbox(WebKit::WebExternalTextureMailbox* outM
m_context->bindTexture(GraphicsContext3D::TEXTURE_2D, savedTexBinding);
*outMailbox = mailboxInfo->m_mailbox;
+ PlatformInstrumentation::didRasterizeCanvas();
return true;
#else
ASSERT_NOT_REACHED();
« no previous file with comments | « Source/core/platform/PlatformInstrumentation.h ('k') | public/webpage/WebDevToolsAgent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698