Class SharedContext

java.lang.Object
icyllis.arc3d.engine.trash.SharedContext

@Deprecated public final class SharedContext extends Object
Deprecated.
Can be used to perform actions related to the generating Context in a thread safe manner. The proxy does not access the 3D API (e.g. OpenGL) that backs the generating Context.

This class is a public API, except where noted.

  • Method Details

    • createCharacterization

      @Nullable public SurfaceCharacterization createCharacterization(long cacheMaxResourceBytes, ImageInfo imageInfo, BackendFormat backendFormat, int origin, int sampleCount, boolean texturable, boolean mipmapped, boolean glWrapDefaultFramebuffer, boolean vkSupportInputAttachment, boolean vkSecondaryCommandBuffer, boolean isProtected)
      Deprecated.
      Create a surface characterization for a DDL that will be replayed into the Context that created this proxy. On failure the resulting characterization will be null.
      Parameters:
      cacheMaxResourceBytes - The max resource bytes limit that will be in effect when the DDL created with this characterization is replayed. Note: the contract here is that the DDL will be created as if it had a full 'cacheMaxResourceBytes' to use. If replayed into a Context that already has locked GPU memory, the replay can exceed the budget. To rephrase, all resource allocation decisions are made at record time and at playback time the budget limits will be ignored.
      imageInfo - The image info specifying properties of the GpuSurface that the DDL created with this characterization will be replayed into. Note: Engine doesn't make use of the ImageInfo.alphaType().
      backendFormat - Information about the format of the GPU surface that will back the GpuSurface upon replay.
      origin - The origin of the GpuSurface that the DDL created with this characterization will be replayed into.
      sampleCount - The sample count of the GpuSurface that the DDL created with this characterization will be replayed into.
      texturable - Will the surface be able to act as a texture?
      mipmapped - Will the surface the DDL will be replayed into have space allocated for mipmaps?
      glWrapDefaultFramebuffer - Will the surface the DDL will be replayed into be backed by GL FBO 0. This flag is only valid if using an GL backend.
      vkSupportInputAttachment - Can the vulkan surface be used as in input attachment?
      vkSecondaryCommandBuffer - Will the surface be wrapping a vulkan secondary command buffer via a VkSecondaryCBDrawContext? If this is true then the following is required: texturable = false mipmapped = false glWrapDefaultFramebuffer = false vkSupportInputAttachment = false
      isProtected - Will the (Vulkan) surface be DRM protected?
    • getDefaultBackendFormat

      @Nullable public BackendFormat getDefaultBackendFormat(int colorType, boolean renderable)
      Deprecated.
      Retrieve the default BackendFormat for a given ColorType and renderability. It is guaranteed that this backend format will be the one used by the following ColorType and SurfaceCharacterization.createBackendFormat(int, BackendFormat).

      The caller should check that the returned format is valid (nullability).

      Parameters:
      colorType - see ImageDesc
      renderable - true if the format will be used as color attachments
    • getCompressedBackendFormat

      @Nullable public BackendFormat getCompressedBackendFormat(int compressionType)
      Deprecated.
      Retrieve the BackendFormat for a given CompressionType. This is guaranteed to match the backend format used by the following createCompressedBackendTexture methods that take a CompressionType.

      The caller should check that the returned format is valid (nullability).

      Parameters:
      compressionType - see ImageDesc
    • getMaxSurfaceSampleCount

      public int getMaxSurfaceSampleCount(int colorType)
      Deprecated.
      Gets the maximum supported sample count for a color type. 1 is returned if only non-MSAA rendering is supported for the color type. 0 is returned if rendering to this color type is not supported at all.
      Parameters:
      colorType - see ImageDesc
    • isValid

      public boolean isValid()
      Deprecated.
      Returns:
      initialized or not, if ImmediateContext is created, it must be true
    • matches

      @Internal public boolean matches(Context c)
      Deprecated.
    • getBackend

      @Internal public int getBackend()
      Deprecated.
    • getOptions

      @Internal public ContextOptions getOptions()
      Deprecated.
    • getContextID

      @Internal public int getContextID()
      Deprecated.
    • getCaps

      @Internal public Caps getCaps()
      Deprecated.
    • getThreadSafeCache

      @Internal public ThreadSafeCache getThreadSafeCache()
      Deprecated.
    • getPipelineCache

      @Internal public SharedResourceCache getPipelineCache()
      Deprecated.
    • hashCode

      public int hashCode()
      Deprecated.
      Overrides:
      hashCode in class Object