don't use compile-time configuration of libgui as much as possible
We now detect at runtime which sync features to use, which
allows us to remove a lot of the compile-time configuration
options. There is still one option though, to disable
KHR_fence_sync on some devices (which are more efficient
without it).
- added a backdoor to get the vendor's EGL strings
the new logic is:
- use always ANDROID_native_fence_sync if available
- fallback to KHR_fence_sync if available and not disabled
by the compile-time option
- use KHR_wait_sync if available and either of the above is
enabled
Change-Id: I9c4b49d9ff1151faf902cc93bd53ea5f205aaabf
diff --git a/libs/gui/Android.mk b/libs/gui/Android.mk
index 5c7bb4c..8fcfa7d 100644
--- a/libs/gui/Android.mk
+++ b/libs/gui/Android.mk
@@ -26,6 +26,7 @@
Surface.cpp \
SurfaceControl.cpp \
SurfaceComposerClient.cpp \
+ SyncFeatures.cpp \
LOCAL_SHARED_LIBRARIES := \
libbinder \
@@ -39,23 +40,11 @@
LOCAL_MODULE:= libgui
-ifeq ($(TARGET_BOARD_PLATFORM), omap4)
- LOCAL_CFLAGS += -DUSE_FENCE_SYNC
+ifeq ($(TARGET_BOARD_PLATFORM), tegra)
+ LOCAL_CFLAGS += -DDONT_USE_FENCE_SYNC
endif
-ifeq ($(TARGET_BOARD_PLATFORM), s5pc110)
- LOCAL_CFLAGS += -DUSE_FENCE_SYNC
-endif
-ifeq ($(TARGET_BOARD_PLATFORM), exynos5)
- LOCAL_CFLAGS += -DUSE_NATIVE_FENCE_SYNC
- LOCAL_CFLAGS += -DUSE_WAIT_SYNC
-endif
-ifneq ($(filter generic%,$(TARGET_DEVICE)),)
- # Emulator build
- LOCAL_CFLAGS += -DUSE_FENCE_SYNC
-endif
-
-ifeq ($(TARGET_BOARD_PLATFORM), msm8960)
- LOCAL_CFLAGS += -DUSE_NATIVE_FENCE_SYNC
+ifeq ($(TARGET_BOARD_PLATFORM), tegra3)
+ LOCAL_CFLAGS += -DDONT_USE_FENCE_SYNC
endif
include $(BUILD_SHARED_LIBRARY)