Commit graph

50 commits

Author SHA1 Message Date
Elham Aryanpur
d5453c62e9
Update wgpu to 0.15 2023-04-13 05:40:23 +02:00
Héctor Ramón Jiménez
438f97a6d0
Use RGBA texture for image and svg pipelines 2022-11-05 03:20:00 +01:00
Héctor Ramón Jiménez
8ce8d374b1
Refactor some image traits a bit
- Use `Size<u32>` were applicable.
- Rename `TextureStore` to `image::Storage`.
- Rename `TextureStoreEntry` to `image::storage::Entry`.
- Wire up `viewport_dimensions` to `iced_glow` for `Svg`.
2022-11-05 03:19:38 +01:00
Ian Douglas Scott
2c7c42ee93
Move image/svg handling into iced_graphics
The `TextureStore` trait is implemented by the atlas, and can also be
implemented in the glow renderer or in a software renderer.

The API here may be improved in the future, but API stability is
presumably not a huge issue since these types will only be used by
renderer backends.
2022-11-05 03:19:37 +01:00
Héctor Ramón Jiménez
2065a40f64
Fix clippy lints for all crates and features
... and check those in CI as well!
2022-07-09 18:43:05 +02:00
Héctor Ramón Jiménez
33a24b5821
Run cargo fmt 2022-07-09 17:07:40 +02:00
Poly
15f794b7a8
Address Clippy lints 2022-07-09 17:07:38 +02:00
Héctor Ramón Jiménez
adce9e0421
Update Rust edition to 2021 🎉 2022-02-09 17:57:44 +07:00
Héctor Ramón Jiménez
2cc7e0a449
Fix Operation::perform in image::raster
Flipping diagonally isn't the same as flipping each axis individually 😅
2021-09-30 16:51:42 +07:00
Héctor Ramón Jiménez
60070eef27
Remove absolute module path leftovers in image::raster 2021-09-30 16:20:04 +07:00
Héctor Ramón Jiménez
21d138aa28
Refactor Orientation into Operation in image::raster 2021-09-30 16:15:15 +07:00
Héctor Ramón Jiménez
86d6d53cfa
Remove unnecessary absolute module paths in image::raster 2021-09-30 14:35:10 +07:00
Héctor Ramón Jiménez
03fee3106f
Introduce Orientation enum in image::raster 2021-09-30 14:24:23 +07:00
Mateusz Czapliński
82e3e316dd Honor Exif orientation in iced_wgpu::Image 2021-09-30 00:28:56 +02:00
Héctor Ramón Jiménez
73f2881568
Update resvg to 0.18 in iced_wgpu 2021-09-27 14:23:22 +07:00
Poly
18753b77fc wgpu: Update to 0.10 2021-08-19 03:06:38 +02:00
aentity
665422e256 Use ceil on svg dimensions, fix svg memory usage
Calls ceil() on dimension bounds as this appears fix svg memory
unbounded usage because no longer cache miss.

The height and width return from resvg seem to always be ceiling
of float dimensions, so we try to match.
2021-07-21 02:26:53 -04:00
Aaron Housh
ae484429d3 Merge branch 'hecrj:master' into upgrade-wgpu 2021-05-19 07:14:26 -07:00
Zak
77a17cde83 This commit optimizes the function used to converg rgba pixels into bgra pixels. 2021-05-11 22:41:55 +01:00
Dispersia
9a2c78c405 Upgrade wgpu 2021-04-11 18:55:57 -07:00
Greg V
8f126c212b Add image format options to reduce code bloat, fixes #376 2021-02-13 15:53:24 +01:00
Greg V
81f37123ad Update resvg to 0.12 2020-12-19 01:24:40 +01:00
Héctor Ramón Jiménez
209056e1cd Fix deprecation warnings from image 2020-11-20 10:29:11 +01:00
Héctor Ramón Jiménez
9d4f664c94 Update bytemuck and remove zerocopy in iced_wgpu 2020-11-10 20:06:24 +01:00
Héctor Ramón Jiménez
44118263b5 Add labels to iced_wgpu internals 2020-08-31 14:41:41 +02:00
Héctor Ramón Jiménez
bb5f034e08 Fix offset calculation in image::Atlas 2020-08-27 14:45:08 +02:00
Héctor Ramón Jiménez
ecbee66bd6 Fix layers initialization in image::Atlas 2020-08-27 14:44:51 +02:00
Héctor Ramón Jiménez
83e037829c Update image pipeline in iced_wgpu 2020-08-27 13:41:00 +02:00
Héctor Ramón Jiménez
d807ef367e Update wgpu to 0.5 in iced_wgpu 🎉 2020-04-07 05:48:21 +02:00
Héctor Ramón Jiménez
ae009158cc Implement svg::Handle::from_memory
Useful if you already have your SVG data in memory.
2020-03-31 00:39:18 +02:00
Soham Chowdhury
1841015428 Add support for loading already-decoded image pixels 2020-02-29 07:32:42 +05:30
Héctor Ramón Jiménez
4e7159c22c Stop creating image pipeline when unnecessary 2020-02-28 14:38:42 +01:00
Héctor Ramón Jiménez
bb397cc668 Move Debug implementation for vector::Svg 2020-02-26 20:49:40 +01:00
Héctor Ramón Jiménez
271725faa5 Derive Debug for raster::Memory 2020-02-26 20:47:27 +01:00
Héctor Ramón Jiménez
d06d06e050 Deallocate atlas entries and remove padding 2020-02-26 20:10:19 +01:00
Héctor Ramón Jiménez
48d70280eb Fix multiple issues from the refactoring
- Update texture view on grow
- Fix atlas texture coordinates
- Fix fragmented uploads
2020-02-26 18:50:13 +01:00
Héctor Ramón Jiménez
c58d94f3fd Avoid creating a vertex buffer every frame 2020-02-26 12:55:04 +01:00
Héctor Ramón Jiménez
59d45a5440 Refactor texture atlas
- Split into multiple modules
- Rename some concepts
- Change API details
2020-02-26 12:34:34 +01:00
Malte Veerman
4617da2818 Implemented automatic deallocation of texture space for dropped allocations 2020-02-25 13:27:03 +01:00
Malte Veerman
2f695ef980 Updated shaders and removed debug_stub_derive dependency 2020-02-25 13:27:03 +01:00
Malte Veerman
c0996923c6 Batch image draw calls into one with multiple instances 2020-02-25 13:26:50 +01:00
Malte Veerman
3f38835105 Implement allocating large images across multiple texture array layers. 2020-02-25 13:26:50 +01:00
Malte Veerman
2f77a6bf5a Use array of atlases instead of one growing indefinitely. 2020-02-25 13:26:50 +01:00
Malte Veerman
82e0675c07 Some small debug changes 2020-02-25 13:26:50 +01:00
Malte Veerman
743637ebda Merged image and svg texture atlases into one owned by the image pipeline. 2020-02-25 13:26:50 +01:00
Malte Veerman
1bcfc9a5cc Implemented a texture atlas for images and svgs. 2020-02-25 13:26:33 +01:00
Héctor Ramón Jiménez
d78ae3c852 Avoid rasterizing SVG when a dimension is 0 2019-12-21 08:16:36 +01:00
Héctor Ramón Jiménez
514ccf8a72 Cache Svg load result properly
This avoids trying to reload the file constantly on every frame.
2019-12-15 07:07:49 +01:00
Héctor Ramón Jiménez
aa29849976 Add svg example 2019-12-15 06:31:53 +01:00
Héctor Ramón Jiménez
09707f29fc Rerasterize SVGs when resized and refactor a bit 2019-12-15 06:19:07 +01:00