Package icyllis.arc3d.sketch.shaders
Class LocalMatrixShader
java.lang.Object
icyllis.arc3d.sketch.shaders.LocalMatrixShader
- All Implemented Interfaces:
RefCounted,Shader
-
Field Summary
Fields inherited from interface icyllis.arc3d.sketch.shaders.Shader
LOCAL_MATRIX_AFTER, LOCAL_MATRIX_BEFORE, LOCAL_MATRIX_REPLACE, TILE_MODE_CLAMP, TILE_MODE_DECAL, TILE_MODE_MIRROR, TILE_MODE_REPEAT -
Method Summary
Modifier and TypeMethodDescriptiongetBase()booleanReturns true if the shader is guaranteed to produce only a single color.booleanisOpaque()Returns true if the shader is guaranteed to produce only opaque colors, subject to the Paint using the shader to apply an opaque alpha value.booleanA return value of true means that its ref/unref is unnecessary, for example, they are just no op.voidref()Increases the reference count by 1.voidunref()Decreases the reference count by 1.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface icyllis.arc3d.sketch.shaders.Shader
makeWithLocalMatrix
-
Method Details
-
ref
public void ref()Description copied from interface:RefCountedIncreases the reference count by 1.- Specified by:
refin interfaceRefCounted- Specified by:
refin interfaceShader
-
unref
public void unref()Description copied from interface:RefCountedDecreases the reference count by 1.- Specified by:
unrefin interfaceRefCounted- Specified by:
unrefin interfaceShader
-
isTriviallyCounted
public boolean isTriviallyCounted()Description copied from interface:ShaderA return value of true means that its ref/unref is unnecessary, for example, they are just no op. So callers can perform some optimizations. Subclass can override this method to indicate that an instance is trivially counted. For the same instance, the return value of this method must remain unchanged.- Specified by:
isTriviallyCountedin interfaceShader
-
isOpaque
public boolean isOpaque()Description copied from interface:ShaderReturns true if the shader is guaranteed to produce only opaque colors, subject to the Paint using the shader to apply an opaque alpha value. Subclasses should override this to allow some optimizations. -
isConstant
public boolean isConstant()Returns true if the shader is guaranteed to produce only a single color. Subclasses can override this to allow loop-hoisting optimization.- Specified by:
isConstantin interfaceShader
-
getBase
-
getLocalMatrix
-