Repository: flutter
Issue: [webview_flutter] Hybrid Compostion slows down animation
Labels: platform-android,a: platform-views,p: webview,package,P2,team-android,triaged-android

## Details

### Reproduce

https://github.com/Sunbreak/webview_gesture.repro

1. run the `webview_gesture` on emulator/phone
2. swipe slow from right to left (It feels smoothy without hybrid-composition by default)
3. uncomment the `if (Platform.isAndroid) WebView.platform = SurfaceAndroidWebView();`
4. retry the swipe (It feels laggy now)

- **TODO**: flutter run --profile --trace-skia
- **TODO**: screenshot

<!--
1.  Please tell us exactly how to reproduce the problem you are running into.

2.  Please attach a small application (ideally just one main.dart file) that
     reproduces the problem. You could use https://gist.github.com/ for this.

3.  Switch flutter to master channel and run this app on a physical device
     using profile mode with Skia tracing enabled, as follows:
       flutter channel master
       flutter run --profile --trace-skia
     Then press ‘P’ to enable the performance overlay.

     The bleeding edge master channel is encouraged here because Flutter is
     constantly fixing bugs and improving its performance. Your problem in an
     older Flutter version may have already been solved in the master channel.

4.  Record a video of the performance issue using another phone so we
     can have an intuitive understanding of what happened. Don’t use
     "adb screenrecord", as that affects the performance of the profile run.

5.  Open Observatory and save a timeline trace of the performance issue
     so we know which functions might be causing it. See "How to Collect
     and Read Timeline Traces" on this blog post:
       https://medium.com/flutter/profiling-flutter-applications-using-the-timeline-a1a434964af3#a499
-->

**Target Platform:** Android
**Target OS version/browser:** Android 5+
**Devices:** Nexus 5/Mi 5

## Logs

`flutter analyze`
```
wangkun@wangkuns-MacBook-Pro webview_gesture.repro % ~/flutter/flutter-master/bin/flutter analyze
Analyzing webview_gesture.repro...
No issues found! (ran in 11.8s)
```

`flutter doctor -v`
```
wangkun@wangkuns-MacBook-Pro webview_gesture.repro % ~/flutter/flutter-master/bin/flutter doctor -v
[✓] Flutter (Channel master, 1.24.0-2.0.pre.109, on Mac OS X 10.15.7 19H2 darwin-x64, locale en-CN)
    • Flutter version 1.24.0-2.0.pre.109 at /Users/wangkun/flutter/flutter-master
    • Framework revision 753c9c9f45 (36 minutes ago), 2020-10-21 19:35:21 -0400
    • Engine revision 1358f13c2f
    • Dart version 2.11.0 (build 2.11.0-242.0.dev)
    • Pub download mirror https://dart-pub.byted.org

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at /Users/wangkun/Library/Android/sdk
    • Platform android-30, build-tools 30.0.2
    • Java binary at: /Users/wangkun/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/201.6858069/Android
      Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.0.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.0.1, Build version 12A7300
    • CocoaPods version 1.10.0

[✓] Android Studio (version 4.1)
    • Android Studio at /Users/wangkun/Library/Application
      Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/201.6858069/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 1.8.0_242-release-1644-b3-6222593)

[✓] IntelliJ IDEA Ultimate Edition (version 2020.2.3)
    • IntelliJ at /Users/wangkun/Applications/JetBrains Toolbox/IntelliJ IDEA Ultimate.app
    • 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

[✓] VS Code (version 1.50.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.15.1

[✓] Connected device (1 available)
    • MI 5 (mobile) • a871d739 • android-arm64 • Android 8.0.0 (API 26)

• No issues found!
```