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

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

Issue 415123002: Let canvas decide how to handle the lost resource: WebGL part (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rename test case Created 6 years, 5 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
« no previous file with comments | « no previous file | Source/platform/graphics/gpu/DrawingBufferTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/gpu/DrawingBuffer.cpp
diff --git a/Source/platform/graphics/gpu/DrawingBuffer.cpp b/Source/platform/graphics/gpu/DrawingBuffer.cpp
index 8b013993fa60f04726134cfbe2c9c91581745d8a..aca1f945bfd666f168738bc11015bc9537f2fa5a 100644
--- a/Source/platform/graphics/gpu/DrawingBuffer.cpp
+++ b/Source/platform/graphics/gpu/DrawingBuffer.cpp
@@ -277,12 +277,7 @@ bool DrawingBuffer::prepareMailbox(blink::WebExternalTextureMailbox* outMailbox,
void DrawingBuffer::mailboxReleased(const blink::WebExternalTextureMailbox& mailbox, bool lostResource)
{
- if (lostResource) {
- // TODO(hmin): handle the case if the resource is lost.
- return;
- }
-
- if (m_destructionInProgress) {
+ if (m_destructionInProgress || m_context->isContextLost() || lostResource) {
mailboxReleasedWhileDestructionInProgress(mailbox);
return;
}
« no previous file with comments | « no previous file | Source/platform/graphics/gpu/DrawingBufferTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698