diff --git a/graphics/java/android/graphics/RecordingCanvas.java b/graphics/java/android/graphics/RecordingCanvas.java index a5184f28dbc15..635e78e674be3 100644 --- a/graphics/java/android/graphics/RecordingCanvas.java +++ b/graphics/java/android/graphics/RecordingCanvas.java @@ -276,9 +276,7 @@ public final class RecordingCanvas extends BaseRecordingCanvas { @CriticalNative private static native void nResetDisplayListCanvas(long canvas, long node, int width, int height); - @CriticalNative private static native int nGetMaximumTextureWidth(); - @CriticalNative private static native int nGetMaximumTextureHeight(); @CriticalNative private static native void nEnableZ(long renderer, boolean enableZ); diff --git a/libs/hwui/jni/android_graphics_DisplayListCanvas.cpp b/libs/hwui/jni/android_graphics_DisplayListCanvas.cpp index f060bb32031aa..426644ee6a4e3 100644 --- a/libs/hwui/jni/android_graphics_DisplayListCanvas.cpp +++ b/libs/hwui/jni/android_graphics_DisplayListCanvas.cpp @@ -84,7 +84,7 @@ static void android_view_DisplayListCanvas_resetDisplayListCanvas(CRITICAL_JNI_P 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) return android::uirenderer::renderthread::RenderProxy::maxTextureSize(); #else @@ -175,14 +175,14 @@ static void android_view_DisplayListCanvas_drawWebViewFunctor(CRITICAL_JNI_PARAM const char* const kClassPathName = "android/graphics/RecordingCanvas"; static JNINativeMethod gMethods[] = { + {"nGetMaximumTextureWidth", "()I", (void*)android_view_DisplayListCanvas_getMaxTextureSize}, + {"nGetMaximumTextureHeight", "()I", + (void*)android_view_DisplayListCanvas_getMaxTextureSize}, // ------------ @CriticalNative -------------- {"nCreateDisplayListCanvas", "(JII)J", (void*)android_view_DisplayListCanvas_createDisplayListCanvas}, {"nResetDisplayListCanvas", "(JJII)V", (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}, {"nFinishRecording", "(JJ)V", (void*)android_view_DisplayListCanvas_finishRecording}, {"nDrawRenderNode", "(JJ)V", (void*)android_view_DisplayListCanvas_drawRenderNode},