Class HardwareRendererNatives

java.lang.Object
org.robolectric.nativeruntime.HardwareRendererNatives

public final class HardwareRendererNatives extends Object
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 Details

    • disableVsync

      public static void disableVsync()
    • preload

      public static void preload()
    • isWebViewOverlaysEnabled

      public static boolean isWebViewOverlaysEnabled()
    • setupShadersDiskCache

      public static void setupShadersDiskCache(String cacheFile, String skiaCacheFile)
    • 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

      public static void nSetName(long nativeProxy, String name)
    • nSetSurface

      public static void nSetSurface(long nativeProxy, Surface window, boolean discardBuffer)
    • 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

      public static void nOverrideProperty(String name, String value)
    • nFence

      public static void nFence(long nativeProxy)
    • nStopDrawing

      public static void nStopDrawing(long nativeProxy)
    • nNotifyFramePending

      public static void nNotifyFramePending(long nativeProxy)
    • nDumpProfileInfo

      public static void nDumpProfileInfo(long nativeProxy, FileDescriptor fd, int dumpFlags)
    • 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

      public static Bitmap nCreateHardwareBitmap(long renderNode, int width, int height)
    • 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)