Skip to content

Complete the image filter API #3148

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

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
507 changes: 472 additions & 35 deletions packages/skia/cpp/api/JsiSkImageFilterFactory.h

Large diffs are not rendered by default.

492 changes: 492 additions & 0 deletions packages/skia/src/renderer/__tests__/e2e/AdvancedImageFilters.spec.tsx

Large diffs are not rendered by default.

1,466 changes: 1,466 additions & 0 deletions packages/skia/src/renderer/__tests__/e2e/LightingImageFilters.spec.tsx

Large diffs are not rendered by default.

412 changes: 391 additions & 21 deletions packages/skia/src/skia/types/ImageFilter/ImageFilterFactory.ts

Large diffs are not rendered by default.

297 changes: 266 additions & 31 deletions packages/skia/src/skia/web/JsiSkImageFilterFactory.ts

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/skia/src/sksg/Recorder/commands/ImageFilters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ const declareDisplacementMapImageFilter = (
if (!shader) {
throw new Error("DisplacementMap expects a shader as child");
}
const map = ctx.Skia.ImageFilter.MakeShader(shader, null);
const map = ctx.Skia.ImageFilter.MakeShader(shader);
const imgf = ctx.Skia.ImageFilter.MakeDisplacementMap(
ColorChannel[enumKey(channelX)],
ColorChannel[enumKey(channelY)],
Expand Down
Loading