summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libs/ui/GraphicBufferAllocator.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/libs/ui/GraphicBufferAllocator.cpp b/libs/ui/GraphicBufferAllocator.cpp
index 9ad314a..470f58a 100644
--- a/libs/ui/GraphicBufferAllocator.cpp
+++ b/libs/ui/GraphicBufferAllocator.cpp
@@ -228,17 +228,21 @@ status_t GraphicBufferAllocator::alloc(uint32_t w, uint32_t h,
BufferLiberatorThread::maybeWaitForLiberation();
#ifdef QCOM_BSP
- if (bufferSize)
- err = mAllocDev->allocSize(mAllocDev, w, h,
+ err = mAllocDev->allocSize(mAllocDev, w, h,
format, usage, handle, stride, bufferSize);
- else
+#else
+ err = mAllocDev->alloc(mAllocDev, w, h, format, usage, handle, stride);
#endif
- err = mAllocDev->alloc(mAllocDev, w, h, format, usage, handle, stride);
if (err != NO_ERROR) {
ALOGW("WOW! gralloc alloc failed, waiting for pending frees!");
BufferLiberatorThread::waitForLiberation();
+#ifdef QCOM_BSP
+ err = mAllocDev->allocSize(mAllocDev, w, h,
+ format, usage, handle, stride, bufferSize);
+#else
err = mAllocDev->alloc(mAllocDev, w, h, format, usage, handle, stride);
+#endif
}
#ifdef QCOM_BSP