Package icyllis.arc3d.engine
Interface ISurface
public interface ISurface
Defines Surface-hierarchy constants. Do NOT directly this class as type.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intIndicates whether a backing store needs to be an exact match or can be larger than is strictly necessary.static final intIndicates whether an allocation should count against a cache budget.static final intForImageViewProxycreated in a deferred list recording thread it is possible for the unique key to be cleared on the backingImagewhile the unique key remains on the proxy.static final intUsed to create memoryless images, especially for MSAA attachments.static final intUsed to say whether an image has or should have mip levels allocated or not.static final intSurface flags shared between the Surface invalid input: '&' SurfaceProxy class hierarchies.static final intUsed to say whether image is backed by protected memory.static final intMeans the pixels in the image are read-only.static final intUsed to say whether a surface can be rendered to, whether an image can be used as color or depth/stencil attachments.static final intUsed to say whether an image can be a sampled image (i.e.static final intWhen set, the proxy will be instantiated outside the allocator (e.g.static final intUsed to say whether an image can be a storage image. -
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic intgetApproxSize(int size) Mapsizeto a larger multiple of 2.
-
Field Details
-
FLAG_NONE
static final int FLAG_NONESurface flags shared between the Surface invalid input: '&' SurfaceProxy class hierarchies. These flags can be used to create a surface or represent the state of the created surface. An arbitrary combination of flags may result in unexpected behaviors.- See Also:
-
FLAG_BUDGETED
static final int FLAG_BUDGETEDIndicates whether an allocation should count against a cache budget. Budgeted when set, otherwise not budgeted. This can be used forSurfaceProxyandGpuSurfaceat creation-time. Since a single budgeted GPU surface can be used by multipleSurfaceProxyat different times, its budgeted state may alter (SurfaceProxy can make a budgeted GPU surface become un-budgeted).- See Also:
-
FLAG_APPROX_FIT
static final int FLAG_APPROX_FITIndicates whether a backing store needs to be an exact match or can be larger than is strictly necessary. Approx fit when set, otherwise exact fit. This is aSurfaceProxyflag and aGpuSurfaceat creation-time flag.- See Also:
-
FLAG_MIPMAPPED
static final int FLAG_MIPMAPPEDUsed to say whether an image has or should have mip levels allocated or not. Mipmaps are allocated when set, otherwise mipmaps are not allocated.- See Also:
-
FLAG_SAMPLED_IMAGE
static final int FLAG_SAMPLED_IMAGEUsed to say whether an image can be a sampled image (i.e. a texture). This is not compatible withFLAG_MEMORYLESS.A valid SurfaceFlags should have at least one of
FLAG_SAMPLED_IMAGE,FLAG_STORAGE_IMAGEandFLAG_RENDERABLEset.- See Also:
-
FLAG_STORAGE_IMAGE
static final int FLAG_STORAGE_IMAGEUsed to say whether an image can be a storage image. This is not compatible withFLAG_MEMORYLESS.- See Also:
-
FLAG_RENDERABLE
static final int FLAG_RENDERABLEUsed to say whether a surface can be rendered to, whether an image can be used as color or depth/stencil attachments. Renderable when set, otherwise not renderable.- See Also:
-
FLAG_MEMORYLESS
static final int FLAG_MEMORYLESSUsed to create memoryless images, especially for MSAA attachments. If so, load op must NOT beEngine.LoadOp.kLoadand store op must NOT beEngine.StoreOp.kStore, and rendering may be efficient on TBDR GPU. This is also known as discardable and transient attachments.Note: Memoryless must be
FLAG_RENDERABLEand must NOT be eitherFLAG_SAMPLED_IMAGEorFLAG_STORAGE_IMAGE.- See Also:
-
FLAG_PROTECTED
static final int FLAG_PROTECTEDUsed to say whether image is backed by protected memory. Protected when set, otherwise not protected. Vulkan only.- See Also:
-
FLAG_READ_ONLY
@Internal static final int FLAG_READ_ONLYMeans the pixels in the image are read-only.ImageandImageViewProxyonly, typically for wrapped images. Read-only images cannot be renderable.- See Also:
-
FLAG_SKIP_ALLOCATOR
@Internal static final int FLAG_SKIP_ALLOCATORWhen set, the proxy will be instantiated outside the allocator (e.g. for proxies that are instantiated in on-flush callbacks). Otherwise,SurfaceAllocatorshould instantiate the proxy.SurfaceProxyonly.- See Also:
-
FLAG_DEFERRED_PROVIDER
@Internal static final int FLAG_DEFERRED_PROVIDERForImageViewProxycreated in a deferred list recording thread it is possible for the unique key to be cleared on the backingImagewhile the unique key remains on the proxy. When set, it loosens up asserts that the key of an instantiated uniquely-keyed texture proxy is also always set on the backingImage.ImageViewProxyonly.- See Also:
-
-
Method Details
-
getApproxSize
static int getApproxSize(int size) Mapsizeto a larger multiple of 2. Values invalid input: '<'= 1024 will pop up to the next power of 2. Those above 1024 will only go up half the floor power of 2.Possible values: 16, 32, 64, 128, 256, 512, 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384
- See Also:
-