pub struct ImageUpload {
pub id: ImageId,
pub region: AtlasRegion,
pub natural: [u32; 2],
pub pixels: Arc<Pixmap>,
pub may_have_transparency: bool,
}Expand description
One region’s texels, waiting to be written into the atlas array.
The pixels are the premultiplied Rgba8Unorm the atlas stores, produced
once at allocation — an image made resident on frame 1 and drawn on frames
1..1000 is converted exactly once.
Fields§
§id: ImageIdThe handle the paint naming these pixels carries.
Carried so a consumer rebuilding its own view of residency can key this upload directly rather than pairing the frame’s uploads positionally against its encoded paints. A plan re-emitted until it is acknowledged breaks that pairing (an upload can outlive the frame whose draw order produced it), and an upload that names itself needs no ordering to be read correctly.
region: AtlasRegionWhere the texels go.
natural: [u32; 2]The source’s own declared extent, before any minification — see
ResidentImage::natural, whose value this is.
Carried on the upload because a consumer rebuilding its own view of
residency from a compiled frame has the upload and nothing else, and
region alone cannot say whether it holds a minified copy.
pixels: Arc<Pixmap>The premultiplied pixels, row-major and exactly region’s extent.
may_have_transparency: boolWhether those pixels include any non-opaque texel — the same hint
ResidentImage::may_have_transparency carries, so a consumer can
rebuild the whole residency record from this upload alone.