Package org.robolectric.nativeruntime
Class HardwareRendererNatives
java.lang.Object
org.robolectric.nativeruntime.HardwareRendererNatives
Native methods for
HardwareRenderer
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/graphics/HardwareRenderer.java
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
static boolean
static void
nAddObserver
(long nativeProxy, long nativeObserver) static void
nAddRenderNode
(long nativeProxy, long rootRenderNode, boolean placeFront) static void
nAllocateBuffers
(long nativeProxy) static void
nBuildLayer
(long nativeProxy, long node) static void
nCancelLayerUpdate
(long nativeProxy, long layer) static boolean
nCopyLayerInto
(long nativeProxy, long layer, long bitmapHandle) static int
nCopySurfaceInto
(Surface surface, int srcLeft, int srcTop, int srcRight, int srcBottom, long bitmapHandle) static Bitmap
nCreateHardwareBitmap
(long renderNode, int width, int height) static long
nCreateProxy
(boolean translucent, long rootRenderNode) static long
static long
nCreateTextureLayer
(long nativeProxy) static void
nDeleteProxy
(long nativeProxy) static void
nDestroy
(long nativeProxy, long rootRenderNode) static void
nDestroyHardwareResources
(long nativeProxy) static void
nDetachSurfaceTexture
(long nativeProxy, long layer) static void
nDrawRenderNode
(long nativeProxy, long rootRenderNode) static void
nDumpProfileInfo
(long nativeProxy, FileDescriptor fd, int dumpFlags) static void
nFence
(long nativeProxy) static int
nGetRenderThreadTid
(long nativeProxy) static void
nHackySetRTAnimationsEnabled
(boolean enabled) static void
nInitDisplayInfo
(int width, int height, float refreshRate, int wideColorDataspace, long appVsyncOffsetNanos, long presentationDeadlineNanos) static boolean
nLoadSystemProperties
(long nativeProxy) static void
nNotifyFramePending
(long nativeProxy) static void
nOverrideProperty
(String name, String value) static boolean
nPause
(long nativeProxy) static void
nPushLayerUpdate
(long nativeProxy, long layer) static void
nRegisterAnimatingRenderNode
(long rootRenderNode, long animatingNode) static void
nRegisterVectorDrawableAnimator
(long rootRenderNode, long animator) static void
nRemoveObserver
(long nativeProxy, long nativeObserver) static void
nRemoveRenderNode
(long nativeProxy, long rootRenderNode) static void
static void
nSetASurfaceTransactionCallback
(long nativeProxy, HardwareRenderer.ASurfaceTransactionCallback callback) static void
nSetColorMode
(long nativeProxy, int colorMode) static void
nSetContentDrawBounds
(long nativeProxy, int left, int top, int right, int bottom) static void
nSetContextPriority
(int priority) static void
nSetDebuggingEnabled
(boolean enabled) static void
nSetDisplayDensityDpi
(int densityDpi) static void
nSetForceDark
(long nativeProxy, boolean enabled) static void
nSetFrameCallback
(long nativeProxy, HardwareRenderer.FrameDrawingCallback callback) static void
nSetFrameCompleteCallback
(long nativeProxy, HardwareRenderer.FrameCompleteCallback callback) static void
nSetHighContrastText
(boolean enabled) static void
nSetIsHighEndGfx
(boolean isHighEndGfx) static void
nSetIsolatedProcess
(boolean enabled) static void
nSetLightAlpha
(long nativeProxy, float ambientShadowAlpha, float spotShadowAlpha) static void
nSetLightGeometry
(long nativeProxy, float lightX, float lightY, float lightZ, float lightRadius) static void
static void
nSetOpaque
(long nativeProxy, boolean opaque) static void
nSetPictureCaptureCallback
(long nativeProxy, HardwareRenderer.PictureCapturedCallback callback) static void
nSetPrepareSurfaceControlForWebviewCallback
(long nativeProxy, HardwareRenderer.PrepareSurfaceControlForWebviewCallback callback) static void
nSetProcessStatsBuffer
(int fd) static void
nSetSdrWhitePoint
(long nativeProxy, float whitePoint) static void
nSetStopped
(long nativeProxy, boolean stopped) static void
nSetSurface
(long nativeProxy, Surface window, boolean discardBuffer) static void
nSetSurfaceControl
(long nativeProxy, long nativeSurfaceControl) static void
nSetSurfacePtr
(long nativeProxy, long surfacePtr) static void
nStopDrawing
(long nativeProxy) static int
nSyncAndDrawFrame
(long nativeProxy, long[] frameInfo, int size) static void
nTrimMemory
(int level) static void
preload()
static void
setupShadersDiskCache
(String cacheFile, String skiaCacheFile)
-
Method Details
-
disableVsync
public static void disableVsync() -
preload
public static void preload() -
isWebViewOverlaysEnabled
public static boolean isWebViewOverlaysEnabled() -
setupShadersDiskCache
-
nRotateProcessStatsBuffer
public static void nRotateProcessStatsBuffer() -
nSetProcessStatsBuffer
public static void nSetProcessStatsBuffer(int fd) -
nGetRenderThreadTid
public static int nGetRenderThreadTid(long nativeProxy) -
nCreateRootRenderNode
public static long nCreateRootRenderNode() -
nCreateProxy
public static long nCreateProxy(boolean translucent, long rootRenderNode) -
nDeleteProxy
public static void nDeleteProxy(long nativeProxy) -
nLoadSystemProperties
public static boolean nLoadSystemProperties(long nativeProxy) -
nSetName
-
nSetSurface
-
nSetSurfacePtr
public static void nSetSurfacePtr(long nativeProxy, long surfacePtr) -
nSetSurfaceControl
public static void nSetSurfaceControl(long nativeProxy, long nativeSurfaceControl) -
nPause
public static boolean nPause(long nativeProxy) -
nSetStopped
public static void nSetStopped(long nativeProxy, boolean stopped) -
nSetLightGeometry
public static void nSetLightGeometry(long nativeProxy, float lightX, float lightY, float lightZ, float lightRadius) -
nSetLightAlpha
public static void nSetLightAlpha(long nativeProxy, float ambientShadowAlpha, float spotShadowAlpha) -
nSetOpaque
public static void nSetOpaque(long nativeProxy, boolean opaque) -
nSetColorMode
public static void nSetColorMode(long nativeProxy, int colorMode) -
nSetSdrWhitePoint
public static void nSetSdrWhitePoint(long nativeProxy, float whitePoint) -
nSetIsHighEndGfx
public static void nSetIsHighEndGfx(boolean isHighEndGfx) -
nSyncAndDrawFrame
public static int nSyncAndDrawFrame(long nativeProxy, long[] frameInfo, int size) -
nDestroy
public static void nDestroy(long nativeProxy, long rootRenderNode) -
nRegisterAnimatingRenderNode
public static void nRegisterAnimatingRenderNode(long rootRenderNode, long animatingNode) -
nRegisterVectorDrawableAnimator
public static void nRegisterVectorDrawableAnimator(long rootRenderNode, long animator) -
nCreateTextureLayer
public static long nCreateTextureLayer(long nativeProxy) -
nBuildLayer
public static void nBuildLayer(long nativeProxy, long node) -
nCopyLayerInto
public static boolean nCopyLayerInto(long nativeProxy, long layer, long bitmapHandle) -
nPushLayerUpdate
public static void nPushLayerUpdate(long nativeProxy, long layer) -
nCancelLayerUpdate
public static void nCancelLayerUpdate(long nativeProxy, long layer) -
nDetachSurfaceTexture
public static void nDetachSurfaceTexture(long nativeProxy, long layer) -
nDestroyHardwareResources
public static void nDestroyHardwareResources(long nativeProxy) -
nTrimMemory
public static void nTrimMemory(int level) -
nOverrideProperty
-
nFence
public static void nFence(long nativeProxy) -
nStopDrawing
public static void nStopDrawing(long nativeProxy) -
nNotifyFramePending
public static void nNotifyFramePending(long nativeProxy) -
nDumpProfileInfo
-
nAddRenderNode
public static void nAddRenderNode(long nativeProxy, long rootRenderNode, boolean placeFront) -
nRemoveRenderNode
public static void nRemoveRenderNode(long nativeProxy, long rootRenderNode) -
nDrawRenderNode
public static void nDrawRenderNode(long nativeProxy, long rootRenderNode) -
nSetContentDrawBounds
public static void nSetContentDrawBounds(long nativeProxy, int left, int top, int right, int bottom) -
nSetPictureCaptureCallback
public static void nSetPictureCaptureCallback(long nativeProxy, HardwareRenderer.PictureCapturedCallback callback) -
nSetASurfaceTransactionCallback
public static void nSetASurfaceTransactionCallback(long nativeProxy, HardwareRenderer.ASurfaceTransactionCallback callback) -
nSetPrepareSurfaceControlForWebviewCallback
public static void nSetPrepareSurfaceControlForWebviewCallback(long nativeProxy, HardwareRenderer.PrepareSurfaceControlForWebviewCallback callback) -
nSetFrameCallback
public static void nSetFrameCallback(long nativeProxy, HardwareRenderer.FrameDrawingCallback callback) -
nSetFrameCompleteCallback
public static void nSetFrameCompleteCallback(long nativeProxy, HardwareRenderer.FrameCompleteCallback callback) -
nAddObserver
public static void nAddObserver(long nativeProxy, long nativeObserver) -
nRemoveObserver
public static void nRemoveObserver(long nativeProxy, long nativeObserver) -
nCopySurfaceInto
public static int nCopySurfaceInto(Surface surface, int srcLeft, int srcTop, int srcRight, int srcBottom, long bitmapHandle) -
nCreateHardwareBitmap
-
nSetHighContrastText
public static void nSetHighContrastText(boolean enabled) -
nHackySetRTAnimationsEnabled
public static void nHackySetRTAnimationsEnabled(boolean enabled) -
nSetDebuggingEnabled
public static void nSetDebuggingEnabled(boolean enabled) -
nSetIsolatedProcess
public static void nSetIsolatedProcess(boolean enabled) -
nSetContextPriority
public static void nSetContextPriority(int priority) -
nAllocateBuffers
public static void nAllocateBuffers(long nativeProxy) -
nSetForceDark
public static void nSetForceDark(long nativeProxy, boolean enabled) -
nSetDisplayDensityDpi
public static void nSetDisplayDensityDpi(int densityDpi) -
nInitDisplayInfo
public static void nInitDisplayInfo(int width, int height, float refreshRate, int wideColorDataspace, long appVsyncOffsetNanos, long presentationDeadlineNanos)
-