-
Notifications
You must be signed in to change notification settings - Fork 6k
[Android] Get the right frame_budget when device frame_rate is not 60 #30924
Conversation
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. |
fae42ee
to
408d2e3
Compare
40fd16e
to
4d09123
Compare
4d09123
to
9846193
Compare
flow/instrumentation.h
Outdated
/// The update type that is passed to the Stopwatch's constructor. | ||
enum FrameBudgetUpdateType { | ||
/// Update the latest frame budget value from refresh rate everytime. | ||
/// See: `DisplayManager::GetMainDisplayRefreshRate` | ||
kUpdateEverytime, | ||
/// Using the default value `fml::kDefaultFrameBudget` (60 fps) | ||
kOnShotValue, | ||
}; |
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.
Do we really need this? Why not just always pass in the rasterizer as a delegate and then call GetFrameBudget
on it every time?
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.
Do we really need this? Why not just always pass in the rasterizer as a delegate and then call
GetFrameBudget
on it every time?
@dnfield I tried to make only a delegate in the GetFrameBudget()
logic, and I need to find a place and memory to store the FixedRefreshRateDelegate
instance. A "0 - params" constructor of CompositorContext
and some unit tests need the fixed version like FixedRefreshRateStopWatch
. Do you have any advice to make the code better and more pretty?
fb564ff
to
93f491e
Compare
93f491e
to
48dd736
Compare
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
@@ -300,10 +313,6 @@ void CounterValues::Visualize(SkCanvas* canvas, const SkRect& rect) const { | |||
canvas->drawRect(marker_rect, paint); | |||
} | |||
|
|||
int64_t CounterValues::GetCurrentValue() 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.
This seems like a drive by removal of unused code?
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.
(which is fine by just making sure I understand and I'm not getting confused by GitHub's diff presentation)
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.
@dnfield Yes, it's a removal of unused code.
It fixes:
Change the logic to query device refresh rate from
FlutterJNI
every time.Pre-launch Checklist
writing and running engine tests.
///
).