From 2986d27084d881dbe6f9c3ae35430a5978b7e659 Mon Sep 17 00:00:00 2001 From: Chris Craik Date: Wed, 7 Sep 2011 20:04:24 -0700 Subject: 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 --- Source/WebCore/platform/graphics/android/TransferQueue.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Source/WebCore/platform/graphics/android/TransferQueue.cpp') 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, -- cgit v1.1