Package org.robolectric.shadows
Class ShadowNativeHardwareRenderer
java.lang.Object
org.robolectric.shadows.ShadowNativeHardwareRenderer
@Implements(value=android.graphics.HardwareRenderer.class,
minSdk=29,
shadowPicker=Picker.class,
callNativeMethodsByDefault=true)
public class ShadowNativeHardwareRenderer
extends Object
Shadow for
HardwareRenderer
that is backed by native code-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected static Bitmap
createHardwareBitmap
(RenderNode node, int width, int height) protected static void
protected static boolean
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) This currently always return null in host graphics.protected static long
nCreateProxy
(boolean translucent, boolean isWideGamut, long rootRenderNode) protected static long
nCreateProxy
(boolean translucent, long rootRenderNode) protected static long
nCreateProxyPostR
(boolean translucent, long rootRenderNode) protected static long
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
protected static void
nSetASurfaceTransactionCallback
(long nativeProxy, Object callback) protected static void
nSetColorMode
(long nativeProxy, int colorMode) protected static float
nSetColorModePostT
(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
protected static void
nSetOpaque
(long nativeProxy, boolean opaque) protected static void
nSetPictureCaptureCallback
(long nativeProxy, HardwareRenderer.PictureCapturedCallback callback) protected static void
nSetPrepareSurfaceControlForWebviewCallback
(long nativeProxy, Object callback) protected static void
nSetProcessStatsBuffer
(int fd) protected static void
nSetRtAnimationsEnabled
(boolean enabled) protected static void
nSetSdrWhitePoint
(long nativeProxy, float whitePoint) protected static void
nSetStopped
(long nativeProxy, boolean stopped) protected static void
nSetSurface
(long nativeProxy, Surface window) protected static void
nSetSurface
(long nativeProxy, Surface window, boolean discardBuffer) protected static void
nSetSurfaceControl
(long nativeProxy, long nativeSurfaceControl) protected static void
nSetWideGamut
(long nativeProxy, boolean isWideColorGamut) 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(maxSdk=34) protected static void setupShadersDiskCache(String cacheFile, String skiaCacheFile) -
nRotateProcessStatsBuffer
-
nSetProcessStatsBuffer
-
nGetRenderThreadTid
-
nCreateRootRenderNode
-
nCreateProxyPostR
@Implementation(minSdk=31, maxSdk=34, methodName="nCreateProxy") protected static long nCreateProxyPostR(boolean translucent, long rootRenderNode) -
nCreateProxy
@Implementation(minSdk=30, maxSdk=30) protected static long nCreateProxy(boolean translucent, boolean isWideGamut, long rootRenderNode) -
nCreateProxy
@Implementation(minSdk=29, maxSdk=29) protected static long nCreateProxy(boolean translucent, long rootRenderNode) -
nDeleteProxy
-
nLoadSystemProperties
-
nSetName
-
nSetSurface
@Implementation(minSdk=29, maxSdk=29) protected static void nSetSurface(long nativeProxy, Surface window) -
nSetSurface
@Implementation(minSdk=30, maxSdk=34) protected static void nSetSurface(long nativeProxy, Surface window, boolean discardBuffer) -
nSetSurfaceControl
@Implementation(minSdk=31, maxSdk=34) protected static void nSetSurfaceControl(long nativeProxy, long nativeSurfaceControl) -
nPause
-
nSetStopped
-
nSetLightGeometry
@Implementation(maxSdk=34) protected static void nSetLightGeometry(long nativeProxy, float lightX, float lightY, float lightZ, float lightRadius) -
nSetLightAlpha
@Implementation(maxSdk=34) protected static void nSetLightAlpha(long nativeProxy, float ambientShadowAlpha, float spotShadowAlpha) -
nSetOpaque
-
nSetColorMode
@Implementation(minSdk=31, maxSdk=33) protected static void nSetColorMode(long nativeProxy, int colorMode) -
nSetColorModePostT
@Implementation(minSdk=34, methodName="nSetColorMode") protected static float nSetColorModePostT(long nativeProxy, int colorMode) -
nSetSdrWhitePoint
@Implementation(minSdk=31, maxSdk=34) protected static void nSetSdrWhitePoint(long nativeProxy, float whitePoint) -
nSetIsHighEndGfx
-
nSyncAndDrawFrame
@Implementation(maxSdk=34) protected static int nSyncAndDrawFrame(long nativeProxy, long[] frameInfo, int size) -
nDestroy
-
nRegisterAnimatingRenderNode
@Implementation(maxSdk=34) protected static void nRegisterAnimatingRenderNode(long rootRenderNode, long animatingNode) -
nRegisterVectorDrawableAnimator
@Implementation(maxSdk=34) protected static void nRegisterVectorDrawableAnimator(long rootRenderNode, long animator) -
nCreateTextureLayer
-
nBuildLayer
-
nCopyLayerInto
@Implementation(maxSdk=34) protected static boolean nCopyLayerInto(long nativeProxy, long layer, long bitmapHandle) -
nPushLayerUpdate
-
nCancelLayerUpdate
-
nDetachSurfaceTexture
@Implementation(maxSdk=34) protected static void nDetachSurfaceTexture(long nativeProxy, long layer) -
nDestroyHardwareResources
-
nTrimMemory
-
nOverrideProperty
-
nFence
-
nStopDrawing
-
nNotifyFramePending
-
nDumpProfileInfo
@Implementation(maxSdk=34) protected static void nDumpProfileInfo(long nativeProxy, FileDescriptor fd, int dumpFlags) -
nAddRenderNode
@Implementation(maxSdk=34) protected static void nAddRenderNode(long nativeProxy, long rootRenderNode, boolean placeFront) -
nRemoveRenderNode
@Implementation(maxSdk=34) protected static void nRemoveRenderNode(long nativeProxy, long rootRenderNode) -
nDrawRenderNode
@Implementation(maxSdk=34) protected static void nDrawRenderNode(long nativeProxy, long rootRenderNode) -
nSetContentDrawBounds
@Implementation(maxSdk=34) protected static void nSetContentDrawBounds(long nativeProxy, int left, int top, int right, int bottom) -
nSetPictureCaptureCallback
@Implementation(maxSdk=34) protected static void nSetPictureCaptureCallback(long nativeProxy, HardwareRenderer.PictureCapturedCallback callback) -
nSetASurfaceTransactionCallback
@Implementation(minSdk=31, maxSdk=34) protected static void nSetASurfaceTransactionCallback(long nativeProxy, Object callback) -
nSetPrepareSurfaceControlForWebviewCallback
@Implementation(minSdk=31, maxSdk=34) protected static void nSetPrepareSurfaceControlForWebviewCallback(long nativeProxy, Object callback) -
nSetFrameCallback
@Implementation(maxSdk=34) protected static void nSetFrameCallback(long nativeProxy, HardwareRenderer.FrameDrawingCallback callback) -
nSetFrameCompleteCallback
@Implementation(maxSdk=34) protected static void nSetFrameCompleteCallback(long nativeProxy, HardwareRenderer.FrameCompleteCallback callback) -
nAddObserver
@Implementation(minSdk=30, maxSdk=34) protected static void nAddObserver(long nativeProxy, long nativeObserver) -
nRemoveObserver
@Implementation(minSdk=30, maxSdk=34) 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(maxSdk=30) protected static Bitmap nCreateHardwareBitmap(long renderNode, int width, int height) This currently always return null in host graphics. This has `maxSdk=R` because, in S and above,createHardwareBitmap(RenderNode, int, int)
is shadowed. -
nSetHighContrastText
-
nHackySetRTAnimationsEnabled
@Implementation(minSdk=29, maxSdk=32) protected static void nHackySetRTAnimationsEnabled(boolean enabled) -
nSetRtAnimationsEnabled
@Implementation(minSdk=33, maxSdk=34) protected static void nSetRtAnimationsEnabled(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=34, maxSdk=34) protected static void nInitDisplayInfo(int width, int height, float refreshRate, int wideColorDataspace, long appVsyncOffsetNanos, long presentationDeadlineNanos, boolean supportsFp16ForHdr, boolean nInitDisplayInfo) -
createHardwareBitmap
@Implementation(minSdk=29) protected static Bitmap createHardwareBitmap(RenderNode node, int width, int height) -
nSetWideGamut
@Implementation(maxSdk=30) protected static void nSetWideGamut(long nativeProxy, boolean isWideColorGamut)
-