diff options
Diffstat (limited to 'libs')
-rw-r--r-- | libs/hwui/Android.mk | 4 | ||||
-rw-r--r-- | libs/hwui/renderthread/RenderProxy.cpp | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/libs/hwui/Android.mk b/libs/hwui/Android.mk index 91e289c..fb9ac1e 100644 --- a/libs/hwui/Android.mk +++ b/libs/hwui/Android.mk @@ -2,6 +2,10 @@ LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk +ifeq ($(TARGET_REQUIRES_SYNCHRONOUS_SETSURFACE),true) + LOCAL_CFLAGS += -DREQUIRES_SYNCHRONOUS_SETSURFACE +endif + LOCAL_MODULE_CLASS := SHARED_LIBRARIES LOCAL_MODULE := libhwui diff --git a/libs/hwui/renderthread/RenderProxy.cpp b/libs/hwui/renderthread/RenderProxy.cpp index 30f0073..939c0c7 100644 --- a/libs/hwui/renderthread/RenderProxy.cpp +++ b/libs/hwui/renderthread/RenderProxy.cpp @@ -148,7 +148,11 @@ void RenderProxy::initialize(const sp<ANativeWindow>& window) { SETUP_TASK(initialize); args->context = mContext; args->window = window.get(); +#ifdef REQUIRES_SYNCHRONOUS_SETSURFACE + postAndWait(task); +#else post(task); +#endif } CREATE_BRIDGE2(updateSurface, CanvasContext* context, ANativeWindow* window) { |