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

Commit 465eefb9 authored by John Reck's avatar John Reck Committed by android-build-merger
Browse files

Merge "fix race condition between HWUI cache and renderThread" am: 2c2b5e85

am: 4354ae98

* commit '4354ae98':
  fix race condition between HWUI cache and renderThread
parents 9e5341f4 4354ae98
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -72,10 +72,16 @@ static void android_view_DisplayListCanvas_callDrawGLFunction(JNIEnv* env, jobje
// ----------------------------------------------------------------------------

static jint android_view_DisplayListCanvas_getMaxTextureWidth(JNIEnv* env, jobject clazz) {
    if (!Caches::hasInstance()) {
        android::uirenderer::renderthread::RenderProxy::staticFence();
    }
    return Caches::getInstance().maxTextureSize;
}

static jint android_view_DisplayListCanvas_getMaxTextureHeight(JNIEnv* env, jobject clazz) {
    if (!Caches::hasInstance()) {
        android::uirenderer::renderthread::RenderProxy::staticFence();
    }
    return Caches::getInstance().maxTextureSize;
}

+6 −0
Original line number Diff line number Diff line
@@ -384,6 +384,12 @@ void RenderProxy::fence() {
    postAndWait(task);
}

void RenderProxy::staticFence() {
    SETUP_TASK(fence);
    UNUSED(args);
    staticPostAndWait(task);
}

CREATE_BRIDGE1(stopDrawing, CanvasContext* context) {
    args->context->stopDrawing();
    return nullptr;
+1 −0
Original line number Diff line number Diff line
@@ -93,6 +93,7 @@ public:
    ANDROID_API static void overrideProperty(const char* name, const char* value);

    ANDROID_API void fence();
    ANDROID_API static void staticFence();
    ANDROID_API void stopDrawing();
    ANDROID_API void notifyFramePending();