OSDN Git Service

Set the exact buffer size to Surf Tex
authorTeng-Hui Zhu <ztenghui@google.com>
Tue, 29 Nov 2011 22:43:29 +0000 (14:43 -0800)
committerTeng-Hui Zhu <ztenghui@google.com>
Tue, 29 Nov 2011 22:43:29 +0000 (14:43 -0800)
Originally, the extra space is used to get the queue working when the size is
1, which is only for testing purpose.
Now we should claim this back to save some memory.

bug:5666757
Change-Id: I2079a562d8414f89274d7fff3342eafe32fe287f

Source/WebCore/platform/graphics/android/TransferQueue.cpp

index b92edaf..bfe92e9 100644 (file)
@@ -97,7 +97,7 @@ void TransferQueue::initSharedSurfaceTextures(int width, int height)
 #endif
         m_ANW = new android::SurfaceTextureClient(m_sharedSurfaceTexture);
         m_sharedSurfaceTexture->setSynchronousMode(true);
-        m_sharedSurfaceTexture->setBufferCount(ST_BUFFER_NUMBER+1);
+        m_sharedSurfaceTexture->setBufferCount(ST_BUFFER_NUMBER);
 
         int result = native_window_set_buffers_geometry(m_ANW.get(),
                 width, height, HAL_PIXEL_FORMAT_RGBA_8888);