libgui: Don't assign handle to NULL after free is common

Reportedly Mali and PowerVR GPUs are crashing when setting handle to NULL
So we will set a flag for the devices that might need this aswell

Set BOARD_EGL_NEEDS_HANDLE_VALUE=true in BoardConfig.mk to use

Change-Id: I6c967f62dc6adced7583d7b2045d11cf5b25fc80
This commit is contained in:
Caio Schnepper 2015-11-25 17:51:30 -02:00
parent eed845539a
commit 8c39282e31
2 changed files with 5 additions and 1 deletions

View File

@ -56,6 +56,10 @@ ifneq ($(BOARD_FRAMEBUFFER_FORCE_FORMAT),)
LOCAL_CFLAGS += -DFRAMEBUFFER_FORCE_FORMAT=$(BOARD_FRAMEBUFFER_FORCE_FORMAT)
endif
ifeq ($(BOARD_EGL_NEEDS_HANDLE_VALUE),true)
LOCAL_CFLAGS += -DEGL_NEEDS_HANDLE
endif
LOCAL_MODULE := libui
include $(BUILD_SHARED_LIBRARY)

View File

@ -113,7 +113,7 @@ void GraphicBuffer::free_handle()
allocator.free(handle);
}
#ifndef EXYNOS4_ENHANCEMENTS
#ifndef EGL_NEEDS_HANDLE
handle = NULL;
#endif