Class RecordingContext

All Implemented Interfaces:
RefCounted

public final class RecordingContext extends Context
This class is a public API, except where noted.
  • Constructor Details

    • RecordingContext

      protected RecordingContext(Device device)
  • Method Details

    • freeGpuResources

      public void freeGpuResources()
      Description copied from class: Context
      Frees GPU resources created and held by the Context. Can be called to reduce GPU memory pressure. Any resources that are still in use (e.g. being used by work submitted to the GPU) will not be deleted by this call. If the caller wants to make sure all resources are freed, then they should first make sure to submit and wait on any outstanding work.
      Specified by:
      freeGpuResources in class Context
    • performDeferredCleanup

      public void performDeferredCleanup(long msNotUsed)
      Description copied from class: Context
      Purge GPU resources on the Context that haven't been used in the past 'msNotUsed' milliseconds or are otherwise marked for deletion, regardless of whether the context is under budget.
      Specified by:
      performDeferredCleanup in class Context
    • clearStrikeCache

      public void clearStrikeCache()
    • isDiscarded

      public boolean isDiscarded()
      Reports whether the ImmediateContext associated with this RecordingContext is discarded. When called on a ImmediateContext it may actively check whether the underlying 3D API device/context has been disconnected before reporting the status. If so, calling this method will transition the ImmediateContext to the discarded state.
    • isImageCompatible

      public final boolean isImageCompatible(int colorType)
      Can a Image be created with the given color type.
      Parameters:
      colorType - see ColorInfo
    • isSurfaceCompatible

      public final boolean isSurfaceCompatible(int colorType)
      Can a Surface be created with the given color type. To check whether MSAA is supported use Context.getMaxSurfaceSampleCount(int).
      Parameters:
      colorType - see ColorInfo
    • getSurfaceProvider

      @Internal public final ImageProxyCache getSurfaceProvider()
    • getRenderTaskManager

      @Internal public final RenderTaskManager getRenderTaskManager()
    • getDynamicBufferManager

      @Internal public final DrawBufferManager getDynamicBufferManager()
    • getUploadBufferManager

      @Internal public UploadBufferManager getUploadBufferManager()
    • getAtlasProvider

      @Internal public AtlasProvider getAtlasProvider()
    • getAtlasTokenTracker

      @Internal public DrawAtlas.AtlasTokenTracker getAtlasTokenTracker()
    • getGlyphStrikeCache

      @Internal public GlyphStrikeCache getGlyphStrikeCache()
    • getTextBlobCache

      @Internal public TextBlobCache getTextBlobCache()
    • trackDevice

      public void trackDevice(@SharedPtr @SharedPtr GraniteDevice device)
    • untrackDevice

      public void untrackDevice(@RawPtr @RawPtr GraniteDevice device)
    • addTask

      public void addTask(@SharedPtr @SharedPtr Task task)
    • snap

      public RootTask snap()
    • flushTrackedDevices

      @Internal public void flushTrackedDevices()
    • init

      public boolean init(RecordingContextOptions options)
    • discard

      protected void discard()
    • deallocate

      protected void deallocate()
      Description copied from class: RefCnt
      Override this method to invoke de-allocation of the underlying resource.
      Overrides:
      deallocate in class Context