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

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

Issue 556303002: Adjust DrawingBuffer's visibility tracking behavior with lost context (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 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/core/html/canvas/WebGLRenderingContextBase.cpp ('k') | no next file » | 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 ef349001ef2377de78cb5a94b580bd712aeb6ef4..f0a287601cfc6d8885faed84a7728d7c40ef6349 100644
--- a/Source/platform/graphics/gpu/DrawingBuffer.cpp
+++ b/Source/platform/graphics/gpu/DrawingBuffer.cpp
@@ -194,7 +194,7 @@ void DrawingBuffer::setIsHidden(bool hidden)
if (m_isHidden == hidden)
return;
m_isHidden = hidden;
- if (m_isHidden)
+ if (m_isHidden && !m_context->isContextLost())
danakj 2014/09/10 15:11:49 Can you explain why you don't free mailboxes when
Justin Novosad 2014/09/10 17:09:50 Had a similar issue with 2D canvas. It's because y
danakj 2014/09/10 17:12:12 I'm not sure why you can't delete things? You can
Justin Novosad 2014/09/10 17:16:24 It's the deleting of mailboxes that was causing tr
danakj 2014/09/10 17:18:11 As long as we don't use them anything is okay, but
freeRecycledMailboxes();
}
@@ -208,10 +208,6 @@ void DrawingBuffer::freeRecycledMailboxes()
bool DrawingBuffer::prepareMailbox(WebExternalTextureMailbox* outMailbox, WebExternalBitmap* bitmap)
{
- ASSERT(!m_isHidden);
- if (!m_contentsChanged)
- return false;
-
if (m_destructionInProgress) {
// It can be hit in the following sequence.
// 1. WebGL draws something.
@@ -220,6 +216,9 @@ bool DrawingBuffer::prepareMailbox(WebExternalTextureMailbox* outMailbox, WebExt
// 4. Here.
return false;
}
+ ASSERT(!m_isHidden);
+ if (!m_contentsChanged)
+ return false;
// Resolve the multisampled buffer into m_colorBuffer texture.
if (m_multisampleMode != None)
« no previous file with comments | « Source/core/html/canvas/WebGLRenderingContextBase.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698