[Mac] short-circuit MIME type lookup when possible
authoreric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 27 May 2015 18:37:28 +0000 (18:37 +0000)
committereric.carlson@apple.com <eric.carlson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 27 May 2015 18:37:28 +0000 (18:37 +0000)
commitad612cf7ec6b7e1886bbdcd33aaef245caa3e0d5
tree97073e538d4eeb1b06ce1466c046938bdf7846e5
parent158cba8d9394d8bd4df3a2877be0027f3eef687b
[Mac] short-circuit MIME type lookup when possible
https://bugs.webkit.org/show_bug.cgi?id=145362

Reviewed by Dean Jackson.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::unsupportedMIMEType): New, reject types known to not be supported.
(WebCore::staticMimeTypeCache): Accept MIME types known to be supported.
(WebCore::avfMimeTypeCache): Renamed from mimeTypeCache.
(WebCore::MediaPlayerPrivateAVFoundationObjC::getSupportedTypes): mimeTypeCache -> staticMimeTypeCache.
(WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType): Return immediately if
unsupportedMIMEType returns true, don't call AVFoundation if staticMimeTypeCache returns true.
(WebCore::MediaPlayerPrivateAVFoundationObjC::supportsKeySystem): Ditto.
(WebCore::mimeTypeCache): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@184910 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm