Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
21 changes: 21 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ on:
description: "Enable Lottie Expressions"
required: false
default: true
feature_partial_rendering:
type: boolean
description: "Enable Partial Rendering (for thorvg)"
required: false
default: false
feature_simd:
type: boolean
description: "Enable SIMD"
Expand Down Expand Up @@ -135,6 +140,10 @@ jobs:
features="${features}tvg-simd,"
fi

if [ "${{ github.event.inputs.feature_partial_rendering }}" = "true" ]; then
features="${features}tvg-partial,"
fi

# Remove trailing comma if features exist
if [ -n "$features" ]; then
features="${features%,}"
Expand Down Expand Up @@ -216,6 +225,10 @@ jobs:
features="${features}tvg-simd,"
fi

if [ "${{ github.event.inputs.feature_partial_rendering }}" = "true" ]; then
features="${features}tvg-partial,"
fi

# Remove trailing comma if features exist
if [ -n "$features" ]; then
features="${features%,}"
Expand Down Expand Up @@ -286,6 +299,10 @@ jobs:
features="${features}tvg-lottie-expressions,"
fi

if [ "${{ github.event.inputs.feature_partial_rendering }}" = "true" ]; then
features="${features}tvg-partial,"
fi

# Remove trailing comma if features exist
if [ -n "$features" ]; then
features="${features%,}"
Expand Down Expand Up @@ -362,6 +379,10 @@ jobs:
features="${features}tvg-simd,"
fi

if [ "${{ github.event.inputs.feature_partial_rendering }}" = "true" ]; then
features="${features}tvg-partial,"
fi

# Remove trailing comma if features exist
if [ -n "$features" ]; then
features="${features%,}"
Expand Down
3 changes: 2 additions & 1 deletion dotlottie-ffi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ name = "uniffi-bindgen"
path = "uniffi-bindgen.rs"

[features]
default = ["tvg", "tvg-sw", "ffi"]
default = ["tvg", "tvg-sw", "tvg-partial", "ffi"]
tvg = ["dotlottie-rs/tvg"]
tvg-sw = ["dotlottie-rs/tvg-sw"]
tvg-webp = ["dotlottie-rs/tvg-webp"]
Expand All @@ -30,6 +30,7 @@ tvg-ttf = ["dotlottie-rs/tvg-ttf"]
tvg-threads = ["dotlottie-rs/tvg-threads"]
tvg-lottie-expressions = ["dotlottie-rs/tvg-lottie-expressions"]
tvg-simd = ["dotlottie-rs/tvg-simd"]
tvg-partial = ["dotlottie-rs/tvg-partial"]
tvg-log = ["dotlottie-rs/tvg-log"]
ffi = []
uniffi = []
Expand Down
3 changes: 2 additions & 1 deletion dotlottie-rs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ links = "thorvg"
crate-type = ["staticlib", "cdylib", "rlib"]

[features]
dev = ["tvg", "tvg-sw", "tvg-lottie-expressions", "tvg-threads", "tvg-png", "tvg-jpg", "tvg-webp", "tvg-ttf"]
dev = ["tvg", "tvg-sw", "tvg-lottie-expressions", "tvg-threads", "tvg-png", "tvg-jpg", "tvg-webp", "tvg-ttf", "tvg-partial"]
tvg = []
tvg-log = []
tvg-sw = []
Expand All @@ -19,6 +19,7 @@ tvg-webp = []
tvg-ttf = []
tvg-threads = []
tvg-simd = []
tvg-partial = []

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
Expand Down
4 changes: 4 additions & 0 deletions dotlottie-rs/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ mod thorvg {
writeln!(thorvg_config_h, "#define THORVG_THREAD_SUPPORT")?;
}

if cfg!(feature = "tvg-partial") {
writeln!(thorvg_config_h, "#define THORVG_PARTIAL_RENDER_SUPPORT")?;
}

let tvg_sw_enabled = cfg!(feature = "tvg-sw");
if tvg_sw_enabled {
writeln!(thorvg_config_h, "#define THORVG_SW_RASTER_SUPPORT")?;
Expand Down