edwloef
a5c42d4cb1
Derive Default for iced_wgpu::geometry::Cache
2024-10-02 15:24:37 +02:00
Héctor
3c68b64cbf
Merge pull request #2605 from Gobbel2000/frame_paste
...
Include images and saved meshes when pasting `Frame`
2024-09-24 22:59:57 +02:00
Gabriel Vogel
26b09e1b4d
Include images and saved meshes when pasting Frame
...
`tiny_skia::Frame` was ignoring images in `Frame::paste`, making images
not show up when created in a `with_clip` context.
`wgpu::Frame` similarly did not pass through meshes in its paste method,
that may have been saved from a nested `with_clip` call.
2024-09-24 22:29:03 +02:00
edwloef
f984e759eb
always increment solid/gradient count in wgpu mesh rendering
2024-09-22 12:22:49 +02:00
Héctor Ramón Jiménez
84b658dbef
Introduce strict-assertions feature flag
...
For now, this feature flag only enables validation
in `iced_wgpu`; which has become quite expensive
since its `0.20` release.
2024-09-20 00:59:45 +02:00
Héctor Ramón Jiménez
a5e69cfb5f
Update wgpu to 22.0
2024-09-20 00:14:47 +02:00
Héctor Ramón Jiménez
aed9a03e3c
Update wgpu to 0.20.1
2024-09-20 00:14:46 +02:00
Jovansonlee Cesar
0c502801e3
Make rendering of svg that has text work out of the box ( #2560 )
...
* fix: load system fonts to usvg font_db, this will make rendering of text in svg that has it
* feat: add an example that renders svg that has text on it
* Initialize `fontdb` only once for `vector` images
* Remove `svg_text` example
* Set `fontdb` for `usvg::Options` in `tiny_skia::vector`
---------
Co-authored-by: Héctor Ramón Jiménez <hector@hecrj.dev>
2024-09-13 21:43:00 +00:00
Héctor Ramón
2eb1cc54ac
Merge pull request #2484 from vladh/fix-radii-typo
...
wgpu: Fix “radii” typo
2024-09-11 00:43:50 +02:00
Vlad-Stefan Harbuz
ec39390c23
Add stroke_rectangle
...
This method should be able to leverage performance improvements in lyon's
`tessellate_rectangle` over `tessellate_path`.
2024-09-10 23:44:04 +02:00
Héctor Ramón Jiménez
f98328f4f1
Add text::Wrapping support
...
Co-authored-by: Neeraj Jaiswal <neerajj85@gmail.com>
2024-09-04 21:26:47 +02:00
Héctor Ramón Jiménez
d4b08462e5
Introduce Svg struct in core::svg
2024-08-04 04:52:55 +02:00
Héctor Ramón Jiménez
92bd3ecd6b
Introduce Image struct in core::image
2024-08-04 04:30:12 +02:00
Héctor Ramón Jiménez
0ceee1cf3a
Implement image support for canvas widget
2024-08-04 03:28:43 +02:00
Héctor Ramón Jiménez
87a613edd1
Render text on top of images by default
2024-08-03 16:24:07 +02:00
Héctor Ramón Jiménez
3eed34fa6f
Snap Quad lines to the pixel grid in iced_wgpu
2024-07-29 21:26:03 +02:00
Héctor Ramón
616689ca54
Update cosmic-text and resvg ( #2416 )
...
* Update `cosmic-text`, `glyphon`, and `resvg`
* Fix slow font fallback with `Shaping::Basic` in `cosmic-text`
* Update `cosmic-text` and `resvg`
* Update `cosmic-text`
* Fix `SelectAll` action in `editor`
* Fix some panics in `graphics::text::editor`
* Remove empty `if` statement in `tiny_skia::vector`
* Update `cosmic-text`, `glyphon`, and `rustc-hash`
2024-07-17 13:00:00 +02:00
Vlad-Stefan Harbuz
5c2185f123
wgpu: fix "radii" typo
2024-06-29 17:20:38 +01:00
Héctor Ramón Jiménez
6a03b8489b
Remove tracing leftovers in iced_wgpu
2024-06-11 20:03:28 +02:00
Héctor Ramón Jiménez
74a4ba65d6
Align images to the pixel grid in iced_wgpu
...
This should fix some graphical glitches, at the
expense of potential alignment issues with
small icons / images.
2024-05-12 13:44:13 +02:00
Héctor Ramón Jiménez
99c1464cc1
Update glyphon fork to a cleaner branch
2024-05-08 19:34:43 +02:00
Héctor Ramón Jiménez
bed53f8143
Reuse glyphon::Viewport explicitly
2024-05-08 13:41:12 +02:00
Héctor Ramón Jiménez
447f3a2d14
Reuse glyphon::Pipeline state in iced_wgpu
2024-05-08 12:29:17 +02:00
Héctor Ramón
e07b42ac96
Merge pull request #2427 from iced-rs/winit-0.30
...
Update `winit` to `0.30`
2024-05-08 09:23:53 +02:00
Héctor Ramón Jiménez
5b6f3499e1
Document present_mode_from_env in iced_wgpu
2024-05-07 21:13:51 +02:00
Héctor Ramón Jiménez
8a0701a0d9
Introduce ICED_PRESENT_MODE env var to pick a wgpu::PresentMode
2024-05-07 21:05:29 +02:00
Héctor Ramón Jiménez
2645524f88
Update winit to 0.30
2024-05-07 16:07:56 +02:00
Héctor Ramón Jiménez
ea64e4f63a
Trim image::Cache after wgpu::Renderer::present
2024-05-06 12:23:44 +02:00
Héctor Ramón Jiménez
547446f0de
Fix windows fighting over shared image::Cache
...
Image caches are local to each window now.
2024-05-06 12:23:44 +02:00
Héctor Ramón Jiménez
fa9e1d96ea
Introduce dynamic opacity support for Image and Svg
2024-05-03 13:25:58 +02:00
Héctor Ramón Jiménez
15057a05c1
Introduce center widget helper
...
... and also make `center_x` and `center_y` set
`width` and `height` to `Length::Fill`, respectively.
This targets the most common use case when centering
things and removes a bunch of boilerplate as a result.
2024-05-03 09:11:46 +02:00
Héctor Ramón Jiménez
610394b695
Rename global_scale to scale in wgpu::image
2024-05-02 17:28:28 +02:00
Héctor Ramón Jiménez
a57313b23e
Simplify image rotation API and its internals
2024-05-02 17:28:28 +02:00
Héctor Ramón Jiménez
09a6bcfffc
Add Image rotation support
...
Co-authored-by: DKolter <68352124+DKolter@users.noreply.github.com>
2024-05-02 17:27:45 +02:00
Héctor Ramón Jiménez
aae8e4f5cf
Fix clippy lints for new 1.78 stable toolchain
2024-05-02 17:23:32 +02:00
Héctor Ramón Jiménez
ffa6614026
Fix panic in wgpu::color::convert
2024-05-02 08:44:44 +02:00
Héctor Ramón Jiménez
b52c7bb610
Use an opaque Id type for image::Handle
...
Hashing pointers is a terrible idea.
2024-05-01 01:39:43 +02:00
Héctor Ramón Jiménez
45254ab88c
Use Bytes as the Container of ImageBuffer
...
Since we don't need to mutate images once loaded,
we avoid unnecessary extra allocations.
2024-05-01 00:55:49 +02:00
Héctor Ramón Jiménez
7e2d0dc931
Keep text atlases alive during temporary empty uploads
2024-04-30 23:51:00 +02:00
Héctor Ramón Jiménez
b276a603a1
Fix cache trimming loop in iced_wgpu::text
2024-04-30 23:15:04 +02:00
Héctor Ramón Jiménez
c51b85e7ab
Invalidate text uploads after atlas trimming
2024-04-30 21:59:46 +02:00
Héctor Ramón Jiménez
b5b78d505e
Introduce canvas::Cache grouping
...
Caches with the same `Group` will share their text
atlas!
2024-04-30 07:57:54 +02:00
Héctor Ramón Jiménez
24501fd73b
Fix text and triangle uploads being dropped on canvas cache clears
2024-04-30 05:13:24 +02:00
Héctor Ramón Jiménez
2dcd4f916e
Retain caches in iced_wgpu as long as Rc values are alive
...
This allows reusing a `canvas::Cache` at no cost even if it
is not presented every frame.
2024-04-27 14:16:12 +02:00
Héctor Ramón Jiménez
493c36ac71
Make image Cache eviction strategy less aggressive in iced_wgpu
...
Instead of trimming unconditionally at the end of
a frame, we now trim the cache only when there is a
cache miss.
This way, images that are not visible but still a
part of the layout will stay cached. Eviction will
only happen when the images are not a part of the
UI for two consectuive frames.
2024-04-24 21:29:30 +02:00
Héctor Ramón Jiménez
dbbbadfc95
Restore PREMULTIPLIED_ALPHA_BLENDING in triangle::msaa pipeline
2024-04-12 18:46:48 +02:00
Héctor Ramón Jiménez
d0233da8a2
Fix applying local transformation to layer_bounds in iced_wgpu::text
2024-04-12 18:37:38 +02:00
Héctor Ramón Jiménez
6ad5bb3597
Port iced_tiny_skia to new layering architecture
2024-04-09 22:25:16 +02:00
Héctor Ramón Jiménez
2c6fd9ac14
Make arguments of Renderer::new explicit in iced_wgpu
2024-04-08 15:35:54 +02:00
Héctor Ramón Jiménez
f88488543f
Remove leftover primitive::pipeline module
2024-04-08 15:05:12 +02:00