Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Optional image features (linebender#1340)
  • Loading branch information
JAicewizard authored Oct 23, 2020
commit 62af6c40c5ec48d7bb33a1994222e406043091a8
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ You can find its changes [documented below](#060---2020-06-01).
- `LensWrap` widget moved into widget module ([#1251] by [@cmyr])
- `Delegate::command` now returns `Handled`, not `bool` ([#1298] by [@jneem])
- `TextBox` selects all contents when tabbed to on macOS ([#1283] by [@cmyr])
- All Image formats are now optional, reducing compile time and binary size by default ([#1340] by [@JAicewizard])

### Deprecated

Expand Down
19 changes: 18 additions & 1 deletion druid-shell/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,23 @@ default = ["gtk"]
gtk = ["gio", "gdk", "gdk-sys", "glib", "glib-sys", "gtk-sys", "gtk-rs", "gdk-pixbuf"]
x11 = ["x11rb", "nix", "cairo-sys-rs"]

# passing on all the image features. AVIF is not supported because it does not
# support decoding, and that's all we use `Image` for.
image_png = ["piet-common/image_png"]
jpeg = ["piet-common/jpeg"]
jpeg_rayon = ["piet-common/jpeg_rayon"]
gif = ["piet-common/gif"]
bmp = ["piet-common/bmp"]
ico = ["piet-common/ico"]
tiff = ["piet-common/tiff"]
webp = ["piet-common/webp"]
pnm = ["piet-common/pnm"]
dds = ["piet-common/dds"]
tga = ["piet-common/tga"]
farbfeld = ["piet-common/farbfeld"]
dxt = ["piet-common/dxt"]
hdr = ["piet-common/hdr"]

[dependencies]
# NOTE: When changing the piet or kurbo versions, ensure that
# the kurbo version included in piet is compatible with the kurbo version specified here.
Expand All @@ -33,7 +50,7 @@ anyhow = "1.0.32"
keyboard-types = { version = "0.5.0", default_features = false }

# Optional dependencies
image = { version = "0.23.10", optional = true }
image = { version = "0.23.10", optional = true, default_features = false }

[target.'cfg(target_os="windows")'.dependencies]
scopeguard = "1.1.0"
Expand Down
17 changes: 17 additions & 0 deletions druid/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,23 @@ image = ["druid-shell/image"]
svg = ["usvg", "harfbuzz-sys"]
x11 = ["druid-shell/x11"]

# passing on all the image features. AVIF is not supported because it does not
# support decoding, and that's all we use `Image` for.
png = ["druid-shell/image_png"]
jpeg = ["druid-shell/jpeg"]
jpeg_rayon = ["druid-shell/jpeg_rayon"]
gif = ["druid-shell/gif"]
bmp = ["druid-shell/bmp"]
ico = ["druid-shell/ico"]
tiff = ["druid-shell/tiff"]
webp = ["druid-shell/webp"]
pnm = ["druid-shell/pnm"]
dds = ["druid-shell/dds"]
tga = ["druid-shell/tga"]
farbfeld = ["druid-shell/farbfeld"]
dxt = ["druid-shell/dxt"]
hdr = ["druid-shell/hdr"]

[dependencies]
druid-shell = { version = "0.6.0", default-features = false, path = "../druid-shell" }
druid-derive = { version = "0.3.1", path = "../druid-derive" }
Expand Down