pub struct DecodeOp<'a> { /* private fields */ }
Expand description
Information about an ongoing JPEG decode operation.
Returned by Decoder::start_decode
.
Implementations§
source§impl<'a> DecodeOp<'a>
impl<'a> DecodeOp<'a>
sourcepub fn submission(&self) -> &SubmissionIndex
pub fn submission(&self) -> &SubmissionIndex
Returns the SubmissionIndex
associated with the compute shader dispatch.
sourcepub fn texture(&self) -> &Texture
pub fn texture(&self) -> &Texture
Returns a reference to the target Texture
that the JPEG decode operation is writing to.
Note that, when using the Decoder
with JPEG images of varying sizes, not the entire
target texture will be written to. The caller has to ensure to only use the area of the
Texture
indicated by ImageData::width
and ImageData::height
.
sourcepub fn texture_changed(&self) -> bool
pub fn texture_changed(&self) -> bool
Returns a bool
indicating whether the target Texture
has been reallocated since the
last decode operation on the same Decoder
was started.
If this is the first decode operation, this method will return true
. The return value of
this method can be used to determine whether any bind groups referencing the target
Texture
need to be recreated.