Skip to content

Commit

Permalink
fix(🖼️): fix minor bug with LinearGammaColorFilter node factory (#2820)
Browse files Browse the repository at this point in the history
It always use the native implementation when available
  • Loading branch information
wcandillon authored Dec 18, 2024
1 parent 84a3b3a commit e77754c
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions packages/skia/src/dom/nodes/JsiSkDOM.ts
Original file line number Diff line number Diff line change
Expand Up @@ -331,15 +331,12 @@ export class JsiSkDOM implements SkDOM {
}

LinearToSRGBGammaColorFilter() {
return global.SkiaDomApi &&
global.SkiaDomApi.LinearToSRGBGammaColorFilterNode
? global.SkiaDomApi.LinearToSRGBGammaColorFilterNode()
return this.native? global.SkiaDomApi.LinearToSRGBGammaColorFilterNode()
: new LinearToSRGBGammaColorFilterNode(this.ctx);
}

SRGBToLinearGammaColorFilter() {
return global.SkiaDomApi &&
global.SkiaDomApi.SRGBToLinearGammaColorFilterNode
return this.native
? global.SkiaDomApi.SRGBToLinearGammaColorFilterNode()
: new SRGBToLinearGammaColorFilterNode(this.ctx);
}
Expand Down

0 comments on commit e77754c

Please sign in to comment.