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

Commit d5ab703c authored by John Reck's avatar John Reck
Browse files

Removing incorrect @CriticalNative

nGetMaximumTextureWidth/Height are blocking calls into
RenderThread and thus inappropriate to be marked as
@CriticalNative

Fixes: 292016309
Test: build & boots; no functional changes otherwise
Change-Id: Iebcbc119e75977905c64711f72c2f33200608f8c
parent bb9ee079
Loading
Loading
Loading
Loading
+0 −2
Original line number Original line Diff line number Diff line
@@ -276,9 +276,7 @@ public final class RecordingCanvas extends BaseRecordingCanvas {
    @CriticalNative
    @CriticalNative
    private static native void nResetDisplayListCanvas(long canvas, long node,
    private static native void nResetDisplayListCanvas(long canvas, long node,
            int width, int height);
            int width, int height);
    @CriticalNative
    private static native int nGetMaximumTextureWidth();
    private static native int nGetMaximumTextureWidth();
    @CriticalNative
    private static native int nGetMaximumTextureHeight();
    private static native int nGetMaximumTextureHeight();
    @CriticalNative
    @CriticalNative
    private static native void nEnableZ(long renderer, boolean enableZ);
    private static native void nEnableZ(long renderer, boolean enableZ);
+4 −4
Original line number Original line Diff line number Diff line
@@ -84,7 +84,7 @@ static void android_view_DisplayListCanvas_resetDisplayListCanvas(CRITICAL_JNI_P
    canvas->resetRecording(width, height, renderNode);
    canvas->resetRecording(width, height, renderNode);
}
}


static jint android_view_DisplayListCanvas_getMaxTextureSize(CRITICAL_JNI_PARAMS) {
static jint android_view_DisplayListCanvas_getMaxTextureSize(JNIEnv*, jobject) {
#ifdef __ANDROID__ // Layoutlib does not support RenderProxy (RenderThread)
#ifdef __ANDROID__ // Layoutlib does not support RenderProxy (RenderThread)
    return android::uirenderer::renderthread::RenderProxy::maxTextureSize();
    return android::uirenderer::renderthread::RenderProxy::maxTextureSize();
#else
#else
@@ -175,14 +175,14 @@ static void android_view_DisplayListCanvas_drawWebViewFunctor(CRITICAL_JNI_PARAM
const char* const kClassPathName = "android/graphics/RecordingCanvas";
const char* const kClassPathName = "android/graphics/RecordingCanvas";


static JNINativeMethod gMethods[] = {
static JNINativeMethod gMethods[] = {
        {"nGetMaximumTextureWidth", "()I", (void*)android_view_DisplayListCanvas_getMaxTextureSize},
        {"nGetMaximumTextureHeight", "()I",
         (void*)android_view_DisplayListCanvas_getMaxTextureSize},
        // ------------ @CriticalNative --------------
        // ------------ @CriticalNative --------------
        {"nCreateDisplayListCanvas", "(JII)J",
        {"nCreateDisplayListCanvas", "(JII)J",
         (void*)android_view_DisplayListCanvas_createDisplayListCanvas},
         (void*)android_view_DisplayListCanvas_createDisplayListCanvas},
        {"nResetDisplayListCanvas", "(JJII)V",
        {"nResetDisplayListCanvas", "(JJII)V",
         (void*)android_view_DisplayListCanvas_resetDisplayListCanvas},
         (void*)android_view_DisplayListCanvas_resetDisplayListCanvas},
        {"nGetMaximumTextureWidth", "()I", (void*)android_view_DisplayListCanvas_getMaxTextureSize},
        {"nGetMaximumTextureHeight", "()I",
         (void*)android_view_DisplayListCanvas_getMaxTextureSize},
        {"nEnableZ", "(JZ)V", (void*)android_view_DisplayListCanvas_enableZ},
        {"nEnableZ", "(JZ)V", (void*)android_view_DisplayListCanvas_enableZ},
        {"nFinishRecording", "(JJ)V", (void*)android_view_DisplayListCanvas_finishRecording},
        {"nFinishRecording", "(JJ)V", (void*)android_view_DisplayListCanvas_finishRecording},
        {"nDrawRenderNode", "(JJ)V", (void*)android_view_DisplayListCanvas_drawRenderNode},
        {"nDrawRenderNode", "(JJ)V", (void*)android_view_DisplayListCanvas_drawRenderNode},