Fix cached textures lifetime#4333
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors the codebase to replace ImageTexture and raw Arc<wgpu::Texture> usages with a unified Texture type from raster-types. It updates signatures and dependencies across several crates, including editor, wgpu-executor, and gstd, and removes manual texture drops. The review feedback highlights a potential compilation failure when building without the wgpu feature due to a missing fallback Texture definition in raster-types. Additionally, it is recommended to use the idiomatic Raster::new_gpu helper function instead of manually constructing the GPU struct in per_pixel_adjust_runtime.rs.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
There was a problem hiding this comment.
1 issue found across 18 files
Confidence score: 5/5
- In
node-graph/libraries/wgpu-executor/src/shader_runtime/per_pixel_adjust_runtime.rs, constructing the GPU path manually instead of usingRaster::new_gpu(tex_out)mainly risks style drift and slightly higher maintenance overhead, not a functional regression; merging as-is is low risk, but switching toRaster::new_gpu(tex_out)would keep this code consistent with the rest of the codebase before or shortly after merge.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="node-graph/libraries/wgpu-executor/src/shader_runtime/per_pixel_adjust_runtime.rs">
<violation number="1" location="node-graph/libraries/wgpu-executor/src/shader_runtime/per_pixel_adjust_runtime.rs:237">
P3: `Raster::new_gpu(tex_out)` is a helper designed for exactly this purpose — it accepts `impl Into<Texture>` and constructs the `GPU` struct internally. Using it here would be more concise and consistent with the rest of the codebase (e.g., `runtime.rs` and `export.rs` both use `Raster::new_gpu`).</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| unpadded_bytes_per_row, | ||
| padded_bytes_per_row, | ||
| // Keep source texture alive | ||
| _source: data_gpu.texture.clone(), |
There was a problem hiding this comment.
I would expect this to be the only actual fix right? Why is the diff so large?
There was a problem hiding this comment.
No, the Arc inside Raster is important, this case here is more theoretical. The rest is changes needed because of the different types and removal of the duplicated ImageTexture struct. No need to have multiple struct Type(Arc<wgpu::Texture>).
Fixing