[webkit-reviews] review granted: [Bug 205763] [Media in GPU process] Add remote MIME type cache : [Attachment 386789] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Jan 5 13:28:26 PST 2020


Dean Jackson <dino at apple.com> has granted Eric Carlson
<eric.carlson at apple.com>'s request for review:
Bug 205763: [Media in GPU process] Add remote MIME type cache
https://bugs.webkit.org/show_bug.cgi?id=205763

Attachment 386789: Patch

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




--- Comment #8 from Dean Jackson <dino at apple.com> ---
Comment on attachment 386789
  --> https://bugs.webkit.org/attachment.cgi?id=386789
Patch

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

> Source/WebCore/platform/graphics/MIMETypeCache.cpp:68
> +    MediaPlayerEnums::SupportsType result =
MediaPlayerEnums::SupportsType::IsNotSupported;

Can this be auto?

> Source/WebCore/platform/graphics/MIMETypeCache.cpp:84
> +    do {
> +	   if (!isAvailable() || mimeType.isEmpty())
> +	       break;
> +
> +	   auto contentType = ContentType { mimeType };
> +	   auto containerType = contentType.containerType();
> +	   if (!supportsContainerType(containerType))
> +	       break;
> +
> +	   result = MediaPlayerEnums::SupportsType::MayBeSupported;
> +	   if (contentType.codecs().isEmpty())
> +	       break;
> +
> +	   if (canDecodeExtendedType(contentType))
> +	       result = MediaPlayerEnums::SupportsType::IsSupported;
> +    } while (0);

This confused me!

> Source/WebCore/platform/graphics/MIMETypeCache.cpp:95
> +    m_supportedTypes = HashSet<String, ASCIICaseInsensitiveHash>();

Use { } rather than ()?

> Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerManager.cpp:117
> +static HashMap<MediaPlayerEnums::MediaEngineIdentifier,
std::unique_ptr<RemoteMediaPlayerMIMETypeCache>,
WTF::IntHash<MediaPlayerEnums::MediaEngineIdentifier>,
WTF::StrongEnumHashTraits<MediaPlayerEnums::MediaEngineIdentifier>>&
mimeCaches()
>  {
> -// FIXME: Use parameters.mediaMIMETypes.
> +    static NeverDestroyed<HashMap<MediaPlayerEnums::MediaEngineIdentifier,
std::unique_ptr<RemoteMediaPlayerMIMETypeCache>,
WTF::IntHash<MediaPlayerEnums::MediaEngineIdentifier>,
WTF::StrongEnumHashTraits<MediaPlayerEnums::MediaEngineIdentifier>>> caches;

Could we typedef/using this thing?


More information about the webkit-reviews mailing list