summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--exynos4/hal/libgralloc_ump/Android.mk4
-rw-r--r--exynos4/hal/libgralloc_ump/alloc_device.cpp3
2 files changed, 6 insertions, 1 deletions
diff --git a/exynos4/hal/libgralloc_ump/Android.mk b/exynos4/hal/libgralloc_ump/Android.mk
index 0cd5ecb..bc15ec0 100644
--- a/exynos4/hal/libgralloc_ump/Android.mk
+++ b/exynos4/hal/libgralloc_ump/Android.mk
@@ -68,4 +68,8 @@ ifeq ($(TARGET_USES_GRALLOC1), true)
LOCAL_CFLAGS += -DADVERTISE_GRALLOC1
endif
+ifeq ($(TARGET_USES_GRALLOC_HIDL), true)
+LOCAL_CFLAGS += -DUSE_GRALLOC_HIDL
+endif
+
include $(BUILD_SHARED_LIBRARY)
diff --git a/exynos4/hal/libgralloc_ump/alloc_device.cpp b/exynos4/hal/libgralloc_ump/alloc_device.cpp
index 1b64dfa..61be7c5 100644
--- a/exynos4/hal/libgralloc_ump/alloc_device.cpp
+++ b/exynos4/hal/libgralloc_ump/alloc_device.cpp
@@ -689,8 +689,9 @@ static int alloc_device_free(alloc_device_t* dev, buffer_handle_t handle)
/* free this buffer */
const size_t bufferSize = m->finfo.line_length * m->info.yres;
int index = (hnd->base - m->framebuffer->base) / bufferSize;
-
+#ifndef USE_GRALLOC_HIDL
m->bufferMask &= ~(1<<index);
+#endif
close(hnd->fd);
} else if (hnd->flags & private_handle_t::PRIV_FLAGS_USES_UMP) {