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

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

Issue 381113003: Revert 177827 "WebGL: Free temporary GPU resources held by inact..." (Closed) Base URL: svn://svn.chromium.org/blink/
Patch Set: 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
Index: trunk/Source/platform/graphics/gpu/DrawingBuffer.cpp
===================================================================
--- trunk/Source/platform/graphics/gpu/DrawingBuffer.cpp (revision 177853)
+++ trunk/Source/platform/graphics/gpu/DrawingBuffer.cpp (working copy)
@@ -148,7 +148,6 @@
, m_sampleCount(0)
, m_packAlignment(4)
, m_destructionInProgress(false)
- , m_isHidden(false)
, m_contextEvictionManager(contextEvictionManager)
{
// Used by browser tests to detect the use of a DrawingBuffer.
@@ -186,26 +185,6 @@
m_layerComposited = true;
}
-
-void DrawingBuffer::setIsHidden(bool hidden)
-{
- ASSERT(!m_destructionInProgress);
- if (m_isHidden == hidden)
- return;
- m_isHidden = hidden;
- if (m_isHidden)
- freeRecycledMailboxes();
-}
-
-void DrawingBuffer::freeRecycledMailboxes()
-{
- if (m_recycledMailboxQueue.isEmpty())
- return;
- m_context->makeContextCurrent();
- while (!m_recycledMailboxQueue.isEmpty())
- deleteMailbox(m_recycledMailboxQueue.takeLast());
-}
-
blink::WebGraphicsContext3D* DrawingBuffer::context()
{
return m_context.get();
@@ -213,7 +192,6 @@
bool DrawingBuffer::prepareMailbox(blink::WebExternalTextureMailbox* outMailbox, blink::WebExternalBitmap* bitmap)
{
- ASSERT(!m_isHidden);
if (!m_contentsChanged)
return false;
@@ -299,8 +277,8 @@
void DrawingBuffer::mailboxReleased(const blink::WebExternalTextureMailbox& mailbox)
{
- if (m_destructionInProgress || m_isHidden) {
- mailboxReleasedWithoutRecycling(mailbox);
+ if (m_destructionInProgress) {
+ mailboxReleasedWhileDestructionInProgress(mailbox);
return;
}
@@ -317,7 +295,7 @@
ASSERT_NOT_REACHED();
}
-void DrawingBuffer::mailboxReleasedWithoutRecycling(const blink::WebExternalTextureMailbox& mailbox)
+void DrawingBuffer::mailboxReleasedWhileDestructionInProgress(const blink::WebExternalTextureMailbox& mailbox)
{
ASSERT(m_textureMailboxes.size());
m_context->makeContextCurrent();
« no previous file with comments | « trunk/Source/platform/graphics/gpu/DrawingBuffer.h ('k') | trunk/Source/platform/graphics/gpu/DrawingBufferTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698