mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-19 10:58:04 +08:00
Migrate usage of the Hash trait for cache invalidation to the dedicated CacheHash trait (#4051)
* WIP start migrating usages of hash for cache invalidadion to dedicated trait * Finish migrating usages * Code review * Add comments clearifying the reasoning for using random ids in the VectorModification cach hash impl * Fix some remaining hash violations * Finish migration and fix compilation * Fix import ordering * Cleanup * Fix code review stuff --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
@@ -69,7 +69,7 @@ pub async fn export_document(
|
||||
}
|
||||
RenderOutputType::Texture(image_texture) => {
|
||||
// Convert GPU texture to CPU buffer
|
||||
let gpu_raster = Raster::<GPU>::new_gpu(image_texture.texture.as_ref().clone());
|
||||
let gpu_raster = Raster::<GPU>::new_gpu(image_texture.as_ref().clone());
|
||||
let cpu_raster: Raster<CPU> = gpu_raster.convert(Footprint::BOUNDLESS, wgpu_executor).await;
|
||||
let (data, width, height) = cpu_raster.to_flat_u8();
|
||||
// Explicitly drop texture to make sure it lives long enough
|
||||
@@ -202,7 +202,7 @@ pub async fn export_gif(
|
||||
let (data, img_width, img_height) = match result {
|
||||
TaggedValue::RenderOutput(output) => match output.data {
|
||||
RenderOutputType::Texture(image_texture) => {
|
||||
let gpu_raster = Raster::<GPU>::new_gpu(image_texture.texture.as_ref().clone());
|
||||
let gpu_raster = Raster::<GPU>::new_gpu(image_texture.as_ref().clone());
|
||||
let cpu_raster: Raster<CPU> = gpu_raster.convert(Footprint::BOUNDLESS, wgpu_executor).await;
|
||||
// Explicitly drop texture to make sure it lives long enough
|
||||
std::mem::drop(image_texture);
|
||||
|
||||
Reference in New Issue
Block a user