Bug 213902

Summary: [macOS] Adopt AVPlayer.videoRangeOverride
Product: WebKit Reporter: Jer Noble <jer.noble>
Component: New BugsAssignee: Jer Noble <jer.noble>
Status: RESOLVED FIXED    
Severity: Normal CC: calvaris, cdumez, changseok, ddkilzer, eric.carlson, esprehn+autocc, ews-watchlist, glenn, gyuyoung.kim, peng.liu6, philipj, sergio, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch
youennf: review+
Patch for landing none

Description Jer Noble 2020-07-02 15:13:27 PDT
[macOS] Adopt AVPlayer.videoRangeOverride
Comment 1 Jer Noble 2020-07-02 15:16:35 PDT
<rdar://problem/63953509>
Comment 2 Jer Noble 2020-07-02 15:20:04 PDT
Created attachment 403407 [details]
Patch
Comment 3 Jer Noble 2020-07-02 16:13:26 PDT
Created attachment 403415 [details]
Patch
Comment 4 Jer Noble 2020-07-02 17:27:59 PDT
Created attachment 403421 [details]
Patch
Comment 5 Jer Noble 2020-07-02 17:56:17 PDT
Created attachment 403423 [details]
Patch
Comment 6 youenn fablet 2020-07-03 00:21:58 PDT
Comment on attachment 403423 [details]
Patch

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

> Source/WebCore/page/Page.cpp:1160
> +    forEachMediaElement([mode] (HTMLMediaElement& element) {

auto&

> Source/WebCore/page/Page.cpp:1183
> +    forEachMediaElement([mode] (HTMLMediaElement& element) {

auto&

> Source/WebCore/platform/ScreenProperties.h:229
> +        WTFMove(*preferredDynamicRangeMode)

WTFMove not needed

> Source/WebCore/platform/mac/PlatformScreenMac.mm:158
> +        screenProperties.screenDataMap.set(displayID, ScreenData { screenAvailableRect, screenRect, colorSpace, screenDepth, screenDepthPerComponent, screenSupportsExtendedColor, screenHasInvertedColors, screenSupportsHighDynamicRange, screenIsMonochrome, displayMask, gpuID, dynamicRangeMode });

add is probably better since displayID should not be already contained here I guess.

> Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm:979
> +    // If AVPlayer.videoRangeOverride support is present, there's no need to override HDR moed

s/moed/mode
Comment 7 Jer Noble 2020-07-21 16:25:34 PDT
Created attachment 404874 [details]
Patch for landing
Comment 8 EWS 2020-07-22 11:12:16 PDT
Committed r264710: <https://trac.webkit.org/changeset/264710>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 404874 [details].
Comment 9 Jer Noble 2020-07-22 12:27:59 PDT
Landed build fix in r264719: <https://trac.webkit.org/r264719>
Comment 10 Jer Noble 2020-07-22 13:00:04 PDT
Landed another build fix in r264721: <https://trac.webkit.org/r264721>
Comment 11 David Kilzer (:ddkilzer) 2020-07-22 13:39:14 PDT
(In reply to EWS from comment #8)
> Committed r264710: <https://trac.webkit.org/changeset/264710>
> 
> All reviewed patches have been landed. Closing bug and clearing flags on
> attachment 404874 [details].

(In reply to Jer Noble from comment #9)
> Landed build fix in r264719: <https://trac.webkit.org/r264719>

(In reply to Jer Noble from comment #10)
> Landed another build fix in r264721: <https://trac.webkit.org/r264721>

Hopefully last build fix in r264723: <https://trac.webkit.org/r264723>