Index: Source/platform/graphics/gpu/DrawingBuffer.cpp |
diff --git a/Source/platform/graphics/gpu/DrawingBuffer.cpp b/Source/platform/graphics/gpu/DrawingBuffer.cpp |
index 0ec4bf9179012c1217b92aa3362f4f7d02e1e9df..dfb2056ba6cb307076c70f302e01a21bb9195c14 100644 |
--- a/Source/platform/graphics/gpu/DrawingBuffer.cpp |
+++ b/Source/platform/graphics/gpu/DrawingBuffer.cpp |
@@ -276,9 +276,9 @@ bool DrawingBuffer::prepareMailbox(blink::WebExternalTextureMailbox* outMailbox, |
return true; |
} |
-void DrawingBuffer::mailboxReleased(const blink::WebExternalTextureMailbox& mailbox) |
+void DrawingBuffer::mailboxReleased(const blink::WebExternalTextureMailbox& mailbox, bool lostResource) |
{ |
- if (m_destructionInProgress) { |
+ if (m_destructionInProgress || m_context->isContextLost() || lostResource) { |
Ken Russell (switch to Gerrit)
2014/07/15 22:22:33
Could you please add a new test to DrawingBufferTe
|
mailboxReleasedWhileDestructionInProgress(mailbox); |
return; |
} |
@@ -354,6 +354,7 @@ void DrawingBuffer::deleteMailbox(const blink::WebExternalTextureMailbox& mailbo |
deleteChromiumImageForTexture(&m_textureMailboxes[i]->textureInfo); |
m_context->deleteTexture(m_textureMailboxes[i]->textureInfo.textureId); |
+ m_textureMailboxes[i]->m_parentDrawingBuffer.clear(); |
Ken Russell (switch to Gerrit)
2014/07/15 22:22:33
Why is this necessary? The call to m_textureMailbo
|
m_textureMailboxes.remove(i); |
return; |
} |