Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ runs:
.yarn/install-state.gz
node_modules
example/node_modules
key: yarn-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('.nvmrc', '.yarnrc.yml', '.yarn/releases/**', '.yarn/patches/**', 'yarn.lock', 'package.json', 'example/package.json') }}
key: yarn-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('.nvmrc', '.yarnrc.yml', '.yarn/releases/**', 'yarn.lock', 'package.json', 'example/package.json') }}

- name: Install dependencies
run: yarn install --immutable
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Yarn
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
Expand Down
66 changes: 0 additions & 66 deletions .yarn/patches/react-native-skia-npm-3.10.0-c316c6c886.patch

This file was deleted.

224 changes: 0 additions & 224 deletions .yarn/patches/react-native-webgpu-npm-0.23.0-50f3d74c47.patch

This file was deleted.

40 changes: 6 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ GPU fences between them, never pixels through JavaScript.

**Status:** young (0.x). Tested on the iOS Simulator, an Android emulator, one
iPhone and, for the web build, Chromium. H.264 and AAC everywhere, HEVC on
iOS, HDR export on iOS, Android and the web. Some paths need
[changes not yet released](#unreleased-changes-in-other-libraries) in other
libraries.
iOS, HDR export on iOS, Android and the web.

## Installation

Expand Down Expand Up @@ -102,25 +100,12 @@ To draw frames or read decoded ones on the GPU, add
(`react-native-webgpu`), and [React Native Skia](https://shopify.github.io/react-native-skia/)
(`react-native-skia`) if you draw with Skia.

### Temporary patches
### Versions

Until [three pull requests](#unreleased-changes-in-other-libraries) to
William Candillon's react-native-webgpu and react-native-skia are released,
some paths need them applied as patches. Exports of SDR video work without
them. With Yarn, copy the patch files from
[`.yarn/patches`](.yarn/patches) into your app and point `resolutions` at
them:

```json
"resolutions": {
"[email protected]": "patch:react-native-webgpu@npm%3A0.23.0#./.yarn/patches/react-native-webgpu-npm-0.23.0-50f3d74c47.patch",
"[email protected]": "patch:react-native-skia@npm%3A3.10.0#./.yarn/patches/react-native-skia-npm-3.10.0-c316c6c886.patch"
}
```

With npm or pnpm, apply the same diffs with
[patch-package](https://github.com/ds300/patch-package) or `pnpm patch`.
The patches are for those exact versions, and go away once the changes ship.
- React Native WebGPU 0.26.0 or later, for decoded video in the right colors
on Android ([Read video into WebGPU](docs/guides.md#read-video-into-webgpu)).
- React Native Skia 3.11.1 or later, for Skia drawing into pool surfaces on
the Android emulator.

## Codecs

Expand Down Expand Up @@ -276,19 +261,6 @@ including running it on a Mac.
</p>
<p align="center"><sub>A 20-second 1080p HEVC phone video, 40.3 MB, compressed to 720p H.264: 5.3 MB, in 3.2 s on the iOS Simulator. <a href="docs/guides.md#compress-a-video">How it works</a>.</sub></p>

## Unreleased changes in other libraries

Some paths need changes that are not released yet. This repository applies
them as Yarn patches (`.yarn/patches`); an app needs the same until they
ship (see [Temporary patches](#temporary-patches)). This is temporary,
pending review by William Candillon, who maintains both libraries.

| Change | Needed for |
| :-- | :-- |
| [wcandillon/react-native-webgpu#642](https://github.com/wcandillon/react-native-webgpu/pull/642) | Correct colors when reading decoded video into WebGPU on Android. |
| [wcandillon/react-native-webgpu#643](https://github.com/wcandillon/react-native-webgpu/pull/643) | HDR preview on a WebGPU canvas on iOS 26. Exports do not need it. |
| [wcandillon/react-native-skia#4510](https://github.com/wcandillon/react-native-skia/pull/4510) | Skia drawing into pool surfaces on the Android emulator. Real devices do not need it. |

## Acknowledgements

Set up from [William Candillon](https://github.com/wcandillon)'s
Expand Down
Loading
Loading