[webkit-reviews] review granted: [Bug 223118] Show media session image artwork in Now Playing information pane. : [Attachment 423278] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 16 16:43:02 PDT 2021


Eric Carlson <eric.carlson at apple.com> has granted Jean-Yves Avenard [:jya]
<jya at apple.com>'s request for review:
Bug 223118: Show media session image artwork in Now Playing information pane.
https://bugs.webkit.org/show_bug.cgi?id=223118

Attachment 423278: Patch

https://bugs.webkit.org/attachment.cgi?id=423278&action=review




--- Comment #17 from Eric Carlson <eric.carlson at apple.com> ---
Comment on attachment 423278
  --> https://bugs.webkit.org/attachment.cgi?id=423278
Patch

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

> Source/WebCore/Modules/mediasession/MediaMetadata.cpp:57
> +    ResourceLoaderOptions options =
CachedResourceLoader::defaultCachedResourceOptions();

Although it isn't an issue with the current code, this method *could* be called
while an existing load is in progress so if m_cachedImage is non-null you
should probably remove the client and free it here. Maybe add a
`clearCachedImage` method and use it here and from the destructor?

> Source/WebCore/html/MediaElementSession.cpp:1116
> +	       artwork = NowPlayingInfoArtwork { sessionMetadata->artworkSrc(),
sessionMetadata->artworkImage()->mimeType(),
sessionMetadata->artworkImage()->data() };

Please add a FIXME here about the optimization of only sending image data when
it changes.


More information about the webkit-reviews mailing list