# OHOS Skia m150

The OHOS Skia backend is based on JetBrains Skia tag
`m150-1f14f1166a` (`1f14f1166a847cb0e148f981600bf1e3e6ca6e46`).

The Skia checkout and build outputs are not part of this repository. The
complete source delta is stored in `patches/skia-m150-ohos.patch`.

## Build from a clean Skiko checkout

Run the OHOS build normally:

```bash
DEPLOY_VERSION=0.150.1-0.1.0-01 \
DEPLOY_RELEASE=true \
./scripts/build-ohos.sh
```

When `SKIA_DIR` is not set, the script automatically:

1. clones the official `m150-1f14f1166a` tag into the ignored
   `dependencies/skia/m150-1f14f1166a` directory;
2. applies `patches/skia-m150-ohos.patch`;
3. delegates the OHOS arm64/x64 build to the upstream
   `prepareLocalSkiaBuild` task; and
4. publishes Skiko using that checkout.

Subsequent builds reuse the checkout and compiled libraries.

## Optional: use an external checkout

Clone Skia in any external working directory, check out the exact m150 tag,
and apply the patch:

```bash
git clone https://github.com/JetBrains/skia.git /path/to/skia-m150
git -C /path/to/skia-m150 checkout m150-1f14f1166a
./skia/apply_patch.sh /path/to/skia-m150
```

Then point the normal build at it:

```bash
SKIA_DIR=/path/to/skia-m150 \
DEPLOY_VERSION=0.150.1-0.1.0-01 \
DEPLOY_RELEASE=true \
./scripts/build-ohos.sh
```
