diff --git a/libcopybit/Android.mk b/libcopybit/Android.mk index bba5679..45c4fa2 100644 --- a/libcopybit/Android.mk +++ b/libcopybit/Android.mk @@ -28,6 +28,9 @@ ifeq ($(TARGET_USES_C2D_COMPOSITION),true) LOCAL_CFLAGS += -DCOPYBIT_Z180=1 -DC2D_SUPPORT_DISPLAY=1 LOCAL_MODULE_TAGS := optional include $(BUILD_SHARED_LIBRARY) +ifeq ($(TARGET_USES_ION),true) + LOCAL_CFLAGS += -DUSE_ION +endif else ifneq ($(TARGET_BOARD_PLATFORM),msm7x30) include $(CLEAR_VARS) diff --git a/libcopybit/copybit_c2d.cpp b/libcopybit/copybit_c2d.cpp index f703f05..7680ab0 100644 --- a/libcopybit/copybit_c2d.cpp +++ b/libcopybit/copybit_c2d.cpp @@ -213,8 +213,10 @@ static uint32 c2d_get_gpuaddr(int device_fd, struct private_handle_t *handle) param.memtype = KGSL_USER_MEM_TYPE_PMEM; else if (handle->flags & private_handle_t::PRIV_FLAGS_USES_ASHMEM) param.memtype = KGSL_USER_MEM_TYPE_ASHMEM; +#ifdef USE_ION else if (handle->flags & private_handle_t::PRIV_FLAGS_USES_ION) param.memtype = KGSL_USER_MEM_TYPE_ION; +#endif else { LOGE("Invalid handle flags: 0x%x", handle->flags); return 0;