Class SurfaceNatives


  • public final class SurfaceNatives
    extends Object
    Native methods for Surface JNI registration.

    Native method signatures are derived from https://cs.android.com/android/platform/superproject/+/android-12.0.0_r1:frameworks/base/graphics/java/android/view/Surface.java

    • Method Detail

      • nativeCreateFromSurfaceTexture

        public static long nativeCreateFromSurfaceTexture​(SurfaceTexture surfaceTexture)
      • nativeCreateFromSurfaceControl

        public static long nativeCreateFromSurfaceControl​(long surfaceControlNativeObject)
      • nativeGetFromSurfaceControl

        public static long nativeGetFromSurfaceControl​(long surfaceObject,
                                                       long surfaceControlNativeObject)
      • nativeGetFromBlastBufferQueue

        public static long nativeGetFromBlastBufferQueue​(long surfaceObject,
                                                         long blastBufferQueueNativeObject)
      • nativeLockCanvas

        public static long nativeLockCanvas​(long nativeObject,
                                            Canvas canvas,
                                            Rect dirty)
      • nativeUnlockCanvasAndPost

        public static void nativeUnlockCanvasAndPost​(long nativeObject,
                                                     Canvas canvas)
      • nativeRelease

        public static void nativeRelease​(long nativeObject)
      • nativeIsValid

        public static boolean nativeIsValid​(long nativeObject)
      • nativeIsConsumerRunningBehind

        public static boolean nativeIsConsumerRunningBehind​(long nativeObject)
      • nativeReadFromParcel

        public static long nativeReadFromParcel​(long nativeObject,
                                                Parcel source)
      • nativeWriteToParcel

        public static void nativeWriteToParcel​(long nativeObject,
                                               Parcel dest)
      • nativeAllocateBuffers

        public static void nativeAllocateBuffers​(long nativeObject)
      • nativeGetWidth

        public static int nativeGetWidth​(long nativeObject)
      • nativeGetHeight

        public static int nativeGetHeight​(long nativeObject)
      • nativeGetNextFrameNumber

        public static long nativeGetNextFrameNumber​(long nativeObject)
      • nativeSetScalingMode

        public static int nativeSetScalingMode​(long nativeObject,
                                               int scalingMode)
      • nativeForceScopedDisconnect

        public static int nativeForceScopedDisconnect​(long nativeObject)
      • nativeAttachAndQueueBufferWithColorSpace

        public static int nativeAttachAndQueueBufferWithColorSpace​(long nativeObject,
                                                                   HardwareBuffer buffer,
                                                                   int colorSpaceId)
      • nativeSetSharedBufferModeEnabled

        public static int nativeSetSharedBufferModeEnabled​(long nativeObject,
                                                           boolean enabled)
      • nativeSetAutoRefreshEnabled

        public static int nativeSetAutoRefreshEnabled​(long nativeObject,
                                                      boolean enabled)
      • nativeSetFrameRate

        public static int nativeSetFrameRate​(long nativeObject,
                                             float frameRate,
                                             int compatibility,
                                             int changeFrameRateStrategy)