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

Unified Diff: Source/platform/graphics/gpu/DrawingBuffer.cpp

Issue 369043003: Let canvas decide how to handle the case of resource lost reported by client: 2D part (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: not use lostResource flag Created 6 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
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..2f6340ba22f2cdff9e74c9f816d4963862855109 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)
danakj 2014/07/03 15:09:02 why is this new variable not used?
dshwang 2014/07/03 16:20:17 After reading https://code.google.com/p/chromium/i
Hongbo Min 2014/07/07 04:30:28 Thanks your summary, dshwang@. The reason why los
{
- if (m_destructionInProgress) {
+ if (m_destructionInProgress && !m_context->isContextLost()) {
dshwang 2014/07/07 09:18:14 As my explanation is applied to code, this if stat
Hongbo Min 2014/07/07 09:39:47 Thanks for your comments. It seems mailboxReleased
dshwang 2014/07/07 10:09:43 afaik, when we use invalid context like TexImage2D
mailboxReleasedWhileDestructionInProgress(mailbox);
return;
}
@@ -289,7 +289,8 @@ void DrawingBuffer::mailboxReleased(const blink::WebExternalTextureMailbox& mail
mailboxInfo->mailbox.syncPoint = mailbox.syncPoint;
ASSERT(mailboxInfo->m_parentDrawingBuffer.get() == this);
mailboxInfo->m_parentDrawingBuffer.clear();
- m_recycledMailboxQueue.prepend(mailboxInfo->mailbox);
+ if (!m_context->isContextLost())
dshwang 2014/07/07 09:18:14 remove
+ m_recycledMailboxQueue.prepend(mailboxInfo->mailbox);
return;
}
}

Powered by Google App Engine
This is Rietveld 408576698