Package org.robolectric.nativeruntime
Class SurfaceNatives
java.lang.Object
org.robolectric.nativeruntime.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 Summary
Modifier and Type Method Description static voidnativeAllocateBuffers(long nativeObject)static intnativeAttachAndQueueBufferWithColorSpace(long nativeObject, HardwareBuffer buffer, int colorSpaceId)static longnativeCreateFromSurfaceControl(long surfaceControlNativeObject)static longnativeCreateFromSurfaceTexture(SurfaceTexture surfaceTexture)static intnativeForceScopedDisconnect(long nativeObject)static longnativeGetFromBlastBufferQueue(long surfaceObject, long blastBufferQueueNativeObject)static longnativeGetFromSurfaceControl(long surfaceObject, long surfaceControlNativeObject)static intnativeGetHeight(long nativeObject)static longnativeGetNextFrameNumber(long nativeObject)static intnativeGetWidth(long nativeObject)static booleannativeIsConsumerRunningBehind(long nativeObject)static booleannativeIsValid(long nativeObject)static longnativeLockCanvas(long nativeObject, Canvas canvas, Rect dirty)static longnativeReadFromParcel(long nativeObject, Parcel source)static voidnativeRelease(long nativeObject)static intnativeSetAutoRefreshEnabled(long nativeObject, boolean enabled)static intnativeSetFrameRate(long nativeObject, float frameRate, int compatibility, int changeFrameRateStrategy)static intnativeSetScalingMode(long nativeObject, int scalingMode)static intnativeSetSharedBufferModeEnabled(long nativeObject, boolean enabled)static voidnativeUnlockCanvasAndPost(long nativeObject, Canvas canvas)static voidnativeWriteToParcel(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) -
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)
-