summaryrefslogtreecommitdiffstats
path: root/Source/WebCore
diff options
context:
space:
mode:
authorTeng-Hui Zhu <ztenghui@google.com>2011-12-02 16:32:03 -0800
committerTeng-Hui Zhu <ztenghui@google.com>2011-12-05 10:38:48 -0800
commitb3266cb41eee1fc7da88e5e091bab29ae25685e7 (patch)
tree7f1dfd25cc89eabb62adf0bd6367fa64bbe77708 /Source/WebCore
parentd07292c75082db457ad498747c0b05d38a14e8d7 (diff)
downloadexternal_webkit-b3266cb41eee1fc7da88e5e091bab29ae25685e7.zip
external_webkit-b3266cb41eee1fc7da88e5e091bab29ae25685e7.tar.gz
external_webkit-b3266cb41eee1fc7da88e5e091bab29ae25685e7.tar.bz2
Increase the buffer count from query result
Change-Id: I15741749f9b9a3977bdbfd737ba639ddfaaff9d4
Diffstat (limited to 'Source/WebCore')
-rw-r--r--Source/WebCore/platform/graphics/android/TransferQueue.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/WebCore/platform/graphics/android/TransferQueue.cpp b/Source/WebCore/platform/graphics/android/TransferQueue.cpp
index d27ee6f..bb7ed9b 100644
--- a/Source/WebCore/platform/graphics/android/TransferQueue.cpp
+++ b/Source/WebCore/platform/graphics/android/TransferQueue.cpp
@@ -97,7 +97,11 @@ 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);
+
+ int extraBuffersNeeded = 0;
+ m_ANW->query(m_ANW.get(), NATIVE_WINDOW_MIN_UNDEQUEUED_BUFFERS,
+ &extraBuffersNeeded);
+ m_sharedSurfaceTexture->setBufferCount(ST_BUFFER_NUMBER + extraBuffersNeeded);
int result = native_window_set_buffers_geometry(m_ANW.get(),
width, height, HAL_PIXEL_FORMAT_RGBA_8888);