Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for layer blend mode "bm" for NORMAL, SCREEN, OVERLAY, DARKEN, LIGHTEN, and ADD #2408

Merged
merged 19 commits into from
Nov 18, 2023
Merged
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
8b5c429
feat: Add support for basic blend modes on Q and up
kudanai Oct 30, 2023
a8b7062
fix: default to NORMAL for invalid blend modes
kudanai Oct 30, 2023
e7b1257
feat: use PaintCompat and BlendModeCompat instead for better compatib…
kudanai Oct 30, 2023
0871413
Update lottie/src/main/java/com/airbnb/lottie/animation/content/FillC…
kudanai Oct 30, 2023
a804ac6
Update lottie/src/main/java/com/airbnb/lottie/parser/LayerParser.java
kudanai Oct 30, 2023
eac4986
Update lottie/src/main/java/com/airbnb/lottie/model/content/LBlendMod…
kudanai Oct 30, 2023
0bdad7b
fix: refactor method `toNativeBlendMode`
kudanai Oct 30, 2023
e284d20
tests: add individual blend-mode test files
kudanai Oct 30, 2023
6ae0498
feat: separate blendModes that have backwards support
kudanai Nov 7, 2023
cabfeff
feat: separate blendModes that have backwards support
kudanai Nov 7, 2023
9abec0d
Merge remote-tracking branch 'origin/layer-blend' into layer-blend
kudanai Nov 7, 2023
8bc5e98
chore: lint
kudanai Nov 7, 2023
c3a570c
Update lottie/src/main/java/com/airbnb/lottie/animation/content/FillC…
kudanai Nov 15, 2023
e4b9a8f
Merge branch 'master' into layer-blend
kudanai Nov 16, 2023
cf97401
chore: code clean up and minor performance tweak
kudanai Nov 16, 2023
ffa60f3
chore: cleanup imports
kudanai Nov 16, 2023
17f9223
chore: cleanup imports
kudanai Nov 16, 2023
66e3cc5
Merge remote-tracking branch 'origin/layer-blend' into layer-blend
kudanai Nov 16, 2023
1cc5c1b
fix: re-add guard for potential invalid index on blend-mode
kudanai Nov 16, 2023
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
fix: refactor method toNativeBlendMode
  • Loading branch information
kudanai committed Oct 30, 2023
commit 0bdad7b804fcca2202c708469a6de514cbb48bfc
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public FillContent(final LottieDrawable lottieDrawable, BaseLayer layer, ShapeFi
}

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
final BlendModeCompat blendMode = layer.getBlendMode().toCoreBlendMode();
final BlendModeCompat blendMode = layer.getBlendMode().toNativeBlendMode();
if (blendMode != null)
PaintCompat.setBlendMode(paint, blendMode);
}
Expand Down