[webkit-changes] [WebKit/WebKit] e2e424: [Media] Adopt WTF::flatMap in CDMInstanceFairPlayS...
aestes
noreply at github.com
Wed Sep 20 10:31:31 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: e2e4240e63f8dfe5414b9c371c7c7a13a725c254
https://github.com/WebKit/WebKit/commit/e2e4240e63f8dfe5414b9c371c7c7a13a725c254
Author: Andy Estes <aestes at apple.com>
Date: 2023-09-20 (Wed, 20 Sep 2023)
Changed paths:
M Source/WTF/wtf/Vector.h
M Source/WebCore/platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm
M Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
A Tools/TestWebKitAPI/Tests/WTF/cocoa/VectorCocoa.mm
Log Message:
-----------
[Media] Adopt WTF::flatMap in CDMInstanceFairPlayStreamingAVFObjC
https://bugs.webkit.org/show_bug.cgi?id=261794
rdar://115758431
Reviewed by Richard Robinson.
Replaced the nested for loops in CDMInstanceSessionFairPlayStreamingAVFObjC::contentKeyGroupDataSourceKeys
with a combination of WTF::flatMap and WTF::compactMap. To support RetainPtr<AVContentKey> in compactMap,
also specialized CompactMapTraits for RetainPtr and added tests.
* Source/WTF/wtf/Vector.h:
(WTF::CompactMapTraits<RetainPtr<T>>::hasValue):
(WTF::CompactMapTraits<RetainPtr<T>>::extractValue):
* Source/WebCore/platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm:
(WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::contentKeyGroupDataSourceKeys const):
* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/Tests/WTF/cocoa/VectorCocoa.mm: Added.
(TestWebKitAPI::mapString):
(TestWebKitAPI::TEST):
Canonical link: https://commits.webkit.org/268208@main
More information about the webkit-changes
mailing list