Package icyllis.arc3d.granite
Class SurfaceDrawContext
java.lang.Object
icyllis.arc3d.granite.SurfaceDrawContext
- All Implemented Interfaces:
AutoCloseable
Used by
GraniteDevice-
Method Summary
Modifier and TypeMethodDescriptionvoidclear(float @Nullable [] clearColor) voidclose()Destructs this context.voiddiscard()voidflush(RecordingContext context) intintintintRead view and write view have the same origin.shortintgetWidth()booleanstatic @Nullable SurfaceDrawContextmake(RecordingContext context, @SharedPtr ImageViewProxy targetView, ImageInfo deviceInfo) intvoidrecordDependency(@SharedPtr Task task) voidrecordDraw(Draw draw) booleanrecordUpload(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) @Nullable @SharedPtr DrawTasksnapDrawTask(RecordingContext context)
-
Method Details
-
make
public static @Nullable SurfaceDrawContext make(RecordingContext context, @SharedPtr @SharedPtr ImageViewProxy targetView, ImageInfo deviceInfo) -
close
public void close()Destructs this context.- Specified by:
closein 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(float @Nullable [] 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
-