Repository: flutter
Issue: RRect doesn't work with Path.combine
Labels: c: regression,engine,dependency: skia,c: rendering,has reproducible steps,P2,team-engine,triaged-engine,found in release: 3.22,found in release: 3.23

### Steps to reproduce

Just run code sample below.
This issue is new in Flutter 3.22. On 3.19.5 it's fine.

### Expected results

A dark screen with nearly white rounded box in the center.


### Actual results

Draws Nothing.


### Code sample

<details open><summary>Code sample</summary>

```dart
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        body: SizedBox.expand(
          child: CustomPaint(painter: CameraOverlayPainter()),
        ),
      ),
    );
  }
}

class CameraOverlayPainter extends CustomPainter {
  const CameraOverlayPainter();

  @override
  void paint(Canvas canvas, Size size) {
    final box = Rect.fromCenter(
        center: size.center(Offset.zero), width: 240, height: 240);
    final rbox = RRect.fromRectAndRadius(box, const Radius.circular(8));

    final path = Path.combine(
      PathOperation.difference,
      Path()..addRect(Rect.largest),
      Path()..addRRect(rbox),
    );
    final colorFill = Paint()
      ..color = Colors.black87
      ..style = PaintingStyle.fill;
    canvas.drawPath(path, colorFill);
  }

  @override
  bool shouldRepaint(covariant CustomPainter oldDelegate) {
    return true;
  }
}
```

</details>


### Screenshots or Video

<details open>
<summary>Screenshots / Video demonstration</summary>

| Flutter 3.19 |  Flutter 3.22 |
| -- | -- |
| <img width="300" src="https://github.com/flutter/flutter/assets/11647836/fdf2f0a3-d937-4113-b3da-07e4dbbd4373" /> | <img width="300" src="https://github.com/flutter/flutter/assets/11647836/7d925b63-5ea7-4c64-bf65-6ec46a7f4f97"> |

</details>


### Logs

<details open><summary>Logs</summary>

```console
[Paste your logs here]
```

</details>


### Flutter Doctor output

<details open><summary>Doctor output</summary>

```console
[✓] Flutter (Channel stable, 3.22.2, on macOS 13.6 22G120 darwin-arm64, locale zh-Hans-CN)
    • Flutter version 3.22.2 on channel stable at /Users/zhx/fvm/versions/stable
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 761747bfc5 (5 weeks ago), 2024-06-05 22:15:13 +0200
    • Engine revision edd8546116
    • Dart version 3.4.3
    • DevTools version 2.34.3
    • Pub download mirror https://pub.flutter-io.cn
    • Flutter download mirror https://storage.flutter-io.cn

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/zhx/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.2)
    • Xcode at /Applications/Xcode_15.2.app/Contents/Developer
    • Build 15C500b
    • CocoaPods version 1.15.2

[✓] Android Studio (version 2023.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • 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.90.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.93.20240702

[✓] Connected device (2 available)
    • MI 8 (mobile)                   • ba9b410d              • android-arm64 • Android 10 (API 29)
    • Mac Designed for iPad (desktop) • mac-designed-for-ipad • darwin        • macOS 13.6 22G120 darwin-arm64
    ! Error: Browsing on the local area network for ifeng10 . Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac.
      The device must be opted into Developer Mode to connect wirelessly. (code -27)
```

</details>