Commit Graph

168 Commits

Author SHA1 Message Date
Timon
54c5aa32f0 Desktop: Fix node graph grid dot transparency (#4504) 2026-09-04 13:37:19 +00:00
Timon
c2afc07a04 Move file filter creation from frontend to editor (#4351) 2026-08-28 09:19:44 +00:00
Timon
96cc520c4b Improve texture caching by allowing weak refs and more formats (#4447)
* Destroy GPU textures when the last reference drops

* Request pooled textures synchronously

* Pool cached textures by format

* Add the owned GPU buffer type

* Route the remaining GPU allocations through the executor

* Add weak texture parking to the texture cache

* Raise the texture cache budget to 1GB for native and 512MB for wasm
2026-08-27 15:19:00 +00:00
Timon
5a16e18b2a Add time since pointerdown to input event handling (#4443)
Add event time to the editor pointer states

The brush trace's hot core is position plus per-sample time, and the
frame clock is too coarse for high-rate tablets: several samples share
one timestamp and speed dynamics see dt = 0. The desktop stamps
editor-routed pointer input with a monotonic arrival time since winit
does not surface hardware timestamps; the web path can thread the
PointerEvent timeStamp through later.
2026-08-27 13:09:55 +00:00
Timon
3c5e1b8a38 Desktop: Support input from drawing tablets (#4354)
* Rename the editor mouse state types to Pointer* and the input_ modules

* Add optional pen attributes to the editor pointer state types

* Desktop: Send tablet pointer clicks to CEF as mouse clicks

* Desktop: End pointer lock and pending window drags on any left-equivalent release

* Desktop: Route pointer input carrying pen attributes directly to the editor

* Desktop: Route wheel and pinch input inside the viewport directly to the editor

* Desktop: Track double clicks on the direct editor route

* Desktop: Move the pointer lock position into InputState

* Restore the input state pointer position when pointer lock ends (review)

* Fix pen input being swallowed by Windows resize helper

* Update winit to 0.31.0-beta.2 from crates.io
2026-08-27 13:09:55 +00:00
Timon
f88896a887 Desktop: Stop compiling the editor into the wasm wrapper (#4348)
* Make wasm wrapper not depend on editor on native

* Introduce pkg-native

* Fix tests

* Fix fmt

* Correct span and make cargo fmt work inside editor_commands block

* Review

* Fix lint
2026-07-18 10:04:07 +00:00
Timon
f0bb2edb3d Desktop: Handle keyboard shortcuts that are skipped by CEF on Mac (#4322)
* Fix text selection on Mac

* Review
2026-07-15 10:57:48 +00:00
Timon
7e29fe9a31 Fix lifetime of cached textures (#4333)
* Fix in-use textures being destroyed

* Remove ImageTexture refs

* Review
2026-07-14 14:51:33 -07:00
Timon
ba0a97aefe Desktop: Isolate CEF-rendered UI into separate crate and process (#4321)
* Extract CEF rendered UI into a separate process and crate

* Review

* Review

* Review

* Review

* Remove necessary workarounds

* Block on frame copy ack

* Crop and resample frames correctly

* Skip blank frames

* Fix deps

* Fix fmt

* Fix clippy warning

* Review

* Fix todo
2026-07-14 14:51:20 -07:00
Timon
97f8113fe4 Desktop: Fix crash caused by submitting work mid surface-reconfigure (#4317)
Implement wgpu-sync
2026-07-09 12:09:01 +00:00
Dennis Kobert
540a4ff273 Integrate document-format storage into the editor (#4265)
* Integrate document-format storage into the editor

* Address review feedback: drop redundant clones and dedupe metadata traversal

* Extract DocumentHistory and move storage-metadata tests to their own file

* Extract storage diffing/IO, gate validation and .gdd save behind preferences, restructure tests

* Address PR review: save-format/path consistency, autosave persistence, and view-settings/diff fixes

* Skip storage remount on .gdd open and split value/timestamp drift in attribute diff

* Rename storage tests module and surface .gdd open failures with per-resource diff detail

* Add debug-menu toggle to hide the storage preferences section

* Hopefully fix async tests

* Shorten comments

* Fix tests

* Review

* Review

* Review

* Block on future mesages in tests

* Review

* Shorten comments

---------

Co-authored-by: Timon <me@timon.zip>
2026-07-04 19:27:00 +00:00
Timon
294952e152 Desktop: Use dirty rects for UI texture uploads (#4305) 2026-07-04 16:25:16 +00:00
Timon
6ee0239b96 Desktop: Update CEF to 149 (#4286) 2026-06-29 15:25:30 +00:00
Timon
6fb6e83d68 Desktop: Prefer Vulkan as the WGPU backend on Linux (#4270)
* Manual wgpu adapter selection

* Fall back to remaining adapters when the preferred one fails to initialize
2026-06-25 00:09:39 +00:00
Timon
674b3a213f Extract pipelines from WgpuExecutor into scope-provided pipeline nodes (#4210)
* Implement generic pipeline caching

* Fix WIP

* Fix

* Fix

* Fix

* Fix bench

* Migrations

* Review
2026-06-19 21:20:25 +00:00
Keavon Chambers
cde8dd78e6 Remove stray float literal .0 suffixes in lieu of just ending with a point (#4233)
Remove the .0 suffix on floats in lieu of just ending with a point
2026-06-12 19:47:36 -07:00
Timon
05d3d66587 Desktop: Block network requests in CEF that are not explicitly allowlisted (#4225) 2026-06-11 15:32:53 +00:00
Vishnu Tejas
f2c83d2278 Desktop: Fix double-clicking top bar not toggling maximize on Linux (#3940)
Fix double-clicking top bar not toggling maximize in linux
2026-06-10 10:19:19 +00:00
Dennis Kobert
7b9c480a8d Make ResourceStorage trait &self-based and remove 'static requirement (#4188)
* Make ResourceStorage trait &self-based with elided-lifetime ResourceFuture

* Adress review comments
2026-06-01 10:37:05 +00:00
Dennis Kobert
78679a5ba2 Implement editor level future message handler (#4182)
* Implement proper editor level async message handler

* Take application_io and wake callback as Editor::new arguments

* Rename AsyncMessage -> FutureMessage

* add DesktopWrapperMessage::Wake

---------

Co-authored-by: Timon <me@timon.zip>
2026-05-31 21:26:29 +00:00
Timon
bbbe04903f Define data types for ID-based resource handling (#4168)
* Add resource lib

* rename ResourceSource to ResourceInput

* Rename ResourceInput -> DataSource and improve API

* Review

---------

Co-authored-by: Dennis Kobert <dennis@kobert.dev>
2026-05-25 10:50:57 +00:00
Timon
2770df7567 Implement content-addressed resource storage for raster images (#4148)
* Implement content-addressed resource storage

* Implement OPFS resource storage

* Remove ResourceStorage::read

* Review
2026-05-21 19:31:07 +00:00
Timon
d5f0140f26 Upgrade WGPU and Linebender dependencies (#4154) 2026-05-17 15:36:59 +00:00
Timon
98daa75c26 Desktop: Add support for opening files through the already-running instance via a local socket (#4123)
* Desktop: Forward file-open args from a second launch to the running instance

Also adds socket infrastructure that can be used in the future to allow dispatching actions from another process

* Use socket instead of ipc terminologie

* Fix

* Fix

* Better pipe name on windows
2026-05-09 18:11:44 +00:00
Timon
d97fe835b5 Desktop: Focus app window when loading a document (#4124) 2026-05-08 15:00:20 +00:00
Keavon Chambers
9d876ab27d Add support for opening multiple selected files from disk (#4128) 2026-05-07 21:21:45 -07:00
Timon
1c2ac19b16 Desktop: Register the Graphite app as a file handler on Mac (#4106)
* Desktop: Implement native file open handler

* Desktop: Register file types on Mac

* Review
2026-05-06 13:05:30 +00:00
Timon
29f6e686ee Reimplement checkered background rendering (#4034)
* Reimplement background checkerboard rendering
2026-05-01 17:02:10 +00:00
Timon
324b9e664c Desktop: Update CEF (#4048)
* Update CEF to version 147

* Fix fmt

* Move CEF package

* Fix nix package

* Improve

* Cleanup

* Fix
2026-04-28 02:25:39 +02:00
Timon
6c5e3c97f8 Refactor persistence to combine document handling and workspace layout (#4031)
* Unify editor state persistence

* Review

* Fix

* Remove redundant DocumentDetails

* LoadDocumentContent indirection
2026-04-19 09:31:21 +00:00
Timon
2a2a60883d Desktop: Use the OS temp directory for CEF caches (#4030)
* Desktop: Use the OS temp dir

* Review
2026-04-15 10:47:45 +00:00
Keavon Chambers
60f16d72a5 Refactor IndexedDB document persistence to reuse data structures of desktop persistence (#4020)
* Switch indexedDb document serialized struct from camelCase to snake_case

* Refactor and migrate old indexedDb format to the same shape as desktop persistence

* Avoid duplicate struct definitions in the desktop crate

* Refactor frontend message handling to consolidate auto-save document loading

* Code review

* Review

---------

Co-authored-by: Timon <me@timon.zip>
2026-04-15 02:29:23 -07:00
Keavon Chambers
da45ab2f87 Add a checkered background to transparent artboards and the infinite canvas (#4022)
* Add checkered transparency rendering to infinite canvas and artboards

* Enable artboard clipping by default

* Make new infinite canvas documents begin with a white background layer

* Remove the export dialog's transparency option now that it's redundant

* Make exporting transparent JPGs use white not black

* Code review
2026-04-10 03:21:21 -07:00
Timon
661e8bc569 Remove surface and window from ApplicationIo (#3941)
* Remove surface and window from ApplicationIo

* Seperate Wasm and Native ApplicationIo

* Fix warnings

* Fix tests

* Remove redundant PlatformApplicationIo::new_offscreen

* Fixup

* Remove unused From implementaitions for ApplicationIo
2026-04-09 20:12:53 +00:00
Keavon Chambers
b100892bfa Add support for persistent storage of panel layouts, sizes, and active tabs (#4017)
* Add persistence to panel layouts

* Fix and persist the Window > Focus Document mode

* Add a Window > Reset Workspace action

* workspace_layout.json -> workspace_layout.ron

* Fix native app hole punch

* Cleanup review pass
2026-04-08 21:05:58 -07:00
Keavon Chambers
39656d4c73 Refactor panel layouts to generalize recursive panel group subdivision splits (#4014)
* Generalize recursive panel group splits

* Code review
2026-04-08 00:44:58 -07:00
Timon
211111a01f Desktop: Fix document tab reorder not being persisted (#4002)
* Desktop: Fix reorder not beeing persisted

* Desktop: Use rfd fork to support starting_directory with zenity dialog backend
2026-04-08 01:13:30 +02:00
Vishnu Tejas
36366b34f2 Desktop: Fix drag followed by a click causing a double click (#3721)
* Fix drag followed by a click causing a double click

* Review

* Fix quadruple click bug and cleanup

bug: quadruple bypassing time and distance check logic

* Improve readability

---------

Co-authored-by: Timon <me@timon.zip>
2026-03-24 00:21:02 +00:00
Timon
4a37ce4576 Desktop: Open file dialogs in the folder containing the document (#3934)
Desktop: Open save file dialogs in document parent folder
2026-03-23 01:36:25 +00:00
Timon
5b1e1cb2fb Fix artboards not exporting with transparency using Vello (#3921)
* Fix hide artboard for raster render mode

* Desktop: Fix transparent viewport blending

* Fix vello render using wrong color space conversion for background

* Review
2026-03-23 01:20:54 +00:00
Timon
0c7b5cd534 Desktop: Fix broken resizing affecting some Linux systems (#3917)
Desktop: Fix resizeing being broken on some Linux systems

Co-authored-by: James Lindsay <78500760+0HyperCube@users.noreply.github.com>
2026-03-20 01:28:22 +00:00
Timon
2e842cb425 Desktop: fix Mac restart dialog to show all changes to preferences requiring restart (#3903)
* Desktop: Fix restart dialog on Mac

* Fix

* Fix

* Fix

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-03-19 02:51:26 +00:00
Timon
4c45c88034 Desktop: Remove CEF CREDITS.html from Windows bundle (#3889) 2026-03-14 16:44:38 +00:00
Timon
a18b7ff79d Desktop: Add an 'Enable V-Sync' preference on Mac (#3887)
* add vsync pref

* account for physical scale in pixel preview passthru check

* change allow to expect attr

* Update user-facing v-sync text

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-03-11 21:32:37 +00:00
Dennis Kobert
116a4106c4 Add texture pool to render cache node (#3804)
* Add texture pool to render cache node

* Use direct texture copy instead of bitter and fix graphene_cli

* Remove warnings

* Fix wgpu import path

* Code review fixes
2026-03-11 09:44:21 +00:00
Timon
095c2a6d47 Add the Pixel Preview render mode (#3881)
* Add pixel preview render mode

* Fix fmt

* Remove unused sampler

* Remove unnecessary mutex

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-03-11 02:44:00 +00:00
Keavon Chambers
52d2b38a82 Refactor the TypeScript data flow for full type safety and auto-generation of Rust types (#3865)
* Migrate Specta to Tsify to auto-generate messages.ts, working except colors and widgets

* Adopt the generated FillColor/Color/GradientStops

* Fix widget typing

* Separate WidgetGroup enum variants into wrapper structs

* Small rename

* Simplify widgets further

* Clean up message type references

* Switch type imports to the auto-generated file

* Remove lowercase serde rename

* Fix FillChoice deserialization

* Fix small regression from #3837

* Improve type safety

* Make WidgetSpan type-safe

* More cleanup and type safety

* More type safety

* More type safety

* Get the rest to type-check without errors; improve widget builder macro to have optional icons; improve Svelte 5 configs

* Cargo fmt

* Fix imports

* Update outdated readme info

* Fix lint command rename references

* Fix typos

* One more typos fix

* Remove unnecessary dep: prefix from the edited Cargo.toml files

* Remove excess parts from Cargo.toml

* Fix compiling on desktop

* Revert "Remove excess parts from Cargo.toml"

This reverts commit 6b711117b3a5d5d8a3ee20f36a43bc74930b7c82.

* Update dev docs with simpler, more accurate instructions
2026-03-09 16:35:04 -07:00
Timon
5d22292072 Replace npm build script with new cargo run tool (#3832)
* move nix flake to root

* cargo run tool

* use thiserror in third-party-licenses tool

* prefere panic over exit

* Add automatic dependency check to cargo run tool

* Skip dependecies that are not needed for the current task

* Fixup

* Fixup

* fix windows

* Fixup

* improve usage text

* Fix linux bundle

* add graphen-cli

* fix build profile

* fix

* release profile should not include debug infos

* Review

* remove profiling profile

was redundent with release

* rename to cargo-run tool

* improve consistency

* rename deps to requirements

* fix

* return success when showing usage
2026-03-07 13:26:19 +00:00
Keavon Chambers
8a1dfb9d8f Refactor messages.ts by removing class-transformer and JS classes (#3858)
* Fix gamma correction with HTML-based editable Text tool text

* Migrate simple, undecorated classes to types

* Remove TupleToVec2 transformation

* Remove @Transform from tooltips

* Cleanup: replace value.toString() with String(value) everywhere

* Convert documentId from string to bigint

* Migrate the rest of the easy @Transform/@Type decorations

* Migrate FillChoice

* Migrate WidgetDiffUpdate

* Migrate WidgetInstance

* Migrate away from classes that extend WidgetProps

* Remove class-transformer and all classes in messages.ts

* Migrate UI layout passing

* Remove dead code

* Remove unnecessary export and readonly prefixes

* Remove HSVA type

* Break out Color, Gradient, and FillChoice functions into a utility-functions file

* Move widget helper functions from messages.ts into a new utility-functions file; restructure type imports

* Reduce internal type defs

* Rename JsMessage to FrontendMessage

* Code review fixes

* Fix other usages

* Tidying up
2026-03-05 01:43:21 -08:00
Timon
da7437c023 Reimplement notice file generation for third-party licenses through Rust, now with CEF credits (#3808) 2026-02-26 11:12:28 +00:00