Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d392a868cc16eb889541f2c9716f5bee99db44db
      
https://github.com/WebKit/WebKit/commit/d392a868cc16eb889541f2c9716f5bee99db44db
  Author: Jean-Yves Avenard <[email protected]>
  Date:   2025-07-14 (Mon, 14 Jul 2025)

  Changed paths:
    M LayoutTests/media/media-source/media-source-rvfc-paused-offscreen.html
    M LayoutTests/media/media-source/media-source-rvfc-paused.html
    M LayoutTests/media/media-source/media-source-rvfc-playing-offscreen.html
    M LayoutTests/media/media-source/media-source-rvfc-playing.html
    M 
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h
    M 
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm
    M Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.h
    M Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.mm
    M Source/WebCore/platform/graphics/cocoa/VideoMediaSampleRenderer.h
    M Source/WebCore/platform/graphics/cocoa/VideoMediaSampleRenderer.mm

  Log Message:
  -----------
  Unnecessary calls to hasAvailableFrameCallback
https://bugs.webkit.org/show_bug.cgi?id=295704
rdar://155519872

Reviewed by Youenn Fablet.

hasAvailableFrameCallback was called whenever we render a frame on screen with 
no exception.

This callback is used for two purposes:
1- Let the MediaPlayerPrivate knows that the first frame has been decoded and 
rendered
2- When gathering frame metadata due to a call to requestVideoFrameCallback

1- is only required once after a flush
2- is only required if the JS has used requestVideoFrameCallback API.

We optimise the code to only call hasAvailableFrameCallback when needed only
by creating two callbacks that can be set, the first to be notified when the
first frame has been queued for rendering, and the second to be notified
after every single frame being rendered.

No change in observable behaviour, covered by existing tests.

* LayoutTests/media/media-source/media-source-rvfc-paused-offscreen.html: Fix 
incorrect include path.
* LayoutTests/media/media-source/media-source-rvfc-paused.html: ditto
* LayoutTests/media/media-source/media-source-rvfc-playing-offscreen.html: ditto
* LayoutTests/media/media-source/media-source-rvfc-playing.html: ditto

Canonical link: https://commits.webkit.org/297330@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to