Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0f799064 authored by Christopher R. Palmer's avatar Christopher R. Palmer Committed by Gerrit Code Review
Browse files

hwui: Allow devices to opt-out of asynchronouse setSurface initialization

Not all devices seem to be able to deal with this so let them opt
out of it, even though it does provide a UI slow-down.

Change-Id: I402193c2c930e815ba69071142b9093a0630b590
parent 76323e41
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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

+4 −0
Original line number Diff line number Diff line
@@ -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) {