feat: Enhance canvas texture management and selection encoding

- Introduced `SharedCompositePixels` for stable full-canvas pixel storage, enabling efficient pipeline creation and recovery.
- Added `TextureUpdate` struct for tightly packed dirty rectangle uploads, reducing unnecessary data copying.
- Refactored `upload_dirty_region` to utilize `TextureUpdate`, improving performance by eliminating full buffer scans.
- Implemented `encode_selection_texture` to generate an encoded R8 selection mask, optimizing selection rendering.
- Updated shader to sample selection texture only once, reducing GPU workload.
- Added comprehensive tests for texture updates, selection encoding, and performance diagnostics.
- Documented design decisions and validation sequences to ensure future performance stability.
This commit is contained in:
2026-07-22 02:49:22 +03:00
parent 7b4073e55b
commit 2d5b7a37e8
11 changed files with 994 additions and 399 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ pub mod svg_editor;
// Performance-critical engine paths isolated into dedicated modules.
mod layer_property_ops;
pub mod partial_composite;
mod stroke_brush;
pub mod stroke_brush;
mod stroke_cache;
use crate::dynamic_loader::svg_import::import_svg;