-
Notifications
You must be signed in to change notification settings - Fork 6k
Variable Refresh Rate Display #30223
Conversation
|
friendly ping @dnfield @iskakaushik :) |
dnfield
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
shell/common/display.h
Outdated
| #include <optional> | ||
|
|
||
| #include "flutter/fml/macros.h" | ||
| #include "variable_refresh_rate_reporter.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: full path for the include.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
shell/common/engine.h
Outdated
| return runtime_controller_.get(); | ||
| } | ||
|
|
||
| const std::shared_ptr<VsyncWaiter> GetVsyncWaiter() const; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
given that engine will outlive the vsync waiter, can we hand a reference rather than handing out a shared pointer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
shell/common/vsync_waiters_test.h
Outdated
| void UpdateRefreshRate(double refresh_rate); | ||
|
|
||
| // |RefreshRateReporter| | ||
| double GetRefreshRate() override; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this can be const
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
|
Any updates on @iskakaushik s queries? |
|
@chinmaygarde I was sick the last several days. I'm currently looking into another issue and will update this asap. |
cyanglaz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iskakaushik Updated based on your review comments! PTAL.
shell/common/display.h
Outdated
| #include <optional> | ||
|
|
||
| #include "flutter/fml/macros.h" | ||
| #include "variable_refresh_rate_reporter.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
shell/common/engine.h
Outdated
| return runtime_controller_.get(); | ||
| } | ||
|
|
||
| const std::shared_ptr<VsyncWaiter> GetVsyncWaiter() const; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
shell/common/vsync_waiters_test.h
Outdated
| void UpdateRefreshRate(double refresh_rate); | ||
|
|
||
| // |RefreshRateReporter| | ||
| double GetRefreshRate() override; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
| namespace testing { | ||
|
|
||
| TEST(VariableRefreshRateDisplayTest, ReportCorrectInitialRefreshRate) { | ||
| auto refresh_rate_reporter = std::make_shared<TestRefreshRateReporter>(60); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: no need for make shared in these tests anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
iskakaushik
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* f5ebc91 Roll Fuchsia Linux SDK from DS-3oCidC... to 3-zk7OPWY... (flutter/engine#30792) * 1064abe Roll Skia from 7a14f783bda3 to 41e994f735d9 (2 revisions) (flutter/engine#30793) * a4a505b Revert "Roll Fuchsia Linux SDK from DS-3oCidC... to 3-zk7OPWY... (#30792)" (flutter/engine#30798) * 6389ee3 [fuchsia] Bump buildroot/ to fix Fuchsia SDK roll (flutter/engine#30794) * f94c8e0 Implemented library uri support for FlutterFragmentActivities (flutter/engine#30790) * c180748 Roll Fuchsia Mac SDK from 9rr72kcgt... to LxyiyZWks... (flutter/engine#30796) * 6927c00 Roll Dart SDK from 3061b1d4c117 to 099f7f57767c (5 revisions) (flutter/engine#30797) * d889c0c Roll Skia from 41e994f735d9 to 345587df72ae (3 revisions) (flutter/engine#30800) * d53514e Remove unused setPersistentIsolateData function (flutter/engine#30795) * f1b4548 Variable Refresh Rate Display (flutter/engine#30223) * 0139f6e Roll Skia from 345587df72ae to 30fdea3d8fd5 (2 revisions) (flutter/engine#30802) * 643b278 Add 'keyCode' field to eventData map created from html keyboard events. (flutter/engine#30801)
|
@cyanglaz maybe we can also let Android also use this |
|
@eggfly Yes, I think it can. |
Create a new VariableRefreshRateDisplay, which replies on a VariableRefreshRateReporter to dynamically report refresh rate.
Make VsyncWaiterIOS a VariableRefreshRateReporter that reports the refresh rate dynamically.
Fixes flutter/flutter#94507
Pre-launch Checklist
writing and running engine tests.
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.