Package icyllis.arc3d.engine
Class RecordingContext
java.lang.Object
icyllis.arc3d.core.RefCnt
icyllis.arc3d.engine.Context
icyllis.arc3d.engine.RecordingContext
- All Implemented Interfaces:
RefCounted
This class is a public API, except where noted.
-
Field Summary
Fields inherited from class icyllis.arc3d.engine.Context
mDevice, mOwnerThread, mResourceProvider -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddTask(@SharedPtr Task task) voidprotected voidOverride this method to invoke de-allocation of the underlying resource.protected voiddiscard()voidvoidFrees GPU resources created and held by the Context.final DrawBufferManagerfinal RenderTaskManagerfinal ImageProxyCachebooleaninit(RecordingContextOptions options) booleanReports whether theImmediateContextassociated with thisRecordingContextis discarded.final booleanisImageCompatible(int colorType) Can aImagebe created with the given color type.final booleanisSurfaceCompatible(int colorType) Can aSurfacebe created with the given color type.voidperformDeferredCleanup(long msNotUsed) 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.snap()voidtrackDevice(@SharedPtr GraniteDevice device) voiduntrackDevice(@RawPtr GraniteDevice device) Methods inherited from class icyllis.arc3d.engine.Context
checkOwnerThread, getBackend, getCaps, getCompressedBackendFormat, getContextID, getCurrentBudgetedBytes, getCurrentPurgeableBytes, getDefaultBackendFormat, getDevice, getLogger, getMaxBudgetedBytes, getMaxRenderTargetSize, getMaxSurfaceSampleCount, getMaxTextureSize, getOptions, getOwnerThread, getRendererProvider, getResourceProvider, getSharedResourceCache, init, isDeviceLost, isImmediate, isOwnerThread, matches
-
Constructor Details
-
RecordingContext
-
-
Method Details
-
freeGpuResources
public void freeGpuResources()Description copied from class:ContextFrees 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:
freeGpuResourcesin classContext
-
performDeferredCleanup
public void performDeferredCleanup(long msNotUsed) Description copied from class:ContextPurge 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:
performDeferredCleanupin classContext
-
clearStrikeCache
public void clearStrikeCache() -
isDiscarded
public boolean isDiscarded()Reports whether theImmediateContextassociated with thisRecordingContextis discarded. When called on aImmediateContextit may actively check whether the underlying 3D API device/context has been disconnected before reporting the status. If so, calling this method will transition theImmediateContextto the discarded state. -
isImageCompatible
public final boolean isImageCompatible(int colorType) Can aImagebe created with the given color type.- Parameters:
colorType- seeColorInfo
-
isSurfaceCompatible
public final boolean isSurfaceCompatible(int colorType) Can aSurfacebe created with the given color type. To check whether MSAA is supported useContext.getMaxSurfaceSampleCount(int).- Parameters:
colorType- seeColorInfo
-
getSurfaceProvider
-
getRenderTaskManager
-
getDynamicBufferManager
-
getUploadBufferManager
-
getAtlasProvider
-
getAtlasTokenTracker
-
getGlyphStrikeCache
-
getTextBlobCache
-
trackDevice
-
untrackDevice
-
addTask
-
snap
-
flushTrackedDevices
@Internal public void flushTrackedDevices() -
init
-
discard
protected void discard() -
deallocate
protected void deallocate()Description copied from class:RefCntOverride this method to invoke de-allocation of the underlying resource.- Overrides:
deallocatein classContext
-