diff options
author | codeworkx <codeworkx@cyanogenmod.org> | 2012-12-03 21:22:06 +0100 |
---|---|---|
committer | codeworkx <codeworkx@cyanogenmod.org> | 2012-12-03 21:22:06 +0100 |
commit | 5125ccc5b6d9a4bf1256a4a57f6d5f7d0ebe26c9 (patch) | |
tree | 98af42a2b60a7df315a09089073b1b9fee77ab34 | |
parent | 00b0625388d05ded0b7ae14358355a86ebb2da64 (diff) | |
download | hardware_samsung-5125ccc5b6d9a4bf1256a4a57f6d5f7d0ebe26c9.zip hardware_samsung-5125ccc5b6d9a4bf1256a4a57f6d5f7d0ebe26c9.tar.gz hardware_samsung-5125ccc5b6d9a4bf1256a4a57f6d5f7d0ebe26c9.tar.bz2 |
gralloc: avoid using framebuffer
Change-Id: I216b4b67f09729d00d337512ab17ff378f218a33
-rw-r--r-- | exynos4/hal/libgralloc_ump/alloc_device.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/exynos4/hal/libgralloc_ump/alloc_device.cpp b/exynos4/hal/libgralloc_ump/alloc_device.cpp index c2df282..d49eb8b 100644 --- a/exynos4/hal/libgralloc_ump/alloc_device.cpp +++ b/exynos4/hal/libgralloc_ump/alloc_device.cpp @@ -420,9 +420,17 @@ static int alloc_device_alloc(alloc_device_t* dev, int w, int h, int format, const uint32_t bufferMask = m->bufferMask; const uint32_t numBuffers = m->numBuffers; pthread_mutex_lock(&l_surface); + + // Remove the hardware framebuffer flag to avoid lags + usage = usage & ~GRALLOC_USAGE_HW_FB; + +/* + * Using the framebuffer causes lags, so don't use it at all ;-) + * if (usage & GRALLOC_USAGE_HW_FB && (bufferMask < ((1LU << numBuffers) - 1))) err = gralloc_alloc_framebuffer(dev, size, usage, pHandle, w, h, format, 32); else +*/ err = gralloc_alloc_buffer(dev, size, usage, pHandle, w, h, format, 0, (int)stride_raw, (int)stride); pthread_mutex_unlock(&l_surface); |