-
- All Implemented Interfaces:
-
android.view.Choreographer.FrameCallback,app.rive.runtime.kotlin.core.RefCount
public class RiveArtboardRenderer extends Renderer
-
-
Field Summary
Fields Modifier and Type Field Description private BooleanisPlayingprivate BooleanisAttachedprivate final ObjectframeLockprivate final Floatwidthprivate final Floatheightprivate final FloataverageFpsprivate RendererTypetypeprivate final Booleantraceprivate final BooleanhasCppObjectprivate AtomicIntegerrefsprivate LongcppPointerprivate final List<RefCount>dependenciesprivate final IntegerrefCount
-
Constructor Summary
Constructors Constructor Description RiveArtboardRenderer(Boolean trace, RendererType rendererType, RiveFileController controller)
-
Method Summary
Modifier and Type Method Description final BooleangetIsPlaying()final UnitsetIsPlaying(Boolean isPlaying)final BooleangetIsAttached()final UnitsetIsAttached(Boolean isAttached)final ObjectgetFrameLock()A lock to synchronize access to the C++ renderer object between the UI thread (which handles lifecycle events like delete()) and the Choreographer thread (which executesdoFrame()).final FloatgetWidth()final FloatgetHeight()final FloatgetAverageFps()final RendererTypegetType()final UnitsetType(RendererType type)final BooleangetTrace()final BooleangetHasCppObject()final AtomicIntegergetRefs()final UnitsetRefs(AtomicInteger refs)final LonggetCppPointer()final UnitsetCppPointer(Long cppPointer)final List<RefCount>getDependencies()IntegergetRefCount()Unitdraw()Unitadvance(Float elapsed)final Unitreset()-
Methods inherited from class app.rive.runtime.kotlin.renderers.RiveArtboardRenderer
align, cppDelete, delete, doFrame, make, restore, save, scale, scheduleFrame, setSurface, start, stop, transform, translate -
Methods inherited from class app.rive.runtime.kotlin.renderers.Renderer
acquire, release -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
RiveArtboardRenderer
RiveArtboardRenderer(Boolean trace, RendererType rendererType, RiveFileController controller)
-
-
Method Detail
-
getIsPlaying
final Boolean getIsPlaying()
-
setIsPlaying
final Unit setIsPlaying(Boolean isPlaying)
-
getIsAttached
final Boolean getIsAttached()
-
setIsAttached
final Unit setIsAttached(Boolean isAttached)
-
getFrameLock
final Object getFrameLock()
A lock to synchronize access to the C++ renderer object between the UI thread (which handles lifecycle events like
delete()) and the Choreographer thread (which executesdoFrame()). This prevents a race condition where the UI thread might nullify the C++ pointer while the worker thread is still using it.
-
getAverageFps
final Float getAverageFps()
-
getType
@VisibleForTesting(otherwise = 2) final RendererType getType()
-
setType
final Unit setType(RendererType type)
-
getHasCppObject
final Boolean getHasCppObject()
-
getRefs
final AtomicInteger getRefs()
-
setRefs
final Unit setRefs(AtomicInteger refs)
-
getCppPointer
final Long getCppPointer()
-
setCppPointer
final Unit setCppPointer(Long cppPointer)
-
getDependencies
final List<RefCount> getDependencies()
-
getRefCount
Integer getRefCount()
-
draw
@WorkerThread() Unit draw()
-
advance
@WorkerThread() Unit advance(Float elapsed)
-
-
-
-