Package icyllis.arc3d.granite
Class SurfaceDrawContext
java.lang.Object
icyllis.arc3d.granite.SurfaceDrawContext
- All Implemented Interfaces:
AutoCloseable
Used by
GraniteDevice
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear
(float[] clearColor) void
close()
Destructs this context.void
discard()
void
flush
(RecordingContext context) int
int
int
int
Read view and write view have the same origin.short
int
getWidth()
boolean
static SurfaceDrawContext
make
(RecordingContext context, @SharedPtr ImageViewProxy targetView, ImageInfo deviceInfo) int
void
recordDependency
(@SharedPtr Task task) void
recordDraw
(Draw draw) boolean
recordUpload
(RecordingContext context, @SharedPtr ImageViewProxy imageViewProxy, int srcColorType, int srcAlphaType, ColorSpace srcColorSpace, int dstColorType, int dstAlphaType, ColorSpace dstColorSpace, ImageUploadTask.MipLevel[] levels, Rect2ic dstRect, ImageUploadTask.UploadCondition condition) snapDrawTask
(RecordingContext context)
-
Method Details
-
make
@Nullable public static SurfaceDrawContext make(RecordingContext context, @SharedPtr @SharedPtr ImageViewProxy targetView, ImageInfo deviceInfo) -
close
public void close()Destructs this context.- Specified by:
close
in interfaceAutoCloseable
-
getReadView
- Returns:
- raw ptr to the read view
-
getImageInfo
-
getColorType
public int getColorType()- See Also:
-
getAlphaType
public int getAlphaType()- See Also:
-
getWidth
public int getWidth() -
getHeight
public int getHeight() -
isMipmapped
public boolean isMipmapped() -
getOrigin
public int getOrigin()Read view and write view have the same origin.- See Also:
-
getReadSwizzle
public short getReadSwizzle()- See Also:
-
clear
public void clear(@Nullable float[] clearColor) - Parameters:
clearColor
- premultiplied RGBA color, null means (0,0,0,0)
-
discard
public void discard() -
numPendingSteps
public int numPendingSteps() -
recordDraw
-
recordUpload
public boolean recordUpload(RecordingContext context, @SharedPtr @SharedPtr ImageViewProxy imageViewProxy, int srcColorType, int srcAlphaType, ColorSpace srcColorSpace, int dstColorType, int dstAlphaType, ColorSpace dstColorSpace, ImageUploadTask.MipLevel[] levels, Rect2ic dstRect, ImageUploadTask.UploadCondition condition) -
recordDependency
-
flush
-
snapDrawTask
-