summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics/android/GLUtils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/platform/graphics/android/GLUtils.cpp')
-rw-r--r--Source/WebCore/platform/graphics/android/GLUtils.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/WebCore/platform/graphics/android/GLUtils.cpp b/Source/WebCore/platform/graphics/android/GLUtils.cpp
index e32f1e9..1f04ff5 100644
--- a/Source/WebCore/platform/graphics/android/GLUtils.cpp
+++ b/Source/WebCore/platform/graphics/android/GLUtils.cpp
@@ -394,6 +394,11 @@ void GLUtils::updateSurfaceTextureWithBitmap(TextureInfo* texture, int x, int y,
int status = ANW->dequeueBuffer(ANW.get(), &anb);
checkSurfaceTextureError("dequeueBuffer", status);
+ if (status != NO_ERROR) { // FIXME: add proper error handling!
+ native_window_set_buffer_count(ANW.get(), 3);
+ return;
+ }
+
sp<android::GraphicBuffer> buf(new android::GraphicBuffer(anb, false));
status |= ANW->lockBuffer(ANW.get(), buf->getNativeBuffer());
checkSurfaceTextureError("lockBuffer", status);