Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@MxSoul
Copy link
Contributor

@MxSoul MxSoul commented Dec 7, 2021

Fix flutter/flutter#94786

After Fix

Kindly See Log

image

eglPresentationTimeANDROID-fixed.log
[download it and delete .log . And use https://ui.perfetto.dev/ to open it]

image
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 is used/discard in the next Vsync-sf (Blue Flag).

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt. See testing the engine for instructions on
    writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat.

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@MxSoul MxSoul force-pushed the fix_presentation_time branch from f3b5eb6 to de18d90 Compare December 7, 2021 11:27
@dnfield
Copy link
Contributor

dnfield commented Dec 7, 2021

This may need a rebase to get the windows tests passing. Thanks for catching this! I guess I forgot to rerun a local benchmark before refactoring this and then hadn't checked the benchmarks again after landing it.

@MxSoul
Copy link
Contributor Author

MxSoul commented Dec 8, 2021

@dnfield Thanks for review. I have rebase main and all test passed ~

Copy link
Contributor

@dnfield dnfield left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

if (strstr(extensions, "EGL_ANDROID_presentation_time")) {
presentation_time_proc_ =
reinterpret_cast<PFNEGLPRESENTATIONTIMEANDROIDPROC>(
eglGetProcAddress("sEGL_ANDROID_presentation_time"));
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this have been EGL_ANDROID_presentation_time ? What is the relationship between this value and L24? @dnfield

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think what happened here is that I meant to copy and paste eglPresentationTimeANDROID, and instead I copy and pasted EGL_ANDROID_presentation_time .. and hit the s key by accident .. and then didn't notice it.

When I initially did some tests with this extension, I was just directly calling it and hacking it in as if it wouldn't have to be looked up. I then refactored to do it the right way (get the proc address this way), but never re-tested things to make sure it was still doing the good thing.. and then this got missed in review :(

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@iskakaushik FYI since I think you reviewed the original PR

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The bottom line is: this lookup is correct and we should accept it.

Copy link
Contributor Author

@MxSoul MxSoul Dec 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe can see this L92 and L193
https://cs.android.com/android/platform/superproject/+/android-10.0.0_r1:frameworks/native/opengl/libs/EGL/egl_platform_entries.cpp;l=92

In my opinion:
EGL_ANDROID_presentation_time is gBuiltinExtensionString, and It is used to determine whether an extension point exists.
eglPresentationTimeANDROID is key when get address.

Copy link

@blasten blasten Dec 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we add a comment about what EGL_ANDROID_presentation_time and eglPresentationTimeANDROID are used for?

It will definitely help next time there's a refactor, and the blame doesn't point to this PR. :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I am not native speaker. I'm not sure my description is accurate. Maybe @dnfield could help to add this comment?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@blasten I added some comments.

@dnfield dnfield merged commit 5502a0a into flutter:main Dec 10, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 10, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 10, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 11, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 11, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 11, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 11, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 11, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 11, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 11, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 11, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 12, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 12, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 12, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 12, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 12, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 12, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 12, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 12, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 12, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 12, 2021
zanderso pushed a commit to flutter/flutter that referenced this pull request Dec 12, 2021
* 37223ca [fuchsia] Use network-legacy-deprecated pkg in embedder test (flutter/engine#30244)

* 86769ee Roll Dart SDK from 2ace65b1b408 to 2091ff49c513 (8 revisions) (flutter/engine#30251)

* 5312e55 Win32: Handle OnAccessibilityEvent (flutter/engine#30176)

* 8fd8912 Revert the latest rolls of the Fuchsia SDK (flutter/engine#30254)

* df21689 Call IAccessible::accFocus to move a11y focus (flutter/engine#30256)

* 6aa8d5c Simplify win32 platform node delegate GetParent (flutter/engine#30258)

* ff328f0 Fix TestAccessibilityBridgeDelegate event caching (flutter/engine#30260)

* 842281e Test shell/platform/common a11y code on Windows (flutter/engine#30262)

* 806d8bc Roll Dart SDK from 2091ff49c513 to 7b6056f9db7f (1 revision) (flutter/engine#30259)

* 1ed10bb Android accessibility bridge also fire selection change event when it predict selection change. (flutter/engine#30199)

* 71fdb89 Override FlutterPlatformNodeDelegate::GetUniqueId (flutter/engine#30261)

* 5aa7b30 Cleanup old ndk CIPD upload script (flutter/engine#30253)

* 3653881 Roll Fuchsia Mac SDK from EcjcLVqar... to 1DgBWWOWV... (flutter/engine#30265)

* f764864 Roll Skia from 44c81d149273 to a964a72174e8 (9 revisions) (flutter/engine#30255)

* 2eca05e Migrate to Mockito 4.1.0 (flutter/engine#30257)

* 1a6005f Add iOS version to scenario golden images (flutter/engine#30263)

* 59c6f28 Roll Fuchsia Linux SDK from 3rLypXNTd... to UPWdoQziF... (flutter/engine#30266)

* 5502a0a Fix eglPresentationTimeANDROID is no effective (flutter/engine#30182)

* bb20dd0 Roll Skia from a964a72174e8 to 4d35c0d31d79 (16 revisions) (flutter/engine#30269)

* 33f4c32 Revert "Accessibility number formatting improvements for Windows (#29773)" (flutter/engine#30267)

* 5ece42f Roll Dart SDK from 7b6056f9db7f to f568598a262e (4 revisions) (flutter/engine#30270)

* 8d1272b Roll Dart SDK from f568598a262e to 49d5a2f58c4a (3 revisions) (flutter/engine#30277)

* 8b074c8 Roll Fuchsia Mac SDK from 1DgBWWOWV... to GoQ7KEnqp... (flutter/engine#30278)

* e1a71cf Roll Fuchsia Linux SDK from UPWdoQziF... to hhFGKobVD... (flutter/engine#30279)

* 6dc4046 Roll Fuchsia Mac SDK from GoQ7KEnqp... to Y_9lCzY64... (flutter/engine#30280)

* ff7d4d6 Roll Fuchsia Linux SDK from hhFGKobVD... to NAkkk-Vn5... (flutter/engine#30281)

* 2f97ac4 Roll Dart SDK from 49d5a2f58c4a to 01a9d4e9ede7 (1 revision) (flutter/engine#30283)

* 85f4d68 Roll Fuchsia Linux SDK from NAkkk-Vn5... to V2JLZw4H1... (flutter/engine#30285)

* 5130b83 Roll Fuchsia Mac SDK from Y_9lCzY64... to xBCcWw6gj... (flutter/engine#30284)

* e28882a Roll Dart SDK from 01a9d4e9ede7 to a78eae43582d (1 revision) (flutter/engine#30288)

* 368e3cc Revert Dart SDK to 2ace65b1b408 (flutter/engine#30290)
dnfield added a commit that referenced this pull request Dec 14, 2021
dnfield added a commit that referenced this pull request Dec 14, 2021
* Revert "Fix eglPresentationTimeANDROID is no effective (#30182)"

This reverts commit 5502a0a.

* Revert "Use eglPresentationTimeANDROID to avoid bogging down the GPU (#29727)"

This reverts commit 88948de.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

eglPresentationTimeANDROID is no effective

3 participants