Bug 224023 - Feed preferred frames per second back to the UI process for each DisplayRefreshMonitor
Summary: Feed preferred frames per second back to the UI process for each DisplayRefre...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Simon Fraser (smfr)
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-03-31 15:25 PDT by Simon Fraser (smfr)
Modified: 2021-04-01 08:16 PDT (History)
4 users (show)

See Also:


Attachments
Patch (31.33 KB, patch)
2021-03-31 15:31 PDT, Simon Fraser (smfr)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2021-03-31 15:25:08 PDT
Feed preferred frames per second back to the UI process for each DisplayRefreshMonitor
Comment 1 Simon Fraser (smfr) 2021-03-31 15:31:18 PDT
Created attachment 424830 [details]
Patch
Comment 2 Radar WebKit Bug Importer 2021-03-31 15:33:26 PDT
<rdar://problem/76074444>
Comment 3 Sam Weinig 2021-03-31 15:48:23 PDT
Comment on attachment 424830 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=424830&action=review

> Source/WebCore/ChangeLog:9
> +        so move from a model where has DisplayRefreshMonitor setPreferredFramesPerSecond()

This sentence doesn't quite parse.

> Source/WebCore/platform/graphics/DisplayRefreshMonitor.cpp:94
> +    auto addResult = m_clients.add(&client);
> +    if (addResult.isNewEntry) {

In what cases is addClient() called multiple times with the same client?

> Source/WebKit/UIProcess/WebProcessProxy.h:81
>  using PlatformDisplayID = uint32_t;
> +using FramesPerSecond = unsigned;

Sort please.
Comment 4 Simon Fraser (smfr) 2021-03-31 16:04:35 PDT
(In reply to Sam Weinig from comment #3)

> 
> > Source/WebCore/platform/graphics/DisplayRefreshMonitor.cpp:94
> > +    auto addResult = m_clients.add(&client);
> > +    if (addResult.isNewEntry) {
> 
> In what cases is addClient() called multiple times with the same client?

Don't know but it seems fine to only do the work when new clients are added.
Comment 5 Simon Fraser (smfr) 2021-04-01 08:16:12 PDT
https://trac.webkit.org/changeset/275345/webkit