Skip to content

eglPresentationTimeANDROID is no effective #94786

@MxSoul

Description

@MxSoul

Hi @dnfield

In flutter/engine#29727 , try to use eglPresentationTimeANDROID to avoid bogging down the GPU.
But it may not have worked. I added some logs to prove it.

Log Code

can see log code in this

image

image

image

Steps to Reproduce

  1. Execute flutter run on the code sample

Actual results:

Kindly See Log

image

eglPresentationTimeANDROID-no-effect.log [download it and delete .log . And use https://ui.perfetto.dev/ to open it]
Can see trace also. Between the Red Flag to Blue Flag is one frame. In this frame raster commit 2 buffer to bufferQueue. These 2 buffer should be use/discard in the next Vsync-sf (Blue Flag). But it only use 1 frame.
image

Expected results:
Kindly See Log

image

See More detail In pull request flutter/engine#30182

Code sample
flutter/dev/benchmarks/complex_layout/lib/main.dart
Logs
ChenXiao-MBP:complex_layout maxiao$ flutter doctor -v
[✓] Flutter (Channel master, 2.6.0-12.0.pre.885, on Mac OS X 10.15.7 19H1417 darwin-x64, locale zh-Hans-CN)
    • Flutter version 2.6.0-12.0.pre.885 at /Users/maxiao/Documents/Develop/FlutterWorkPlace/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 16ec56ee0f (5 days ago), 2021-12-02 02:49:05 -0500
    • Engine revision 888f4c0fc6
    • Dart version 2.16.0 (build 2.16.0-56.0.dev)
    • DevTools version 2.8.0
    • Pub download mirror https://pub.flutter-io.cn

[!] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/maxiao/Library/Android/sdk
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    ✗ 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 12.0.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    ✗ Flutter requires a minimum Xcode version of 12.3.
      Download the latest version or update via the Mac App Store.
    • CocoaPods version 1.11.2

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

[✓] Android Studio (version 4.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 1.8.0_242-release-1644-b3-6915495)

[✓] IntelliJ IDEA Community Edition (version 2021.2.1)
    • IntelliJ at /Applications/IntelliJ IDEA CE.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

[!] IntelliJ IDEA Ultimate Edition (version 14.1.4)
    • IntelliJ at /Applications/IntelliJ IDEA 14.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
    ✗ This install is older than the minimum recommended version of 2017.1.0.

[✓] VS Code (version 1.62.3)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension can be installed from:
      🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (3 available)
    • ALP AL00 (mobile) • UYT5T18712002828 • android-arm64  • Android 10 (API 29)
    • macOS (desktop)   • macos            • darwin-x64     • Mac OS X 10.15.7 19H1417 darwin-x64
    • Chrome (web)      • chrome           • web-javascript • Google Chrome 96.0.4664.55

! Doctor found issues in 3 categories.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions