Package org.robolectric.shadows
Class ShadowNativeHardwareRenderer
java.lang.Object
org.robolectric.shadows.ShadowNativeHardwareRenderer
@Implements(value=android.graphics.HardwareRenderer.class, minSdk=29, looseSignatures=true, shadowPicker=Picker.class) public class ShadowNativeHardwareRenderer extends Object
Shadow for
HardwareRenderer
that is backed by native code-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ShadowNativeHardwareRenderer.Picker
Shadow picker forHardwareRenderer
. -
Constructor Summary
Constructors Constructor Description ShadowNativeHardwareRenderer()
-
Method Summary
Modifier and Type Method Description protected static void
disableVsync()
protected static boolean
isWebViewOverlaysEnabled()
protected static void
nAddObserver(long nativeProxy, long nativeObserver)
protected static void
nAddRenderNode(long nativeProxy, long rootRenderNode, boolean placeFront)
protected static void
nAllocateBuffers(long nativeProxy)
protected static void
nBuildLayer(long nativeProxy, long node)
protected static void
nCancelLayerUpdate(long nativeProxy, long layer)
protected static boolean
nCopyLayerInto(long nativeProxy, long layer, long bitmapHandle)
protected static int
nCopySurfaceInto(Surface surface, int srcLeft, int srcTop, int srcRight, int srcBottom, long bitmapHandle)
protected static Bitmap
nCreateHardwareBitmap(long renderNode, int width, int height)
protected static long
nCreateProxy(boolean translucent, boolean isWideGamut, long rootRenderNode)
protected static long
nCreateProxy(boolean translucent, long rootRenderNode)
protected static Object
nCreateProxy(Object translucent, Object rootRenderNode)
protected static long
nCreateRootRenderNode()
protected static long
nCreateTextureLayer(long nativeProxy)
protected static void
nDeleteProxy(long nativeProxy)
protected static void
nDestroy(long nativeProxy, long rootRenderNode)
protected static void
nDestroyHardwareResources(long nativeProxy)
protected static void
nDetachSurfaceTexture(long nativeProxy, long layer)
protected static void
nDrawRenderNode(long nativeProxy, long rootRenderNode)
protected static void
nDumpProfileInfo(long nativeProxy, FileDescriptor fd, int dumpFlags)
protected static void
nFence(long nativeProxy)
protected static int
nGetRenderThreadTid(long nativeProxy)
protected static void
nHackySetRTAnimationsEnabled(boolean enabled)
protected static void
nInitDisplayInfo(int width, int height, float refreshRate, int wideColorDataspace, long appVsyncOffsetNanos, long presentationDeadlineNanos)
protected static void
nInitDisplayInfo(int width, int height, float refreshRate, int wideColorDataspace, long appVsyncOffsetNanos, long presentationDeadlineNanos, boolean supportsFp16ForHdr, boolean nInitDisplayInfo)
protected static boolean
nLoadSystemProperties(long nativeProxy)
protected static void
nNotifyFramePending(long nativeProxy)
protected static void
nOverrideProperty(String name, String value)
protected static boolean
nPause(long nativeProxy)
protected static void
nPushLayerUpdate(long nativeProxy, long layer)
protected static void
nRegisterAnimatingRenderNode(long rootRenderNode, long animatingNode)
protected static void
nRegisterVectorDrawableAnimator(long rootRenderNode, long animator)
protected static void
nRemoveObserver(long nativeProxy, long nativeObserver)
protected static void
nRemoveRenderNode(long nativeProxy, long rootRenderNode)
protected static void
nRotateProcessStatsBuffer()
protected static void
nSetASurfaceTransactionCallback(Object nativeProxy, Object callback)
protected static Object
nSetColorMode(long nativeProxy, int colorMode)
protected static void
nSetContentDrawBounds(long nativeProxy, int left, int top, int right, int bottom)
protected static void
nSetContextPriority(int priority)
protected static void
nSetDebuggingEnabled(boolean enabled)
protected static void
nSetDisplayDensityDpi(int densityDpi)
protected static void
nSetForceDark(long nativeProxy, boolean enabled)
protected static void
nSetFrameCallback(long nativeProxy, HardwareRenderer.FrameDrawingCallback callback)
protected static void
nSetFrameCompleteCallback(long nativeProxy, HardwareRenderer.FrameCompleteCallback callback)
protected static void
nSetHighContrastText(boolean enabled)
protected static void
nSetIsHighEndGfx(boolean isHighEndGfx)
protected static void
nSetIsolatedProcess(boolean enabled)
protected static void
nSetLightAlpha(long nativeProxy, float ambientShadowAlpha, float spotShadowAlpha)
protected static void
nSetLightGeometry(long nativeProxy, float lightX, float lightY, float lightZ, float lightRadius)
protected static void
nSetName(long nativeProxy, String name)
protected static void
nSetOpaque(long nativeProxy, boolean opaque)
protected static void
nSetPictureCaptureCallback(long nativeProxy, HardwareRenderer.PictureCapturedCallback callback)
protected static void
nSetPrepareSurfaceControlForWebviewCallback(Object nativeProxy, Object callback)
protected static void
nSetProcessStatsBuffer(int fd)
protected static void
nSetSdrWhitePoint(long nativeProxy, float whitePoint)
protected static void
nSetStopped(long nativeProxy, boolean stopped)
protected static void
nSetSurface(long nativeProxy, Surface window, boolean discardBuffer)
protected static void
nSetSurfaceControl(long nativeProxy, long nativeSurfaceControl)
protected static void
nStopDrawing(long nativeProxy)
protected static int
nSyncAndDrawFrame(long nativeProxy, long[] frameInfo, int size)
protected static void
nTrimMemory(int level)
protected static void
preload()
protected static void
setupShadersDiskCache(String cacheFile, String skiaCacheFile)
-
Constructor Details
-
ShadowNativeHardwareRenderer
public ShadowNativeHardwareRenderer()
-
-
Method Details
-
disableVsync
-
preload
-
isWebViewOverlaysEnabled
-
setupShadersDiskCache
@Implementation protected static void setupShadersDiskCache(String cacheFile, String skiaCacheFile) -
nRotateProcessStatsBuffer
-
nSetProcessStatsBuffer
-
nGetRenderThreadTid
-
nCreateRootRenderNode
-
nCreateProxy
@Implementation(minSdk=31) protected static long nCreateProxy(boolean translucent, long rootRenderNode) -
nCreateProxy
@Implementation(minSdk=30, maxSdk=30) protected static long nCreateProxy(boolean translucent, boolean isWideGamut, long rootRenderNode) -
nCreateProxy
-
nDeleteProxy
-
nLoadSystemProperties
-
nSetName
-
nSetSurface
@Implementation(minSdk=30) protected static void nSetSurface(long nativeProxy, Surface window, boolean discardBuffer) -
nSetSurfaceControl
@Implementation(minSdk=31) protected static void nSetSurfaceControl(long nativeProxy, long nativeSurfaceControl) -
nPause
-
nSetStopped
-
nSetLightGeometry
@Implementation protected static void nSetLightGeometry(long nativeProxy, float lightX, float lightY, float lightZ, float lightRadius) -
nSetLightAlpha
@Implementation protected static void nSetLightAlpha(long nativeProxy, float ambientShadowAlpha, float spotShadowAlpha) -
nSetOpaque
-
nSetColorMode
-
nSetSdrWhitePoint
@Implementation(minSdk=31) protected static void nSetSdrWhitePoint(long nativeProxy, float whitePoint) -
nSetIsHighEndGfx
-
nSyncAndDrawFrame
@Implementation protected static int nSyncAndDrawFrame(long nativeProxy, long[] frameInfo, int size) -
nDestroy
-
nRegisterAnimatingRenderNode
@Implementation protected static void nRegisterAnimatingRenderNode(long rootRenderNode, long animatingNode) -
nRegisterVectorDrawableAnimator
@Implementation protected static void nRegisterVectorDrawableAnimator(long rootRenderNode, long animator) -
nCreateTextureLayer
-
nBuildLayer
-
nCopyLayerInto
@Implementation protected static boolean nCopyLayerInto(long nativeProxy, long layer, long bitmapHandle) -
nPushLayerUpdate
-
nCancelLayerUpdate
-
nDetachSurfaceTexture
-
nDestroyHardwareResources
-
nTrimMemory
-
nOverrideProperty
-
nFence
-
nStopDrawing
-
nNotifyFramePending
-
nDumpProfileInfo
@Implementation protected static void nDumpProfileInfo(long nativeProxy, FileDescriptor fd, int dumpFlags) -
nAddRenderNode
@Implementation protected static void nAddRenderNode(long nativeProxy, long rootRenderNode, boolean placeFront) -
nRemoveRenderNode
-
nDrawRenderNode
-
nSetContentDrawBounds
@Implementation protected static void nSetContentDrawBounds(long nativeProxy, int left, int top, int right, int bottom) -
nSetPictureCaptureCallback
@Implementation protected static void nSetPictureCaptureCallback(long nativeProxy, HardwareRenderer.PictureCapturedCallback callback) -
nSetASurfaceTransactionCallback
@Implementation(minSdk=31) protected static void nSetASurfaceTransactionCallback(Object nativeProxy, Object callback) -
nSetPrepareSurfaceControlForWebviewCallback
@Implementation(minSdk=31) protected static void nSetPrepareSurfaceControlForWebviewCallback(Object nativeProxy, Object callback) -
nSetFrameCallback
@Implementation protected static void nSetFrameCallback(long nativeProxy, HardwareRenderer.FrameDrawingCallback callback) -
nSetFrameCompleteCallback
@Implementation protected static void nSetFrameCompleteCallback(long nativeProxy, HardwareRenderer.FrameCompleteCallback callback) -
nAddObserver
@Implementation(minSdk=30) protected static void nAddObserver(long nativeProxy, long nativeObserver) -
nRemoveObserver
@Implementation(minSdk=30) protected static void nRemoveObserver(long nativeProxy, long nativeObserver) -
nCopySurfaceInto
@Implementation(maxSdk=33) protected static int nCopySurfaceInto(Surface surface, int srcLeft, int srcTop, int srcRight, int srcBottom, long bitmapHandle) -
nCreateHardwareBitmap
@Implementation protected static Bitmap nCreateHardwareBitmap(long renderNode, int width, int height) -
nSetHighContrastText
-
nHackySetRTAnimationsEnabled
@Implementation(minSdk=29, maxSdk=31) protected static void nHackySetRTAnimationsEnabled(boolean enabled) -
nSetDebuggingEnabled
-
nSetIsolatedProcess
-
nSetContextPriority
-
nAllocateBuffers
-
nSetForceDark
-
nSetDisplayDensityDpi
-
nInitDisplayInfo
@Implementation(minSdk=31, maxSdk=33) protected static void nInitDisplayInfo(int width, int height, float refreshRate, int wideColorDataspace, long appVsyncOffsetNanos, long presentationDeadlineNanos) -
nInitDisplayInfo
@Implementation(minSdk=10000) protected static void nInitDisplayInfo(int width, int height, float refreshRate, int wideColorDataspace, long appVsyncOffsetNanos, long presentationDeadlineNanos, boolean supportsFp16ForHdr, boolean nInitDisplayInfo)
-