Package 

Class SoftwareRenderBuffer

  • All Implemented Interfaces:
    app.rive.core.CheckableAutoCloseable , java.lang.AutoCloseable

    
    public final class SoftwareRenderBuffer
     implements CheckableAutoCloseable
                        

    CPU-backed offscreen render target for snapshot-style rendering.

    Use this when you need software pixels, such as snapshot testing or CPU-side image processing. For realtime presentation on hardware-accelerated canvases, prefer HardwareRenderBuffer.

    The dimensions of this buffer are fixed at construction and cannot be resized. To render at a different size, create a new buffer.

    Ownership/lifecycle:

    • This class owns its internal render surface and must be closed.

    • Callers own destination bitmaps passed to renderInto; reuse a destination bitmap per size for repeated renders.

    • Callers should recycle destination bitmaps when they are no longer needed.

    Performance:

    • Rendering is synchronous and includes CPU pixel conversion.

    • This is typically slower than HardwareRenderBuffer for continuous realtime rendering.

    Threading:

    • renderInto is synchronous with respect to buffer population.

    API level:

    • Available on all Android API levels supported by this runtime.