summaryrefslogtreecommitdiffstats
path: root/libgralloc/gpu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libgralloc/gpu.cpp')
-rw-r--r--libgralloc/gpu.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/libgralloc/gpu.cpp b/libgralloc/gpu.cpp
index ed4394aa3..c2382649c 100644
--- a/libgralloc/gpu.cpp
+++ b/libgralloc/gpu.cpp
@@ -229,16 +229,9 @@ int gpu_context_t::alloc_impl(int w, int h, int format, int usage,
(usage & GRALLOC_USAGE_PRIVATE_CP_BUFFER)) {
bufferType = BUFFER_TYPE_VIDEO;
}
- int err;
- private_module_t* m = reinterpret_cast<private_module_t*>(common.module);
- uint32_t bufferMask = m->bufferMask;
- uint32_t numBuffers = m->numBuffers;
- if (usage & GRALLOC_USAGE_HW_FB && (bufferMask < ((1LU << numBuffers) - 1))) {
- err = gralloc_alloc_framebuffer(size, usage, pHandle);
- } else {
- err = gralloc_alloc_buffer(size, usage, pHandle, bufferType,
- grallocFormat, alignedw, alignedh);
- }
+
+ int err = gralloc_alloc_buffer(size, usage, pHandle, bufferType,
+ grallocFormat, alignedw, alignedh);
if (err < 0) {
return err;