Class ShadowNativeComposeShader
java.lang.Object
org.robolectric.shadows.ShadowNativeComposeShader
@Implements(value=ComposeShader.class,
minSdk=26,
shadowPicker=ShadowNativeComposeShader.Picker.class,
callNativeMethodsByDefault=true)
public class ShadowNativeComposeShader
extends Object
Shadow for
ComposeShader that is backed by native code-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected longcreateNativeInstance(long nativeMatrix, boolean filterFromPaint) AComposeShadernotices that a child has changed by the address of the native shader of the child.protected static longnativeCreate(long nativeMatrix, long nativeShaderA, long nativeShaderB, int porterDuffMode)
-
Constructor Details
-
ShadowNativeComposeShader
public ShadowNativeComposeShader()
-
-
Method Details
-
nativeCreate
@Implementation(minSdk=26, maxSdk=34) protected static long nativeCreate(long nativeMatrix, long nativeShaderA, long nativeShaderB, int porterDuffMode) -
createNativeInstance
@Implementation(minSdk=31) protected long createNativeInstance(long nativeMatrix, boolean filterFromPaint) AComposeShadernotices that a child has changed by the address of the native shader of the child. It remembers the native shaders that the children have for the filtering of the paint, but is created from the ones that they have without filtering. ABitmapShaderfrees the first to create the second, so the remembered address is one of a freed native shader. If the native shader of a changed child gets that address, the child counts as unchanged, and the old native shader is drawn.This makes it remember the native shaders that it is created from, which it keeps alive, so that no other native shader can get their addresses.
-