MediaPlayerPrivateRemote and RemoteMediaPlayerProxy should use MonotonicTime instead of WallTime
<rdar://problem/77472811>
Created attachment 427604 [details] Patch
Comment on attachment 427604 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=427604&action=review > Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp:976 > - auto transmissionTime = MediaTime::createWithDouble((WallTime::now() - messageTime).value(), 1); > + auto transmissionTime = MediaTime::createWithDouble((MonotonicTime::now() - messageTime).value(), 1); > auto adjustedTaskTime = taskTime - transmissionTime; > auto currentTime = m_player->currentTime(); > if (adjustedTaskTime <= currentTime) { > - completionHandler(currentTime, WallTime::now()); > + completionHandler(currentTime, MonotonicTime::now()); I hate seeing code that fetches current time more than once in the same function (time will have advanced slightly, plus it has cost). So compute 'now' just once. > Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerState.h:40 > + MonotonicTime monotonicTime; The name of the member says what it is, but not what it does.
Created attachment 427612 [details] Patch for landing
Committed r276973 (237302@main): <https://commits.webkit.org/237302@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 427612 [details].