@shopify/react-native-skia 1.12.1 → 1.12.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/apple/MetalContext.h +129 -0
- package/apple/MetalContext.mm +34 -0
- package/apple/MetalWindowContext.h +39 -0
- package/apple/MetalWindowContext.mm +64 -0
- package/apple/RNSkApplePlatformContext.h +79 -0
- package/apple/RNSkApplePlatformContext.mm +303 -0
- package/apple/RNSkAppleVideo.h +51 -0
- package/apple/RNSkAppleVideo.mm +137 -0
- package/apple/RNSkAppleView.h +37 -0
- package/apple/RNSkAppleView.mm +35 -0
- package/apple/RNSkMetalCanvasProvider.h +38 -0
- package/apple/RNSkMetalCanvasProvider.mm +108 -0
- package/apple/RNSkiaModule.h +20 -0
- package/apple/RNSkiaModule.mm +55 -0
- package/apple/SkiaCVPixelBufferUtils.h +119 -0
- package/apple/SkiaCVPixelBufferUtils.mm +344 -0
- package/apple/SkiaManager.h +25 -0
- package/apple/SkiaManager.mm +62 -0
- package/apple/SkiaPictureView.h +7 -0
- package/apple/SkiaPictureView.mm +66 -0
- package/apple/SkiaPictureViewManager.h +8 -0
- package/apple/SkiaPictureViewManager.mm +55 -0
- package/apple/SkiaUIView.h +45 -0
- package/apple/SkiaUIView.mm +172 -0
- package/apple/ViewScreenshotService.h +25 -0
- package/apple/ViewScreenshotService.mm +89 -0
- package/cpp/api/JsiSkShaderFactory.h +43 -8
- package/cpp/api/JsiSkVertices.h +14 -3
- package/lib/commonjs/__tests__/setup.d.ts +18 -0
- package/lib/commonjs/headless/index.d.ts +1 -0
- package/lib/commonjs/headless/index.js +12 -0
- package/lib/commonjs/headless/index.js.map +1 -1
- package/lib/commonjs/skia/web/Host.d.ts +3 -3
- package/lib/commonjs/skia/web/Host.js +16 -4
- package/lib/commonjs/skia/web/Host.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkCanvas.js +15 -15
- package/lib/commonjs/skia/web/JsiSkCanvas.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkColorFilterFactory.js +1 -1
- package/lib/commonjs/skia/web/JsiSkColorFilterFactory.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkFont.js +2 -2
- package/lib/commonjs/skia/web/JsiSkFont.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkImage.js +6 -6
- package/lib/commonjs/skia/web/JsiSkImage.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkImageFactory.js +2 -2
- package/lib/commonjs/skia/web/JsiSkImageFactory.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkImageFilterFactory.js +3 -3
- package/lib/commonjs/skia/web/JsiSkImageFilterFactory.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkMaskFilterFactory.js +1 -1
- package/lib/commonjs/skia/web/JsiSkMaskFilterFactory.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkPaint.js +3 -3
- package/lib/commonjs/skia/web/JsiSkPaint.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkPath.js +4 -4
- package/lib/commonjs/skia/web/JsiSkPath.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkPathEffectFactory.js +1 -1
- package/lib/commonjs/skia/web/JsiSkPathEffectFactory.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkPathFactory.js +1 -1
- package/lib/commonjs/skia/web/JsiSkPathFactory.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkPicture.js +1 -1
- package/lib/commonjs/skia/web/JsiSkPicture.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkShaderFactory.js +5 -5
- package/lib/commonjs/skia/web/JsiSkShaderFactory.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkVerticesFactory.js +1 -1
- package/lib/commonjs/skia/web/JsiSkVerticesFactory.js.map +1 -1
- package/lib/module/__tests__/setup.d.ts +18 -0
- package/lib/module/headless/index.d.ts +1 -0
- package/lib/module/headless/index.js +1 -0
- package/lib/module/headless/index.js.map +1 -1
- package/lib/module/skia/web/Host.d.ts +3 -3
- package/lib/module/skia/web/Host.js +16 -4
- package/lib/module/skia/web/Host.js.map +1 -1
- package/lib/module/skia/web/JsiSkCanvas.js +15 -15
- package/lib/module/skia/web/JsiSkCanvas.js.map +1 -1
- package/lib/module/skia/web/JsiSkColorFilterFactory.js +1 -1
- package/lib/module/skia/web/JsiSkColorFilterFactory.js.map +1 -1
- package/lib/module/skia/web/JsiSkFont.js +2 -2
- package/lib/module/skia/web/JsiSkFont.js.map +1 -1
- package/lib/module/skia/web/JsiSkImage.js +6 -6
- package/lib/module/skia/web/JsiSkImage.js.map +1 -1
- package/lib/module/skia/web/JsiSkImageFactory.js +2 -2
- package/lib/module/skia/web/JsiSkImageFactory.js.map +1 -1
- package/lib/module/skia/web/JsiSkImageFilterFactory.js +3 -3
- package/lib/module/skia/web/JsiSkImageFilterFactory.js.map +1 -1
- package/lib/module/skia/web/JsiSkMaskFilterFactory.js +1 -1
- package/lib/module/skia/web/JsiSkMaskFilterFactory.js.map +1 -1
- package/lib/module/skia/web/JsiSkPaint.js +3 -3
- package/lib/module/skia/web/JsiSkPaint.js.map +1 -1
- package/lib/module/skia/web/JsiSkPath.js +4 -4
- package/lib/module/skia/web/JsiSkPath.js.map +1 -1
- package/lib/module/skia/web/JsiSkPathEffectFactory.js +1 -1
- package/lib/module/skia/web/JsiSkPathEffectFactory.js.map +1 -1
- package/lib/module/skia/web/JsiSkPathFactory.js +1 -1
- package/lib/module/skia/web/JsiSkPathFactory.js.map +1 -1
- package/lib/module/skia/web/JsiSkPicture.js +1 -1
- package/lib/module/skia/web/JsiSkPicture.js.map +1 -1
- package/lib/module/skia/web/JsiSkShaderFactory.js +5 -5
- package/lib/module/skia/web/JsiSkShaderFactory.js.map +1 -1
- package/lib/module/skia/web/JsiSkVerticesFactory.js +1 -1
- package/lib/module/skia/web/JsiSkVerticesFactory.js.map +1 -1
- package/lib/typescript/lib/commonjs/mock/index.d.ts +1 -1
- package/lib/typescript/lib/commonjs/skia/index.d.ts +1 -1
- package/lib/typescript/lib/commonjs/skia/web/Host.d.ts +2 -2
- package/lib/typescript/lib/module/headless/index.d.ts +1 -0
- package/lib/typescript/lib/module/mock/index.d.ts +1 -1
- package/lib/typescript/lib/module/skia/Skia.d.ts +1 -1
- package/lib/typescript/lib/module/skia/web/Host.d.ts +2 -2
- package/lib/typescript/src/__tests__/setup.d.ts +18 -0
- package/lib/typescript/src/headless/index.d.ts +1 -0
- package/lib/typescript/src/skia/web/Host.d.ts +3 -3
- package/package.json +4 -4
- package/src/__tests__/setup.ts +67 -1
- package/src/headless/index.ts +2 -1
- package/src/renderer/__tests__/e2e/Matrix4.spec.tsx +1 -2
- package/src/renderer/__tests__/e2e/Paths.spec.tsx +13 -11
- package/src/skia/__tests__/Enums.spec.ts +24 -2
- package/src/skia/__tests__/Path.spec.ts +2 -2
- package/src/skia/web/Host.ts +24 -7
- package/src/skia/web/JsiSkCanvas.ts +17 -17
- package/src/skia/web/JsiSkColorFilterFactory.ts +1 -1
- package/src/skia/web/JsiSkFont.ts +2 -2
- package/src/skia/web/JsiSkImage.ts +14 -10
- package/src/skia/web/JsiSkImageFactory.ts +2 -2
- package/src/skia/web/JsiSkImageFilterFactory.ts +4 -4
- package/src/skia/web/JsiSkMaskFilterFactory.ts +1 -1
- package/src/skia/web/JsiSkPaint.ts +3 -3
- package/src/skia/web/JsiSkPath.ts +4 -4
- package/src/skia/web/JsiSkPathEffectFactory.ts +1 -1
- package/src/skia/web/JsiSkPathFactory.ts +1 -1
- package/src/skia/web/JsiSkPicture.ts +3 -3
- package/src/skia/web/JsiSkShaderFactory.ts +5 -5
- package/src/skia/web/JsiSkVerticesFactory.ts +1 -1
- package/lib/commonjs/skia/types/Image/ColorType.web.d.ts +0 -19
- package/lib/commonjs/skia/types/Image/ColorType.web.js +0 -43
- package/lib/commonjs/skia/types/Image/ColorType.web.js.map +0 -1
- package/lib/module/skia/types/Image/ColorType.web.d.ts +0 -19
- package/lib/module/skia/types/Image/ColorType.web.js +0 -37
- package/lib/module/skia/types/Image/ColorType.web.js.map +0 -1
- package/lib/typescript/lib/commonjs/skia/types/Image/ColorType.web.d.ts +0 -2
- package/lib/typescript/lib/module/skia/types/Image/ColorType.web.d.ts +0 -1
- package/lib/typescript/src/skia/types/Image/ColorType.web.d.ts +0 -19
- package/src/skia/types/Image/ColorType.web.ts +0 -19
@@ -1,37 +0,0 @@
|
|
1
|
-
export let ColorTypeCanvasKit = /*#__PURE__*/function (ColorTypeCanvasKit) {
|
2
|
-
ColorTypeCanvasKit[ColorTypeCanvasKit["Unknown"] = 0] = "Unknown";
|
3
|
-
// uninitialized
|
4
|
-
ColorTypeCanvasKit[ColorTypeCanvasKit["Alpha_8"] = 1] = "Alpha_8";
|
5
|
-
// pixel with alpha in 8-bit byte
|
6
|
-
ColorTypeCanvasKit[ColorTypeCanvasKit["RGB_565"] = 2] = "RGB_565";
|
7
|
-
// pixel with 5 bits red, 6 bits green, 5 bits blue, in 16-bit word
|
8
|
-
ColorTypeCanvasKit[ColorTypeCanvasKit["ARGB_4444"] = 3] = "ARGB_4444";
|
9
|
-
// pixel with 4 bits for alpha, red, green, blue; in 16-bit word
|
10
|
-
ColorTypeCanvasKit[ColorTypeCanvasKit["RGBA_8888"] = 4] = "RGBA_8888";
|
11
|
-
// pixel with 8 bits for red, green, blue, alpha; in 32-bit word
|
12
|
-
ColorTypeCanvasKit[ColorTypeCanvasKit["RGB_888x"] = 5] = "RGB_888x";
|
13
|
-
// pixel with 8 bits each for red, green, blue; in 32-bit word
|
14
|
-
ColorTypeCanvasKit[ColorTypeCanvasKit["BGRA_8888"] = 6] = "BGRA_8888";
|
15
|
-
// pixel with 8 bits for blue, green, red, alpha; in 32-bit word
|
16
|
-
ColorTypeCanvasKit[ColorTypeCanvasKit["RGBA_1010102"] = 7] = "RGBA_1010102";
|
17
|
-
// 10 bits for red, green, blue; 2 bits for alpha; in 32-bit word
|
18
|
-
ColorTypeCanvasKit[ColorTypeCanvasKit["BGRA_1010102"] = 8] = "BGRA_1010102";
|
19
|
-
// 10 bits for blue, green, red; 2 bits for alpha; in 32-bit word
|
20
|
-
ColorTypeCanvasKit[ColorTypeCanvasKit["RGB_101010x"] = 9] = "RGB_101010x";
|
21
|
-
// pixel with 10 bits each for red, green, blue; in 32-bit word
|
22
|
-
ColorTypeCanvasKit[ColorTypeCanvasKit["BGR_101010x"] = 10] = "BGR_101010x";
|
23
|
-
// pixel with 10 bits each for blue, green, red; in 32-bit word
|
24
|
-
ColorTypeCanvasKit[ColorTypeCanvasKit["BGR_101010x_XR"] = 11] = "BGR_101010x_XR";
|
25
|
-
// pixel with 10 bits each for blue, green, red; in 32-bit word, extended range
|
26
|
-
ColorTypeCanvasKit[ColorTypeCanvasKit["RGBA_10x6"] = 12] = "RGBA_10x6";
|
27
|
-
// pixel with 10 used bits (most significant) followed by 6 unused
|
28
|
-
ColorTypeCanvasKit[ColorTypeCanvasKit["Gray_8"] = 13] = "Gray_8";
|
29
|
-
// pixel with grayscale level in 8-bit byte
|
30
|
-
ColorTypeCanvasKit[ColorTypeCanvasKit["RGBA_F16Norm"] = 14] = "RGBA_F16Norm";
|
31
|
-
// pixel with half floats in [0,1] for red, green, blue, alpha; in 64-bit word
|
32
|
-
ColorTypeCanvasKit[ColorTypeCanvasKit["RGBA_F16"] = 15] = "RGBA_F16";
|
33
|
-
// pixel with half floats for red, green, blue, alpha; in 64-bit word
|
34
|
-
ColorTypeCanvasKit[ColorTypeCanvasKit["RGBA_F32"] = 16] = "RGBA_F32"; // pixel using C float for red, green, blue, alpha; in 128-bit word
|
35
|
-
return ColorTypeCanvasKit;
|
36
|
-
}({});
|
37
|
-
//# sourceMappingURL=ColorType.web.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"names":["ColorTypeCanvasKit"],"sources":["ColorType.web.ts"],"sourcesContent":["export enum ColorTypeCanvasKit {\n Unknown, // uninitialized\n Alpha_8, // pixel with alpha in 8-bit byte\n RGB_565, // pixel with 5 bits red, 6 bits green, 5 bits blue, in 16-bit word\n ARGB_4444, // pixel with 4 bits for alpha, red, green, blue; in 16-bit word\n RGBA_8888, // pixel with 8 bits for red, green, blue, alpha; in 32-bit word\n RGB_888x, // pixel with 8 bits each for red, green, blue; in 32-bit word\n BGRA_8888, // pixel with 8 bits for blue, green, red, alpha; in 32-bit word\n RGBA_1010102, // 10 bits for red, green, blue; 2 bits for alpha; in 32-bit word\n BGRA_1010102, // 10 bits for blue, green, red; 2 bits for alpha; in 32-bit word\n RGB_101010x, // pixel with 10 bits each for red, green, blue; in 32-bit word\n BGR_101010x, // pixel with 10 bits each for blue, green, red; in 32-bit word\n BGR_101010x_XR, // pixel with 10 bits each for blue, green, red; in 32-bit word, extended range\n RGBA_10x6, // pixel with 10 used bits (most significant) followed by 6 unused\n Gray_8, // pixel with grayscale level in 8-bit byte\n RGBA_F16Norm, // pixel with half floats in [0,1] for red, green, blue, alpha; in 64-bit word\n RGBA_F16, // pixel with half floats for red, green, blue, alpha; in 64-bit word\n RGBA_F32, // pixel using C float for red, green, blue, alpha; in 128-bit word\n}\n"],"mappings":"AAAA,WAAYA,kBAAkB,0BAAlBA,kBAAkB;EAAlBA,kBAAkB,CAAlBA,kBAAkB;EACnB;EADCA,kBAAkB,CAAlBA,kBAAkB;EAEnB;EAFCA,kBAAkB,CAAlBA,kBAAkB;EAGnB;EAHCA,kBAAkB,CAAlBA,kBAAkB;EAIjB;EAJDA,kBAAkB,CAAlBA,kBAAkB;EAKjB;EALDA,kBAAkB,CAAlBA,kBAAkB;EAMlB;EANAA,kBAAkB,CAAlBA,kBAAkB;EAOjB;EAPDA,kBAAkB,CAAlBA,kBAAkB;EAQd;EARJA,kBAAkB,CAAlBA,kBAAkB;EASd;EATJA,kBAAkB,CAAlBA,kBAAkB;EAUf;EAVHA,kBAAkB,CAAlBA,kBAAkB;EAWf;EAXHA,kBAAkB,CAAlBA,kBAAkB;EAYZ;EAZNA,kBAAkB,CAAlBA,kBAAkB;EAajB;EAbDA,kBAAkB,CAAlBA,kBAAkB;EAcpB;EAdEA,kBAAkB,CAAlBA,kBAAkB;EAed;EAfJA,kBAAkB,CAAlBA,kBAAkB;EAgBlB;EAhBAA,kBAAkB,CAAlBA,kBAAkB,iCAiBlB;EAAA,OAjBAA,kBAAkB;AAAA","ignoreList":[]}
|
@@ -1 +0,0 @@
|
|
1
|
-
export let ColorTypeCanvasKit: {};
|
@@ -1,19 +0,0 @@
|
|
1
|
-
export declare enum ColorTypeCanvasKit {
|
2
|
-
Unknown = 0,// uninitialized
|
3
|
-
Alpha_8 = 1,// pixel with alpha in 8-bit byte
|
4
|
-
RGB_565 = 2,// pixel with 5 bits red, 6 bits green, 5 bits blue, in 16-bit word
|
5
|
-
ARGB_4444 = 3,// pixel with 4 bits for alpha, red, green, blue; in 16-bit word
|
6
|
-
RGBA_8888 = 4,// pixel with 8 bits for red, green, blue, alpha; in 32-bit word
|
7
|
-
RGB_888x = 5,// pixel with 8 bits each for red, green, blue; in 32-bit word
|
8
|
-
BGRA_8888 = 6,// pixel with 8 bits for blue, green, red, alpha; in 32-bit word
|
9
|
-
RGBA_1010102 = 7,// 10 bits for red, green, blue; 2 bits for alpha; in 32-bit word
|
10
|
-
BGRA_1010102 = 8,// 10 bits for blue, green, red; 2 bits for alpha; in 32-bit word
|
11
|
-
RGB_101010x = 9,// pixel with 10 bits each for red, green, blue; in 32-bit word
|
12
|
-
BGR_101010x = 10,// pixel with 10 bits each for blue, green, red; in 32-bit word
|
13
|
-
BGR_101010x_XR = 11,// pixel with 10 bits each for blue, green, red; in 32-bit word, extended range
|
14
|
-
RGBA_10x6 = 12,// pixel with 10 used bits (most significant) followed by 6 unused
|
15
|
-
Gray_8 = 13,// pixel with grayscale level in 8-bit byte
|
16
|
-
RGBA_F16Norm = 14,// pixel with half floats in [0,1] for red, green, blue, alpha; in 64-bit word
|
17
|
-
RGBA_F16 = 15,// pixel with half floats for red, green, blue, alpha; in 64-bit word
|
18
|
-
RGBA_F32 = 16
|
19
|
-
}
|
@@ -1,19 +0,0 @@
|
|
1
|
-
export enum ColorTypeCanvasKit {
|
2
|
-
Unknown, // uninitialized
|
3
|
-
Alpha_8, // pixel with alpha in 8-bit byte
|
4
|
-
RGB_565, // pixel with 5 bits red, 6 bits green, 5 bits blue, in 16-bit word
|
5
|
-
ARGB_4444, // pixel with 4 bits for alpha, red, green, blue; in 16-bit word
|
6
|
-
RGBA_8888, // pixel with 8 bits for red, green, blue, alpha; in 32-bit word
|
7
|
-
RGB_888x, // pixel with 8 bits each for red, green, blue; in 32-bit word
|
8
|
-
BGRA_8888, // pixel with 8 bits for blue, green, red, alpha; in 32-bit word
|
9
|
-
RGBA_1010102, // 10 bits for red, green, blue; 2 bits for alpha; in 32-bit word
|
10
|
-
BGRA_1010102, // 10 bits for blue, green, red; 2 bits for alpha; in 32-bit word
|
11
|
-
RGB_101010x, // pixel with 10 bits each for red, green, blue; in 32-bit word
|
12
|
-
BGR_101010x, // pixel with 10 bits each for blue, green, red; in 32-bit word
|
13
|
-
BGR_101010x_XR, // pixel with 10 bits each for blue, green, red; in 32-bit word, extended range
|
14
|
-
RGBA_10x6, // pixel with 10 used bits (most significant) followed by 6 unused
|
15
|
-
Gray_8, // pixel with grayscale level in 8-bit byte
|
16
|
-
RGBA_F16Norm, // pixel with half floats in [0,1] for red, green, blue, alpha; in 64-bit word
|
17
|
-
RGBA_F16, // pixel with half floats for red, green, blue, alpha; in 64-bit word
|
18
|
-
RGBA_F32, // pixel using C float for red, green, blue, alpha; in 128-bit word
|
19
|
-
}
|