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

Unified Diff: third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp

Issue 2738573002: Streamline the presentation of ImageBitmapRenderingContext (Closed)
Patch Set: Fixed expectations Created 3 years, 8 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: third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp b/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp
index a923d797048a31e8519d630e5914fdceae7a2c28..baef5a9cb77590dd552fb166808fc209296a1894 100644
--- a/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp
+++ b/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp
@@ -981,8 +981,9 @@ void Canvas2DLayerBridge::mailboxReleased(const gpu::Mailbox& mailbox,
#if USE_IOSURFACE_FOR_2D_CANVAS
DCHECK(!releasedMailboxInfo->m_imageInfo);
#endif // USE_IOSURFACE_FOR_2D_CANVAS
- if (syncToken.HasData()) {
- contextGL()->WaitSyncTokenCHROMIUM(syncToken.GetConstData());
+ gpu::gles2::GLES2Interface* gl = contextGL();
+ if (syncToken.HasData() && gl) {
+ gl->WaitSyncTokenCHROMIUM(syncToken.GetConstData());
}
GrTexture* texture = releasedMailboxInfo->m_image->getTexture();
if (texture) {
@@ -992,7 +993,6 @@ void Canvas2DLayerBridge::mailboxReleased(const gpu::Mailbox& mailbox,
texture->textureParamsModified();
// Break the mailbox association to avoid leaking mailboxes every time
// skia recycles a texture.
- gpu::gles2::GLES2Interface* gl = contextGL();
if (gl)
gl->ProduceTextureDirectCHROMIUM(
0, GL_TEXTURE_2D, releasedMailboxInfo->m_mailbox.name);
« no previous file with comments | « third_party/WebKit/Source/platform/BUILD.gn ('k') | third_party/WebKit/Source/platform/graphics/StaticBitmapImage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698