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 TypeMethodDescriptionvoidadoptUniqueKeyFromSurface(ImageViewProxy proxy, GpuSurface texture) Sets the unique key of the provided texture to the unique key of the GPU texture.booleanassignUniqueKeyToProxy(IUniqueKey key, ImageViewProxy proxy) Assigns a unique key to a texture.@Nullable @SharedPtr ImageViewProxycreateLazyTexture(BackendFormat format, int width, int height, int surfaceFlags, SurfaceProxy.LazyInstantiateCallback callback) Deprecated.@Nullable @SharedPtr RenderTargetProxycreateRenderTexture(BackendFormat format, int width, int height, int sampleCount, int surfaceFlags) Deprecated.@Nullable @SharedPtr ImageViewProxycreateTexture(BackendFormat format, int width, int height, int surfaceFlags) Deprecated.@Nullable @SharedPtr ImageViewProxycreateTextureFromPixels(@NonNull Pixmap pixmap, @NonNull @RawPtr PixelRef pixelRef, int dstColorType, int surfaceFlags) Deprecated.voidvoiddropUniqueRefsOlderThan(long nanoTime) booleanvoidprocessInvalidUniqueKey(Object key, ImageViewProxy proxy, boolean invalidateResource) @Nullable @SharedPtr RenderTargetProxywrapBackendRenderTarget(BackendRenderTarget backendRenderTarget, Runnable rcReleaseCB) Deprecated.@Nullable @SharedPtr RenderTargetProxywrapRenderableBackendTexture(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 using. It is an error if an existing texture already has a key.invalid 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 lazyImageViewProxywithout 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 lazyImageViewProxyfor the pixel map.- Parameters:
pixmap- pixel mappixelRef- raw ptr to pixel ref, must be immutabledstColorType- a color type for surface usage, seeImageDescsurfaceFlags- 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
sampleCountis > 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()
-