fn skip_staging_buffer<'a>(
    device: &mut Device,
    staging_texture_pool: &mut UploadTexturePool,
    update_rect: DeviceIntRect,
    stride: Option<i32>,
    data: Arc<Vec<u8>>,
    dest_texture_id: CacheTextureId,
    texture: &Texture,
    batch_upload_buffers: &mut FastHashMap<ImageFormat, (GuillotineAllocator, Vec<BatchUploadBuffer<'a>>)>,
    batch_upload_textures: &mut Vec<Texture>,
    batch_upload_copies: &mut Vec<BatchUploadCopy>,
    stats: &mut UploadStats
)
Expand description

Take this code path instead of copying into a staging CPU buffer when the image we would copy is large enough that it’s unlikely anything else would fit in the buffer, therefore we might as well copy directly from the source image’s pixels.