| 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 7129cc32c4f599cccddae76d3a5b4cf4b94165d7..9b85b45ee3b5994aff2ed8f58071f59780141ac2 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp
|
| +++ b/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp
|
| @@ -974,8 +974,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) {
|
| @@ -985,7 +986,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);
|
|
|