summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics/android/TransferQueue.cpp
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2011-09-07 20:04:24 -0700
committerChris Craik <ccraik@google.com>2011-09-08 11:53:34 -0700
commit2986d27084d881dbe6f9c3ae35430a5978b7e659 (patch)
treed668f05a054a03035d07bae9e001ab8282f3d6ae /Source/WebCore/platform/graphics/android/TransferQueue.cpp
parent321b119b4942dca02c7557790c7951695473ae7d (diff)
downloadexternal_webkit-2986d27084d881dbe6f9c3ae35430a5978b7e659.zip
external_webkit-2986d27084d881dbe6f9c3ae35430a5978b7e659.tar.gz
external_webkit-2986d27084d881dbe6f9c3ae35430a5978b7e659.tar.bz2
Deallocate graphics memory with onTrimMemory signals
bug:5269460 Deallocate the graphics memory backing a BaseTileTexture on onTrimMemory signals, and accordingly allocate it lazily, as needed. Change-Id: I52039723f47e6470e4fe8dd987d384017005390f
Diffstat (limited to 'Source/WebCore/platform/graphics/android/TransferQueue.cpp')
-rw-r--r--Source/WebCore/platform/graphics/android/TransferQueue.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/WebCore/platform/graphics/android/TransferQueue.cpp b/Source/WebCore/platform/graphics/android/TransferQueue.cpp
index b73f388..488c601 100644
--- a/Source/WebCore/platform/graphics/android/TransferQueue.cpp
+++ b/Source/WebCore/platform/graphics/android/TransferQueue.cpp
@@ -134,6 +134,9 @@ bool TransferQueue::checkObsolete(int index)
void TransferQueue::blitTileFromQueue(GLuint fboID, BaseTileTexture* destTex, GLuint srcTexId, GLenum srcTexTarget)
{
+ // guarantee that we have a texture to blit into
+ destTex->requireTexture();
+
// Then set up the FBO and copy the SurfTex content in.
glBindFramebuffer(GL_FRAMEBUFFER, fboID);
glFramebufferTexture2D(GL_FRAMEBUFFER,