Title: [264723] trunk/Source/WebCore
Revision
264723
Author
[email protected]
Date
2020-07-22 13:16:00 -0700 (Wed, 22 Jul 2020)

Log Message

Unreviewed build fix after r264710, r264719, r264721: use more HAVE_AVPLAYER_VIDEORANGEOVERRIDE.

* platform/PlatformScreen.h:
* platform/mac/PlatformScreenMac.mm:
(WebCore::collectScreenProperties):
- Guard more code with HAVE(AVPLAYER_VIDEORANGEOVERRIDE).

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (264722 => 264723)


--- trunk/Source/WebCore/ChangeLog	2020-07-22 20:04:21 UTC (rev 264722)
+++ trunk/Source/WebCore/ChangeLog	2020-07-22 20:16:00 UTC (rev 264723)
@@ -1,3 +1,12 @@
+2020-07-22  David Kilzer  <[email protected]>
+
+        Unreviewed build fix after r264710, r264719, r264721: use more HAVE_AVPLAYER_VIDEORANGEOVERRIDE.
+
+        * platform/PlatformScreen.h:
+        * platform/mac/PlatformScreenMac.mm:
+        (WebCore::collectScreenProperties):
+        - Guard more code with HAVE(AVPLAYER_VIDEORANGEOVERRIDE).
+
 2020-07-22  Fujii Hironori  <[email protected]>
 
         [Win][Uniscribe] Material icons containing underscore or numbers aren't shown because ScriptItemize splits them apart

Modified: trunk/Source/WebCore/platform/PlatformScreen.h (264722 => 264723)


--- trunk/Source/WebCore/platform/PlatformScreen.h	2020-07-22 20:04:21 UTC (rev 264722)
+++ trunk/Source/WebCore/platform/PlatformScreen.h	2020-07-22 20:16:00 UTC (rev 264723)
@@ -88,7 +88,7 @@
     HDR10,
     DolbyVisionPQ,
 };
-#if PLATFORM(MAC)
+#if HAVE(AVPLAYER_VIDEORANGEOVERRIDE)
 WEBCORE_EXPORT DynamicRangeMode preferredDynamicRangeMode(Widget* = nullptr);
 #else
 constexpr DynamicRangeMode preferredDynamicRangeMode(Widget* = nullptr) { return DynamicRangeMode::Standard; }

Modified: trunk/Source/WebCore/platform/mac/PlatformScreenMac.mm (264722 => 264723)


--- trunk/Source/WebCore/platform/mac/PlatformScreenMac.mm	2020-07-22 20:04:21 UTC (rev 264722)
+++ trunk/Source/WebCore/platform/mac/PlatformScreenMac.mm	2020-07-22 20:16:00 UTC (rev 264723)
@@ -98,6 +98,7 @@
     return screen(displayID(widget));
 }
 
+#if HAVE(AVPLAYER_VIDEORANGEOVERRIDE)
 static DynamicRangeMode convertAVVideoRangeToEnum(NSString* range)
 {
     if (!range)
@@ -114,6 +115,7 @@
     ASSERT_NOT_REACHED();
     return DynamicRangeMode::None;
 }
+#endif
 
 ScreenProperties collectScreenProperties()
 {
@@ -140,12 +142,17 @@
         float scaleFactor = screen.backingScaleFactor;
         DynamicRangeMode dynamicRangeMode = DynamicRangeMode::None;
 
+#if HAVE(AVPLAYER_VIDEORANGEOVERRIDE)
         if (PAL::isAVFoundationFrameworkAvailable() && [PAL::getAVPlayerClass() respondsToSelector:@selector(preferredVideoRangeForDisplays:)]) {
             dynamicRangeMode = convertAVVideoRangeToEnum([PAL::getAVPlayerClass() preferredVideoRangeForDisplays:@[ @(displayID) ]]);
             screenSupportsHighDynamicRange = dynamicRangeMode > DynamicRangeMode::Standard;
         }
+#endif
+#if HAVE(AVPLAYER_VIDEORANGEOVERRIDE) && USE(MEDIATOOLBOX)
+        else
+#endif
 #if USE(MEDIATOOLBOX)
-        else if (PAL::isMediaToolboxFrameworkAvailable() && PAL::canLoad_MediaToolbox_MTShouldPlayHDRVideo())
+        if (PAL::isMediaToolboxFrameworkAvailable() && PAL::canLoad_MediaToolbox_MTShouldPlayHDRVideo())
             screenSupportsHighDynamicRange = PAL::softLink_MediaToolbox_MTShouldPlayHDRVideo((__bridge CFArrayRef)@[ @(displayID) ]);
 #endif
 
@@ -368,6 +375,7 @@
     return false;
 }
 
+#if HAVE(AVPLAYER_VIDEORANGEOVERRIDE)
 DynamicRangeMode preferredDynamicRangeMode(Widget* widget)
 {
     if (auto data = ""
@@ -381,6 +389,7 @@
 
     return DynamicRangeMode::Standard;
 }
+#endif
 
 FloatRect toUserSpace(const NSRect& rect, NSWindow *destination)
 {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to