Skip to content

Commit

Permalink
Add profile support for radial gradient without highlight
Browse files Browse the repository at this point in the history
Also fix big with JSON editor not loading from review.skia.org/923697

Bug: b/373892640
Change-Id: If9c6f59591f432c9ced9236efe5d8efe1161667e
Reviewed-on: https://skia-review.googlesource.com/c/buildbot/+/926143
Reviewed-by: Florin Malita <[email protected]>
Commit-Queue: Brandon Wilson <[email protected]>
  • Loading branch information
b-wils authored and SkCQ committed Dec 2, 2024
1 parent 7c445c7 commit 667c4e9
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -469,8 +469,8 @@ export const lowPowerLottieProfileSchema =
}
}
},
"no-gradient-fill-radial": {
"feature-code": "shape-fill-gradient-radial",
"no-gradient-fill-radial-highlight": {
"feature-code": "shape-fill-gradient-radial-highlight",
"feature-link": "shape-fill-gradient",
"not": {
"type": "object",
Expand All @@ -480,6 +480,17 @@ export const lowPowerLottieProfileSchema =
},
"t": {
"const": 2
},
"h": {
"not": {
"type": "object",
"properties": {
"k": {
"type": "number",
"const": 0
}
}
}
}
}
}
Expand All @@ -497,8 +508,8 @@ export const lowPowerLottieProfileSchema =
}
}
},
"no-gradient-stroke-radial": {
"feature-code": "shape-stroke-gradient-radial",
"no-gradient-stroke-radial-highlight": {
"feature-code": "shape-stroke-gradient-radial-highlight",
"feature-link": "shape-stroke-gradient",
"not": {
"type": "object",
Expand All @@ -508,6 +519,17 @@ export const lowPowerLottieProfileSchema =
},
"t": {
"const": 2
},
"h": {
"not": {
"type": "object",
"properties": {
"k": {
"type": "number",
"const": 0
}
}
}
}
}
}
Expand Down Expand Up @@ -560,13 +582,13 @@ export const lowPowerLottieProfileSchema =
"$ref": "#/$defs/features/shapes/types/no-stroke"
},
{
"$ref": "#/$defs/features/shapes/types/no-gradient-fill-radial"
"$ref": "#/$defs/features/shapes/types/no-gradient-fill-radial-highlight"
},
{
"$ref": "#/$defs/features/shapes/types/no-gradient-stroke"
},
{
"$ref": "#/$defs/features/shapes/types/no-gradient-stroke-radial"
"$ref": "#/$defs/features/shapes/types/no-gradient-stroke-radial-highlight"
},
{
"$ref": "#/$defs/features/shapes/types/only-supported-shape-transforms"
Expand Down
8 changes: 2 additions & 6 deletions skottie/modules/skottie-sk/skottie-sk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,6 @@ interface BodymovinPlayer {
destroy(): void;
}

interface LottieLibrary {
version: string;
loadAnimation(opts: Record<string, unknown>): BodymovinPlayer;
}

interface LoadedAsset {
name: string;
bytes?: ArrayBuffer;
Expand Down Expand Up @@ -1414,6 +1409,7 @@ export class SkottieSk extends ElementSk {
new Ajv({
allErrors: true,
verbose: true,
strict: false,
}),
});
}
Expand Down Expand Up @@ -1499,7 +1495,7 @@ export class SkottieSk extends ElementSk {
}
}

private onFrameChange(e: Event): void {
private onFrameChange(): void {
if (this.playing) {
this.playpause();
}
Expand Down

0 comments on commit 667c4e9

Please sign in to comment.