Skip to content

Commit d130e77

Browse files
committed
💚
1 parent 87fb8ac commit d130e77

4 files changed

Lines changed: 17 additions & 17 deletions

File tree

packages/webgpu/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-wgpu",
3-
"version": "0.5.11",
3+
"version": "0.5.12",
44
"description": "React Native WebGPU",
55
"main": "lib/commonjs/index",
66
"module": "lib/module/index",

packages/webgpu/src/Canvas.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import type { ViewProps } from "react-native";
33
import { View } from "react-native";
44

55
import WebGPUNativeView from "./WebGPUViewNativeComponent";
6+
import type { VideoPlayer } from "./types";
67

78
let CONTEXT_COUNTER = 1;
89
function generateContextId() {
@@ -21,12 +22,9 @@ declare global {
2122
) => RNCanvasContext;
2223
DecodeToUTF8: (buffer: NodeJS.ArrayBufferView | ArrayBuffer) => string;
2324
createImageBitmap: typeof createImageBitmap;
24-
loadVideoFrame: (path: string) => import("./types").VideoFrame;
25-
createTestVideoFrame: (
26-
width: number,
27-
height: number,
28-
) => import("./types").VideoFrame;
29-
createVideoPlayer: (path: string) => import("./types").VideoPlayer;
25+
loadVideoFrame: (path: string) => VideoFrame;
26+
createTestVideoFrame: (width: number, height: number) => VideoFrame;
27+
createVideoPlayer: (path: string) => VideoPlayer;
3028
writeTestVideoFile: () => string;
3129
};
3230
}

packages/webgpu/src/index.tsx

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
/// <reference types="@webgpu/types" />
22

3-
import type { NativeCanvas, RNCanvasContext } from "./types";
3+
import type {
4+
GPUSharedTextureMemory,
5+
GPUSharedTextureMemoryDescriptor,
6+
NativeCanvas,
7+
RNCanvasContext,
8+
VideoPlayer,
9+
} from "./types";
410

511
export * from "./main";
612
export type {
@@ -28,19 +34,16 @@ declare global {
2834
) => RNCanvasContext;
2935
DecodeToUTF8: (buffer: NodeJS.ArrayBufferView | ArrayBuffer) => string;
3036
createImageBitmap: typeof createImageBitmap;
31-
loadVideoFrame: (path: string) => import("./types").VideoFrame;
32-
createTestVideoFrame: (
33-
width: number,
34-
height: number,
35-
) => import("./types").VideoFrame;
36-
createVideoPlayer: (path: string) => import("./types").VideoPlayer;
37+
loadVideoFrame: (path: string) => VideoFrame;
38+
createTestVideoFrame: (width: number, height: number) => VideoFrame;
39+
createVideoPlayer: (path: string) => VideoPlayer;
3740
writeTestVideoFile: () => string;
3841
};
3942

4043
interface GPUDevice {
4144
importSharedTextureMemory(
42-
descriptor: import("./types").GPUSharedTextureMemoryDescriptor,
43-
): import("./types").GPUSharedTextureMemory;
45+
descriptor: GPUSharedTextureMemoryDescriptor,
46+
): GPUSharedTextureMemory;
4447
}
4548

4649
// Extend createImageBitmap to accept ArrayBuffer/TypedArray (encoded image bytes)

packages/webgpu/src/types.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ export interface CanvasRef {
1616
getContextId: () => number;
1717
getContext(contextName: "webgpu"): RNCanvasContext | null;
1818
getNativeSurface: () => NativeCanvas;
19-
whenReady: (callback: () => void) => void;
2019
}
2120

2221
// A native, GPU-shareable handle to a single video frame.

0 commit comments

Comments
 (0)