Skip to content

[Android] Platform view display(appearing) lags behind Flutter content by several frames #121686

@0xZOne

Description

@0xZOne

Compared to the Flutter content, there is a delay of several frames in the display of the platform view.

usingAndroidViewSurface.mp4

Possible related PR: #112402

Steps to Reproduce

  1. Get sample code: git clone git@github.com:0xZOne/platform_view_performance.git
  2. Execute flutter run
  3. As shown in the video, turn on the UsingAndroidViewSurface switch
  4. Tap on Matrix Transform and observe the Platform View's display timing on the new page.

Expected results:
Display Flutter content and Platform View simultaneously.

Actual results:
The Platform View is displayed a few frames later than the Flutter content.

flutter doctor -v
[✓] Flutter (Channel main, 3.8.0-18.0.pre.4, on macOS 13.1 22C65 darwin-x64, locale zh-Hans-CN)
    • Flutter version 3.8.0-18.0.pre.4 on channel main at /Users/zero/fvm/versions/main
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 87679ff1c3 (27 hours ago), 2023-02-28 10:31:51 +0200
    • Engine revision b78ac04129
    • Dart version 3.0.0 (build 3.0.0-277.0.dev)
    • DevTools version 2.22.1
    • 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 33.0.2)
    • Android SDK at /Users/zero/Library/Android/sdk
    • Platform android-33, build-tools 33.0.2
    • ANDROID_HOME = /Users/zero/Library/Android/sdk
    • ANDROID_SDK_ROOT = /Users/zero/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14C18
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.1)
    • 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.15+0-b2043.56-8887301)

[✓] VS Code (version 1.75.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.58.0

[✓] Connected device (3 available)
    • Pixel 3 (mobile) • 8CVX1TQK1 • android-arm64  • Android 11 (API 30)
    • macOS (desktop)  • macos     • darwin-x64     • macOS 13.1 22C65 darwin-x64
    • Chrome (web)     • chrome    • web-javascript • Google Chrome 110.0.5481.177

[✓] Network resources
    • All expected network resources are available.

• No issues found!

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work lista: platform-viewsEmbedding Android/iOS views in Flutter appsplatform-androidAndroid applications specifically

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions