| 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 b73872525bc1c6019b688410e8ba7aff7273d0c7..99c10e624e1c9ab499ccfcb1f60068fb29f6e3ca 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp
|
| +++ b/third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.cpp
|
| @@ -976,6 +976,16 @@ void Canvas2DLayerBridge::mailboxReleased(const gpu::Mailbox& mailbox,
|
| DCHECK(releasedMailboxInfo != firstMailbox);
|
| }
|
|
|
| +#if USE_IOSURFACE_FOR_2D_CANVAS
|
| + if (releasedMailboxInfo->m_imageInfo && !lostResource) {
|
| + if (contextLost) {
|
| + deleteCHROMIUMImage(releasedMailboxInfo->m_imageInfo);
|
| + } else {
|
| + m_imageInfoCache.append(releasedMailboxInfo->m_imageInfo);
|
| + }
|
| + }
|
| +#endif // USE_IOSURFACE_FOR_2D_CANVAS
|
| +
|
| if (!contextLost) {
|
| // Invalidate texture state in case the compositor altered it since the
|
| // copy-on-write.
|
| @@ -1001,12 +1011,6 @@ void Canvas2DLayerBridge::mailboxReleased(const gpu::Mailbox& mailbox,
|
| }
|
| }
|
| }
|
| -
|
| -#if USE_IOSURFACE_FOR_2D_CANVAS
|
| - if (releasedMailboxInfo->m_imageInfo && !lostResource) {
|
| - m_imageInfoCache.append(releasedMailboxInfo->m_imageInfo);
|
| - }
|
| -#endif // USE_IOSURFACE_FOR_2D_CANVAS
|
| }
|
|
|
| RefPtr<Canvas2DLayerBridge> selfRef;
|
|
|