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 Context
.-
Constructor Summary
Constructors -
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.@Nullable @SharedPtr ImageViewProxy
createLazyTexture
(BackendFormat format, int width, int height, int surfaceFlags, SurfaceProxy.LazyInstantiateCallback callback) Deprecated.@Nullable @SharedPtr RenderTargetProxy
createRenderTexture
(BackendFormat format, int width, int height, int sampleCount, int surfaceFlags) Deprecated.@Nullable @SharedPtr ImageViewProxy
createTexture
(BackendFormat format, int width, int height, int surfaceFlags) Deprecated.@Nullable @SharedPtr ImageViewProxy
createTextureFromPixels
(@NonNull Pixmap pixmap, @NonNull @RawPtr PixelRef pixelRef, int dstColorType, int surfaceFlags) Deprecated.void
void
dropUniqueRefsOlderThan
(long nanoTime) boolean
void
processInvalidUniqueKey
(Object key, ImageViewProxy proxy, boolean invalidateResource) @Nullable @SharedPtr RenderTargetProxy
wrapBackendRenderTarget
(BackendRenderTarget backendRenderTarget, Runnable rcReleaseCB) Deprecated.@Nullable @SharedPtr RenderTargetProxy
wrapRenderableBackendTexture
(BackendImage texture, int sampleCount, boolean ownership, boolean cacheable, Runnable releaseCallback) Deprecated.
-
Constructor Details
-
ImageProxyCache
-
-
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 @SharedPtr public @Nullable @SharedPtr ImageViewProxy createTexture(BackendFormat format, int width, int height, int surfaceFlags) Deprecated.Create a lazyImageViewProxy
without any data.- See Also:
-
createTextureFromPixels
@Deprecated @SharedPtr public @Nullable @SharedPtr ImageViewProxy createTextureFromPixels(@NonNull Pixmap pixmap, @RawPtr @NonNull @RawPtr PixelRef pixelRef, int dstColorType, int surfaceFlags) Deprecated.Creates a lazyImageViewProxy
for the pixel map.- Parameters:
pixmap
- pixel mappixelRef
- raw ptr to pixel ref, must be immutabledstColorType
- a color type for surface usage, seeImageDesc
surfaceFlags
- flags described as follows- See Also:
-
createRenderTexture
@Deprecated @SharedPtr public @Nullable @SharedPtr RenderTargetProxy createRenderTexture(BackendFormat format, int width, int height, int sampleCount, int surfaceFlags) Deprecated.- See Also:
-
wrapRenderableBackendTexture
@Deprecated @SharedPtr public @Nullable @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 @SharedPtr public @Nullable @SharedPtr RenderTargetProxy wrapBackendRenderTarget(BackendRenderTarget backendRenderTarget, Runnable rcReleaseCB) Deprecated. -
createLazyTexture
@Deprecated @SharedPtr public @Nullable @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()
-