Package icyllis.arc3d.engine
Class ImageProxyCache
java.lang.Object
icyllis.arc3d.engine.ImageProxyCache
A factory for creating
SurfaceProxy
-derived objects. This class may be used on
the creating thread of RecordingContext
.-
Method Summary
Modifier and TypeMethodDescriptionvoid
adoptUniqueKeyFromSurface
(ImageViewProxy proxy, GpuSurface texture) Sets the unique key of the provided texture to the unique key of the GPU texture.boolean
assignUniqueKeyToProxy
(IUniqueKey key, ImageViewProxy proxy) Assigns a unique key to a texture.createLazyTexture
(BackendFormat format, int width, int height, int surfaceFlags, SurfaceProxy.LazyInstantiateCallback callback) Deprecated.createRenderTexture
(BackendFormat format, int width, int height, int sampleCount, int surfaceFlags) Deprecated.createTexture
(BackendFormat format, int width, int height, int surfaceFlags) Deprecated.createTextureFromPixels
(Pixmap pixmap, @RawPtr Pixels pixels, int dstColorType, int surfaceFlags) Deprecated.void
void
dropUniqueRefsOlderThan
(long nanoTime) boolean
void
processInvalidUniqueKey
(Object key, ImageViewProxy proxy, boolean invalidateResource) wrapBackendRenderTarget
(BackendRenderTarget backendRenderTarget, Runnable rcReleaseCB) Deprecated.wrapRenderableBackendTexture
(BackendImage texture, int sampleCount, boolean ownership, boolean cacheable, Runnable releaseCallback) Deprecated.
-
Method Details
-
assignUniqueKeyToProxy
Assigns a unique key to a texture. The texture will be findable via this key usinginvalid reference
#findProxyByUniqueKey()
-
dropUniqueRefs
public void dropUniqueRefs() -
dropUniqueRefsOlderThan
public void dropUniqueRefsOlderThan(long nanoTime) -
adoptUniqueKeyFromSurface
Sets the unique key of the provided texture to the unique key of the GPU texture. The GPU texture must have a valid unique key. -
processInvalidUniqueKey
-
createTexture
@Deprecated @Nullable @SharedPtr public @SharedPtr ImageViewProxy createTexture(BackendFormat format, int width, int height, int surfaceFlags) Deprecated.Create a lazyImageViewProxy
without any data.- See Also:
-
createTextureFromPixels
@Deprecated @Nullable @SharedPtr public @SharedPtr ImageViewProxy createTextureFromPixels(@Nonnull Pixmap pixmap, @Nonnull @RawPtr @RawPtr Pixels pixels, int dstColorType, int surfaceFlags) Deprecated.Creates a lazyImageViewProxy
for the pixel map.- Parameters:
pixmap
- pixel mappixels
- raw ptr to pixel ref, must be immutabledstColorType
- a color type for surface usage, seeImageDesc
surfaceFlags
- flags described as follows- See Also:
-
createRenderTexture
@Deprecated @Nullable @SharedPtr public @SharedPtr RenderTargetProxy createRenderTexture(BackendFormat format, int width, int height, int sampleCount, int surfaceFlags) Deprecated.- See Also:
-
wrapRenderableBackendTexture
@Deprecated @Nullable @SharedPtr public @SharedPtr RenderTargetProxy wrapRenderableBackendTexture(BackendImage texture, int sampleCount, boolean ownership, boolean cacheable, Runnable releaseCallback) Deprecated.Create a RenderTarget that wraps a backend texture and is both texturable and renderable.The texture must be single sampled and will be used as the color attachment 0 of the non-MSAA render target. If
sampleCount
is > 1, the underlying API uses separate MSAA render buffers then a MSAA render buffer is created that resolves to the texture. -
wrapBackendRenderTarget
@Deprecated @Nullable @SharedPtr public @SharedPtr RenderTargetProxy wrapBackendRenderTarget(BackendRenderTarget backendRenderTarget, Runnable rcReleaseCB) Deprecated. -
createLazyTexture
@Deprecated @Nullable @SharedPtr public @SharedPtr ImageViewProxy createLazyTexture(BackendFormat format, int width, int height, int surfaceFlags, SurfaceProxy.LazyInstantiateCallback callback) Deprecated.Creates a texture that will be instantiated by a user-supplied callback during flush. The width and height must either both be greater than 0 or both less than or equal to zero. A non-positive value is a signal that the width height are currently unknown. The texture will not be renderable.- See Also:
-
isDeferredProvider
public boolean isDeferredProvider()
-