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,
callNativeMethodsByDefault=true)
public class ShadowNativeHardwareRenderer
extends Object
Shadow for
HardwareRenderer that is backed by native code-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static voidprotected static booleanprotected static voidnAddObserver(long nativeProxy, long nativeObserver) protected static voidnAddRenderNode(long nativeProxy, long rootRenderNode, boolean placeFront) protected static voidnAllocateBuffers(long nativeProxy) protected static voidnBuildLayer(long nativeProxy, long node) protected static voidnCancelLayerUpdate(long nativeProxy, long layer) protected static booleannCopyLayerInto(long nativeProxy, long layer, long bitmapHandle) protected static intnCopySurfaceInto(Surface surface, int srcLeft, int srcTop, int srcRight, int srcBottom, long bitmapHandle) protected static BitmapnCreateHardwareBitmap(long renderNode, int width, int height) protected static longnCreateProxy(boolean translucent, boolean isWideGamut, long rootRenderNode) protected static longnCreateProxy(boolean translucent, long rootRenderNode) protected static ObjectnCreateProxy(Object translucent, Object rootRenderNode) protected static longprotected static longnCreateTextureLayer(long nativeProxy) protected static voidnDeleteProxy(long nativeProxy) protected static voidnDestroy(long nativeProxy, long rootRenderNode) protected static voidnDestroyHardwareResources(long nativeProxy) protected static voidnDetachSurfaceTexture(long nativeProxy, long layer) protected static voidnDrawRenderNode(long nativeProxy, long rootRenderNode) protected static voidnDumpProfileInfo(long nativeProxy, FileDescriptor fd, int dumpFlags) protected static voidnFence(long nativeProxy) protected static intnGetRenderThreadTid(long nativeProxy) protected static voidnHackySetRTAnimationsEnabled(boolean enabled) protected static voidnInitDisplayInfo(int width, int height, float refreshRate, int wideColorDataspace, long appVsyncOffsetNanos, long presentationDeadlineNanos) protected static voidnInitDisplayInfo(int width, int height, float refreshRate, int wideColorDataspace, long appVsyncOffsetNanos, long presentationDeadlineNanos, boolean supportsFp16ForHdr, boolean nInitDisplayInfo) protected static booleannLoadSystemProperties(long nativeProxy) protected static voidnNotifyFramePending(long nativeProxy) protected static voidnOverrideProperty(String name, String value) protected static booleannPause(long nativeProxy) protected static voidnPushLayerUpdate(long nativeProxy, long layer) protected static voidnRegisterAnimatingRenderNode(long rootRenderNode, long animatingNode) protected static voidnRegisterVectorDrawableAnimator(long rootRenderNode, long animator) protected static voidnRemoveObserver(long nativeProxy, long nativeObserver) protected static voidnRemoveRenderNode(long nativeProxy, long rootRenderNode) protected static voidprotected static voidnSetASurfaceTransactionCallback(Object nativeProxy, Object callback) protected static ObjectnSetColorMode(long nativeProxy, int colorMode) protected static voidnSetContentDrawBounds(long nativeProxy, int left, int top, int right, int bottom) protected static voidnSetContextPriority(int priority) protected static voidnSetDebuggingEnabled(boolean enabled) protected static voidnSetDisplayDensityDpi(int densityDpi) protected static voidnSetForceDark(long nativeProxy, boolean enabled) protected static voidnSetFrameCallback(long nativeProxy, HardwareRenderer.FrameDrawingCallback callback) protected static voidnSetFrameCompleteCallback(long nativeProxy, HardwareRenderer.FrameCompleteCallback callback) protected static voidnSetHighContrastText(boolean enabled) protected static voidnSetIsHighEndGfx(boolean isHighEndGfx) protected static voidnSetIsolatedProcess(boolean enabled) protected static voidnSetLightAlpha(long nativeProxy, float ambientShadowAlpha, float spotShadowAlpha) protected static voidnSetLightGeometry(long nativeProxy, float lightX, float lightY, float lightZ, float lightRadius) protected static voidprotected static voidnSetOpaque(long nativeProxy, boolean opaque) protected static voidnSetPictureCaptureCallback(long nativeProxy, HardwareRenderer.PictureCapturedCallback callback) protected static voidnSetPrepareSurfaceControlForWebviewCallback(Object nativeProxy, Object callback) protected static voidnSetProcessStatsBuffer(int fd) protected static voidnSetRtAnimationsEnabled(boolean enabled) protected static voidnSetSdrWhitePoint(long nativeProxy, float whitePoint) protected static voidnSetStopped(long nativeProxy, boolean stopped) protected static voidnSetSurface(long nativeProxy, Surface window, boolean discardBuffer) protected static voidnSetSurfaceControl(long nativeProxy, long nativeSurfaceControl) protected static voidnSetWideGamut(long nativeProxy, boolean wideGamut) protected static voidnStopDrawing(long nativeProxy) protected static intnSyncAndDrawFrame(long nativeProxy, long[] frameInfo, int size) protected static voidnTrimMemory(int level) protected static voidpreload()protected static voidsetupShadersDiskCache(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
-
nCreateProxy
@Implementation(minSdk=31, maxSdk=34) 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, 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=34) protected static Object nSetColorMode(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(Object nativeProxy, Object callback) -
nSetPrepareSurfaceControlForWebviewCallback
@Implementation(minSdk=31, maxSdk=34) protected static void nSetPrepareSurfaceControlForWebviewCallback(Object 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=34) protected static Bitmap nCreateHardwareBitmap(long renderNode, int width, int height) -
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) -
nSetWideGamut
-