Package org.robolectric.nativeruntime
Class SurfaceNatives
java.lang.Object
org.robolectric.nativeruntime.SurfaceNatives
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 Summary
Modifier and TypeMethodDescriptionstatic void
nativeAllocateBuffers
(long nativeObject) static int
nativeAttachAndQueueBufferWithColorSpace
(long nativeObject, HardwareBuffer buffer, int colorSpaceId) static long
nativeCreateFromSurfaceControl
(long surfaceControlNativeObject) static long
nativeCreateFromSurfaceTexture
(SurfaceTexture surfaceTexture) static int
nativeForceScopedDisconnect
(long nativeObject) static long
nativeGetFromBlastBufferQueue
(long surfaceObject, long blastBufferQueueNativeObject) static long
nativeGetFromSurfaceControl
(long surfaceObject, long surfaceControlNativeObject) static int
nativeGetHeight
(long nativeObject) static long
nativeGetNextFrameNumber
(long nativeObject) static int
nativeGetWidth
(long nativeObject) static boolean
nativeIsConsumerRunningBehind
(long nativeObject) static boolean
nativeIsValid
(long nativeObject) static long
nativeLockCanvas
(long nativeObject, Canvas canvas, Rect dirty) static long
nativeReadFromParcel
(long nativeObject, Parcel source) static void
nativeRelease
(long nativeObject) static int
nativeSetAutoRefreshEnabled
(long nativeObject, boolean enabled) static int
nativeSetFrameRate
(long nativeObject, float frameRate, int compatibility, int changeFrameRateStrategy) static int
nativeSetScalingMode
(long nativeObject, int scalingMode) static int
nativeSetSharedBufferModeEnabled
(long nativeObject, boolean enabled) static void
nativeUnlockCanvasAndPost
(long nativeObject, Canvas canvas) static void
nativeWriteToParcel
(long nativeObject, Parcel dest)
-
Method Details
-
nativeCreateFromSurfaceTexture
-
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
-
nativeUnlockCanvasAndPost
-
nativeRelease
public static void nativeRelease(long nativeObject) -
nativeIsValid
public static boolean nativeIsValid(long nativeObject) -
nativeIsConsumerRunningBehind
public static boolean nativeIsConsumerRunningBehind(long nativeObject) -
nativeReadFromParcel
-
nativeWriteToParcel
-
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) -
nativeSetAutoRefreshEnabled
public static int nativeSetAutoRefreshEnabled(long nativeObject, boolean enabled) -
nativeSetFrameRate
public static int nativeSetFrameRate(long nativeObject, float frameRate, int compatibility, int changeFrameRateStrategy)
-