Open neoyxm opened 3 years ago
Hi @neoyxm Thanks for filing the issue, I have created the project from your code, Indeed ClipOval doesn't work but ClipRRect works fine
Here is the preview | ClipRRect | ClipOval |
---|---|---|
The easier way to confirm this is a hybrid composition and not a platform view issue is by using the official webview_example
example
Uncomment or comment hybrid-composition, compare the results
Without hybrid composition | With hybrid composition |
---|---|
stable |
master |
---|---|
❌ | ❌ |
Check flutter doctor -v
outputs for each channel below
✅ : No Issue ❌: Issue reproduced
@TahaTesser Thanks for confirming this issue.
cc @blasten Is this a case of the mutator stack entry for ClipRRect
not being implemented on the Android backend?
Right. This isn't implemented yet
Hi ,
These days, our project wanna use ClipOval to clip a Native view(Hybrid composition) on Android, but it doesn't work.
Meanwhile, the clip can work on AndroidView Virtual Display mode.
I posted the sample code to github to demstrate this issue.
Dart side: main.dart: https://github.com/neoyxm/neoMP/blob/master/main.dart
Native side to create the native view: MainActivity.java: https://github.com/neoyxm/neoMP/blob/master/MainActivity.java NativeView.java: https://github.com/neoyxm/neoMP/blob/master/NativeView.java NativeViewFactory.java: https://github.com/neoyxm/neoMP/blob/master/NativeViewFactory.java
Steps to Reproduce
Expected results: https://github.com/neoyxm/neoMP/blob/master/Screenshot_20210706-095549.png
Actual results: https://github.com/neoyxm/neoMP/blob/master/Screenshot_20210706-101942.png
flutter doctor -v
```console [✓] Flutter (Channel stable, 2.2.2, on Mac OS X 10.15.7 19H1030 darwin-x64, locale zh-Hans-CN) • Flutter version 2.2.2 at /opt/flutter • Framework revision d79295af24 (3 weeks ago), 2021-06-11 08:56:01 -0700 • Engine revision 91c9fc8fe0 • Dart version 2.13.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 30.0.2) • Android SDK at /Users/yangxm/Library/Android/sdk/ • Platform android-30, build-tools 30.0.2 • ANDROID_HOME = /Users/yangxm/Library/Android/sdk/ • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264) ✗ Android license status unknown. Run `flutter doctor --android-licenses` to accept the SDK licenses. See https://flutter.dev/docs/get-started/install/macos#android-setup for more details. [✓] Xcode - develop for iOS and macOS • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 12.4, Build version 12D4e • CocoaPods version 1.10.1 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 4.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 11.0.8+10-b944.6916264) [✓] VS Code (version 1.57.1) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.24.0 [✓] Connected device (3 available) • LIO AL00 (mobile) • 7HX5T19929014779 • android-arm64 • Android 10 (API 29) • macOS (desktop) • macos • darwin-x64 • Mac OS X 10.15.7 19H1030 darwin-x64 • Chrome (web) • chrome • web-javascript • Google Chrome 91.0.4472.114 ! Doctor found issues in 1 category. ```