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

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: re-order logical operator for contextLost 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 | « Source/platform/graphics/gpu/DrawingBuffer.h ('k') | public/platform/WebExternalTextureLayerClient.h » ('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 796ba7ce1ca674afdda04b83722a55bae88ec02d..5256813cf36b61a607d35f39a781e407f41b4e9c 100644
--- a/Source/platform/graphics/gpu/DrawingBuffer.cpp
+++ b/Source/platform/graphics/gpu/DrawingBuffer.cpp
@@ -275,8 +275,13 @@ 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 (lostResource) {
+ // TODO(hmin): handle the case if the resource is lost.
+ return;
+ }
+
if (m_destructionInProgress) {
mailboxReleasedWhileDestructionInProgress(mailbox);
return;
« no previous file with comments | « Source/platform/graphics/gpu/DrawingBuffer.h ('k') | public/platform/WebExternalTextureLayerClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698