Package icyllis.arc3d.granite
Class SurfaceContext
java.lang.Object
icyllis.arc3d.granite.SurfaceContext
- All Implemented Interfaces:
AutoCloseable
Helper to orchestrate commands for a particular surface.
The base class assumes the surface is not renderable, so you can only perform simple read and write operations.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSurfaceContext(@RawPtr RecordingContext context, @RawPtr ImageProxyView readView, int colorType, int alphaType, ColorSpace colorSpace) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Destructs this context.final intfinal CapsgetCaps()final intfinal @RawPtr RecordingContextfinal intfinal ImageInfofinal intRead view and write view have the same origin.final shortfinal @RawPtr ImageProxyViewfinal intgetWidth()final boolean
-
Field Details
-
mContext
-
mReadView
-
-
Constructor Details
-
SurfaceContext
public SurfaceContext(@RawPtr @RawPtr RecordingContext context, @RawPtr @RawPtr ImageProxyView readView, int colorType, int alphaType, ColorSpace colorSpace) - Parameters:
context- raw ptr to the contextreadView- raw ptr to the read view
-
-
Method Details
-
getContext
- Returns:
- raw ptr to the context
-
getReadView
- Returns:
- raw ptr to the read view
-
getImageInfo
-
getColorType
public final int getColorType()- See Also:
-
getAlphaType
public final int getAlphaType()- See Also:
-
getWidth
public final int getWidth() -
getHeight
public final int getHeight() -
isMipmapped
public final boolean isMipmapped() -
getOrigin
public final int getOrigin()Read view and write view have the same origin.- See Also:
-
getReadSwizzle
public final short getReadSwizzle()- See Also:
-
getCaps
-
close
public void close()Destructs this context.- Specified by:
closein interfaceAutoCloseable
-