Repository: flutter
Issue: Overlay painting with 'hole' doesn't work on web
Labels: framework,platform-web,e: web_canvaskit,has reproducible steps,P2,e: web_skwasm,team-web,triaged-web,found in release: 3.22,found in release: 3.23

### Steps to reproduce

I've put a repro up in https://github.com/geokala/flutterpainterbug

When one tries to create an overlay with a painted 'hole' (a lighter area where one can see through the overlay, as in https://pub.dev/packages/app_tutorial), there is no lighter area appearing on web browsers in my testing.
I've not observed any obvious errors being reported.

### Expected results

When running the app from the linked repo, either on desktop or web, and clicking 'Show transparency with a hole', most of the screen should be dark with one lighter hole.

### Actual results

On desktop this seems to work.
On web (chromium+firefox), there is only the dark overlay.

### Code sample

<details open><summary>Code sample</summary>
https://github.com/geokala/flutterpainterbug
</details>


### Screenshots or Video

Will be attached shortly.


### Logs

<details open><summary>Logs</summary>

```console
flutter create --platforms=linux .
flutter run lib/main.dart -d linux
flutter run lib/main.dart -d web-server
```

</details>


### Flutter Doctor output

<details open><summary>Doctor output</summary>

```console
[✓] Flutter (Channel stable, 3.22.1, on Ubuntu 22.04.4 LTS 6.5.0-35-generic, locale en_GB.UTF-8)
    • Flutter version 3.22.1 on channel stable at /tmp/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision a14f74ff3a (2 weeks ago), 2024-05-22 11:08:21 -0500
    • Engine revision 55eae6864b
    • Dart version 3.4.1
    • DevTools version 2.34.3

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /home/talkur/Android/Sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: /home/talkur/Android/Sdk/android-studio/jbr/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)
    • All Android licenses accepted.

[✗] Chrome - develop for the web (Cannot find Chrome executable at google-chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[✓] Linux toolchain - develop for Linux desktop
    • Ubuntu clang version 14.0.0-1ubuntu1.1
    • cmake version 3.22.1
    • ninja version 1.10.1
    • pkg-config version 0.29.2

[✓] Android Studio (version 2023.2)
    • Android Studio at /home/talkur/Android/Sdk/android-studio
    • Flutter plugin version 78.4.1
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)

[✓] VS Code (version 1.86.2)
    • VS Code at /usr/share/code
    • Flutter extension can be installed from:
      🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (1 available)
    • Linux (desktop) • linux • linux-x64 • Ubuntu 22.04.4 LTS 6.5.0-35-generic

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.
```

</details>