Bug 225245

Summary: [GPUP] Poll videoPlaybackQualityMetrics at the frequency is it accessed by script
Product: WebKit Reporter: Eric Carlson <eric.carlson>
Component: MediaAssignee: Eric Carlson <eric.carlson>
Status: RESOLVED FIXED    
Severity: Normal CC: ews-watchlist, glenn, jer.noble, philipj, sergio, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=225329
Attachments:
Description Flags
Patch
none
Patch none

Description Eric Carlson 2021-04-30 13:42:11 PDT
Fetching videoPlaybackQualityMetrics is expensive, so don't update it every time cached state is updated.
Comment 1 Eric Carlson 2021-04-30 13:42:24 PDT
rdar://77159589
Comment 2 Eric Carlson 2021-04-30 14:31:13 PDT
Created attachment 427448 [details]
Patch
Comment 3 Jer Noble 2021-04-30 14:52:41 PDT
Comment on attachment 427448 [details]
Patch

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

> Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp:997
> +    static const double metricsAdvanceUpdate = 0.25;

Can we make this Seconds?
Comment 4 Eric Carlson 2021-04-30 15:09:57 PDT
Created attachment 427457 [details]
Patch
Comment 5 EWS 2021-04-30 16:36:32 PDT
Committed r276863 (237211@main): <https://commits.webkit.org/237211@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 427457 [details].
Comment 6 Simon Fraser (smfr) 2021-04-30 20:46:01 PDT
Comment on attachment 427457 [details]
Patch

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

> Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:1186
> +    auto now = WallTime::now();

Is WallTime the right thing to use here, instead of MonotonicTime?
Comment 7 Eric Carlson 2021-05-03 14:56:34 PDT
(In reply to Simon Fraser (smfr) from comment #6)
> Comment on attachment 427457 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=427457&action=review
> 
> > Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:1186
> > +    auto now = WallTime::now();
> 
> Is WallTime the right thing to use here, instead of MonotonicTime?

Good point, thanks.

I'll fix that in https://bugs.webkit.org/show_bug.cgi?id=225329.