Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "[macOS] Use CVDisplayLink to drive repaint (#49159)" #51095

Merged
merged 1 commit into from
Feb 29, 2024

Conversation

knopp
Copy link
Member

@knopp knopp commented Feb 29, 2024

The original PR assumed that fml::TimePoint has same base as CACurrentMediaTime(). However due to recent change in Dart SDK that's no longer true. Dart SDK replaced call to mach_absolute_time with clock_gettime_nsec_np(CLOCK_MONOTONIC_RAW), while CACurrentMediaTime() corresponds to CLOCK_UPTIME_RAW.

This needs to be fixed either in Dart SDK dart-lang/sdk#55071 or the original PR needs to be relanded with appropriate conversions.

This reverts commit 21474ee.

Replace this paragraph with a description of what this PR is changing or adding, and why. Consider including before/after screenshots.

List which issues are fixed by this PR. You must list at least one issue.

If you had to change anything in the flutter/tests repo, include a link to the migration guide as per the breaking change policy.

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 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.

Copy link
Member

@cbracken cbracken left a comment

Choose a reason for hiding this comment

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

LGTM stamp from a Japanese personal seal

@cbracken cbracken added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 29, 2024
@knopp knopp added the waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land. label Feb 29, 2024
@loic-sharma
Copy link
Member

loic-sharma commented Feb 29, 2024

@cbracken Will this need a cherry pick to the upcoming beta branch? The branch cutoff was February 28 at 5pm PST.

@cbracken cbracken merged commit dd3383d into flutter:main Feb 29, 2024
31 checks passed
@cbracken cbracken added the cp: beta cherry pick to the beta release candidate branch label Feb 29, 2024
@flutteractionsbot
Copy link

Failed to create CP due to merge conflicts.
You will need to create the PR manually. See the cherrypick wiki for more info.

@cbracken
Copy link
Member

Re: the cherry-pick, yes we'll need to do it, but the release branch won't exist until branch alignment is complete. @itsjustkevin and I will sync on Monday on this.

auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Mar 1, 2024
…144436)

flutter/engine@7e8fefe...6f80444

2024-02-29 jonahwilliams@google.com [Impeller] use specific format for bootstrap texture. (flutter/engine#51082)
2024-02-29 jonahwilliams@google.com [Impeller] remove warning about device transient depth+stencil. (flutter/engine#51033)
2024-02-29 robert.ancell@canonical.com Refactor GL rendering to prepare for GTK4 (flutter/engine#50754)
2024-02-29 jacksongardner@google.com Reland "[skwasm] Clip pictures if they go beyond the bounds of the window." (flutter/engine#51077)
2024-02-29 matej.knopp@gmail.com Revert "[macOS] Use CVDisplayLink to drive repaint (#49159)" (flutter/engine#51095)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC aaclarke@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
knopp added a commit to knopp/engine that referenced this pull request Mar 1, 2024
knopp added a commit to knopp/engine that referenced this pull request Mar 4, 2024
knopp added a commit that referenced this pull request Mar 4, 2024
This relands the PR reverted in
#51095

Changes since the original PR:
- The macOS embedder does not assume particular clock when calling the
embedder API, but converts CAMediaTime to engine time and back
(`FlutterTimeConverter`)
- `FlutterVSyncWaiter` does not wait for displaylink callback during
warmup frame. This should prevent `timeToFirstFrameRasterizedMicros`
regressions.
- When enforcing frame pacing the raster thread is not blocked. This
should prevent `average_frame_rasterizer_time_millis` regressions.

## Pre-launch Checklist

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

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

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[C++, Objective-C, Java style guides]:
https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
[testing the engine]:
https://github.com/flutter/flutter/wiki/Testing-the-engine
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
auto-submit bot added a commit that referenced this pull request Mar 5, 2024
…#51192)

Reverts #51126
Initiated by: cbracken
Reason for reverting: looks like this regressed Skia benchmarks: https://flutter-flutter-perf.skia.org/e/?keys=Xbf8dce9c233bce34d20e2280e3f1d8db&selected=commit%3D39653%26name%3D%2Carch%3Dintel%2Cbranch%3Dmaster%2Cconfig%3Ddefault%2Cdevice_type%3Dnone%2Cdevice_version%3Dnone%2Chost_type%3Dmac%2Csub_result%3DtimeToFirstFrameRasterizedMicros%2Ctest%3Dflutter_gallery_macos__start_up%2C&xbaroffset=39569

The regression s
Original PR Author: knopp

Reviewed By: {cbracken}

This change reverts the following previous change:
Original Description:
This relands the PR reverted in #51095

Changes since the original PR:
- The macOS embedder does not assume particular clock when calling the embedder API, but converts CAMediaTime to engine time and back (`FlutterTimeConverter`)
- `FlutterVSyncWaiter` does not wait for displaylink callback during warmup frame. This should prevent `timeToFirstFrameRasterizedMicros` regressions.
- When enforcing frame pacing the raster thread is not blocked. This should prevent `average_frame_rasterizer_time_millis` regressions.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects: desktop autosubmit Merge PR when tree becomes green via auto submit App cp: beta cherry pick to the beta release candidate branch platform-macos waiting for tree to go green This PR is approved and tested, but waiting for the tree to be green to land.
Projects
None yet
4 participants