Diff
Modified: branches/safari-610-branch/Source/WebCore/PAL/ChangeLog (267048 => 267049)
--- branches/safari-610-branch/Source/WebCore/PAL/ChangeLog 2020-09-14 22:17:30 UTC (rev 267048)
+++ branches/safari-610-branch/Source/WebCore/PAL/ChangeLog 2020-09-14 22:17:33 UTC (rev 267049)
@@ -1,5 +1,62 @@
2020-09-14 Alan Coon <[email protected]>
+ Cherry-pick r266932. rdar://problem/68881008
+
+ Fix undeclared identifier issue due to clashes in soft link headers
+ https://bugs.webkit.org/show_bug.cgi?id=216412
+
+ Reviewed by Geoffrey Garen.
+
+ Source/WebCore/PAL:
+
+ r266898 broke builds on certain SDKs. The reason for this is that it includes
+ MediaToolbox/FigPhoto.h, which transitively includes CoreMedia/CMTimePrivate.h. The latter
+ header has a bunch of inline code in certain SDKs which conflicts with the
+ CoreMediaSoftLink.h header. For instance, CoreMediaSoftLink.h redefines CMTimeCompare to
+ softLink_CoreMedia_CMTimeCompare, which messes up the inline code in the CMTimePrivate.h
+ header that references CMTimeCompare.
+
+ For now, we just avoid including FigPhoto.h altogether and use a constant. We'll clean this
+ up once we start weak linking rather than soft linking CoreMedia and MediaToolbox (216388).
+
+ * pal/cocoa/MediaToolboxSoftLink.cpp:
+ * pal/cocoa/MediaToolboxSoftLink.h:
+ * pal/spi/cocoa/MediaToolboxSPI.h:
+
+ Source/WebKit:
+
+ Use the workaround constant kPALFigPhotoContainerFormat_JFIF instead of the enum value
+ kFigPhotoContainerFormat_JFIF.
+
+ * WebProcess/cocoa/WebProcessCocoa.mm:
+ (WebKit::WebProcess::platformInitializeWebProcess):
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@266932 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2020-09-11 Ben Nham <[email protected]>
+
+ Fix undeclared identifier issue due to clashes in soft link headers
+ https://bugs.webkit.org/show_bug.cgi?id=216412
+
+ Reviewed by Geoffrey Garen.
+
+ r266898 broke builds on certain SDKs. The reason for this is that it includes
+ MediaToolbox/FigPhoto.h, which transitively includes CoreMedia/CMTimePrivate.h. The latter
+ header has a bunch of inline code in certain SDKs which conflicts with the
+ CoreMediaSoftLink.h header. For instance, CoreMediaSoftLink.h redefines CMTimeCompare to
+ softLink_CoreMedia_CMTimeCompare, which messes up the inline code in the CMTimePrivate.h
+ header that references CMTimeCompare.
+
+ For now, we just avoid including FigPhoto.h altogether and use a constant. We'll clean this
+ up once we start weak linking rather than soft linking CoreMedia and MediaToolbox (216388).
+
+ * pal/cocoa/MediaToolboxSoftLink.cpp:
+ * pal/cocoa/MediaToolboxSoftLink.h:
+ * pal/spi/cocoa/MediaToolboxSPI.h:
+
+2020-09-14 Alan Coon <[email protected]>
+
Cherry-pick r266898. rdar://problem/68881029
Disable hardware JPEG decoding on x86 Mac
Modified: branches/safari-610-branch/Source/WebCore/PAL/pal/cocoa/MediaToolboxSoftLink.cpp (267048 => 267049)
--- branches/safari-610-branch/Source/WebCore/PAL/pal/cocoa/MediaToolboxSoftLink.cpp 2020-09-14 22:17:30 UTC (rev 267048)
+++ branches/safari-610-branch/Source/WebCore/PAL/pal/cocoa/MediaToolboxSoftLink.cpp 2020-09-14 22:17:33 UTC (rev 267049)
@@ -33,7 +33,7 @@
SOFT_LINK_FRAMEWORK_FOR_SOURCE_WITH_EXPORT(PAL, MediaToolbox, PAL_EXPORT)
-SOFT_LINK_FUNCTION_MAY_FAIL_FOR_SOURCE_WITH_EXPORT(PAL, MediaToolbox, FigPhotoDecompressionSetHardwareCutoff, void, (FigPhotoContainerFormat format, size_t numPixelsCutoff), (format, numPixelsCutoff), PAL_EXPORT)
+SOFT_LINK_FUNCTION_MAY_FAIL_FOR_SOURCE_WITH_EXPORT(PAL, MediaToolbox, FigPhotoDecompressionSetHardwareCutoff, void, (int format, size_t numPixelsCutoff), (format, numPixelsCutoff), PAL_EXPORT)
SOFT_LINK_FUNCTION_MAY_FAIL_FOR_SOURCE_WITH_EXPORT(PAL, MediaToolbox, MTShouldPlayHDRVideo, Boolean, (CFArrayRef displayList), (displayList), PAL_EXPORT)
SOFT_LINK_FUNCTION_MAY_FAIL_FOR_SOURCE_WITH_EXPORT(PAL, MediaToolbox, MTOverrideShouldPlayHDRVideo, void, (Boolean override, Boolean playHDRVideo), (override, playHDRVideo), PAL_EXPORT)
Modified: branches/safari-610-branch/Source/WebCore/PAL/pal/cocoa/MediaToolboxSoftLink.h (267048 => 267049)
--- branches/safari-610-branch/Source/WebCore/PAL/pal/cocoa/MediaToolboxSoftLink.h 2020-09-14 22:17:30 UTC (rev 267048)
+++ branches/safari-610-branch/Source/WebCore/PAL/pal/cocoa/MediaToolboxSoftLink.h 2020-09-14 22:17:33 UTC (rev 267049)
@@ -33,7 +33,7 @@
SOFT_LINK_FRAMEWORK_FOR_HEADER(PAL, MediaToolbox)
-SOFT_LINK_FUNCTION_MAY_FAIL_FOR_HEADER(PAL, MediaToolbox, FigPhotoDecompressionSetHardwareCutoff, void, (FigPhotoContainerFormat format, size_t numPixelsCutoff), (format, numPixelsCutoff))
+SOFT_LINK_FUNCTION_MAY_FAIL_FOR_HEADER(PAL, MediaToolbox, FigPhotoDecompressionSetHardwareCutoff, void, (int, size_t numPixelsCutoff), (format, numPixelsCutoff))
SOFT_LINK_FUNCTION_MAY_FAIL_FOR_HEADER(PAL, MediaToolbox, MTShouldPlayHDRVideo, Boolean, (CFArrayRef displayList), (displayList))
SOFT_LINK_FUNCTION_MAY_FAIL_FOR_HEADER(PAL, MediaToolbox, MTOverrideShouldPlayHDRVideo, void, (Boolean override, Boolean playHDRVideo), (override, playHDRVideo))
Modified: branches/safari-610-branch/Source/WebCore/PAL/pal/spi/cocoa/MediaToolboxSPI.h (267048 => 267049)
--- branches/safari-610-branch/Source/WebCore/PAL/pal/spi/cocoa/MediaToolboxSPI.h 2020-09-14 22:17:30 UTC (rev 267048)
+++ branches/safari-610-branch/Source/WebCore/PAL/pal/spi/cocoa/MediaToolboxSPI.h 2020-09-14 22:17:33 UTC (rev 267049)
@@ -27,17 +27,8 @@
#if USE(MEDIATOOLBOX)
-#if USE(APPLE_INTERNAL_SDK)
-#include <MediaToolbox/FigPhoto.h>
-#else
-#include <CoreFoundation/CoreFoundation.h>
+// FIXME (68673547): Use actual <MediaToolbox/FigPhoto.h> and FigPhotoContainerFormat enum when we weak-link instead of soft-link MediaToolbox and CoreMedia.
+#define kPALFigPhotoContainerFormat_HEIF 0
+#define kPALFigPhotoContainerFormat_JFIF 1
-typedef CF_ENUM(int, FigPhotoContainerFormat)
-{
- kFigPhotoContainerFormat_HEIF,
- kFigPhotoContainerFormat_JFIF,
-
-};
#endif
-
-#endif
Modified: branches/safari-610-branch/Source/WebKit/ChangeLog (267048 => 267049)
--- branches/safari-610-branch/Source/WebKit/ChangeLog 2020-09-14 22:17:30 UTC (rev 267048)
+++ branches/safari-610-branch/Source/WebKit/ChangeLog 2020-09-14 22:17:33 UTC (rev 267049)
@@ -1,5 +1,54 @@
2020-09-14 Alan Coon <[email protected]>
+ Cherry-pick r266932. rdar://problem/68881008
+
+ Fix undeclared identifier issue due to clashes in soft link headers
+ https://bugs.webkit.org/show_bug.cgi?id=216412
+
+ Reviewed by Geoffrey Garen.
+
+ Source/WebCore/PAL:
+
+ r266898 broke builds on certain SDKs. The reason for this is that it includes
+ MediaToolbox/FigPhoto.h, which transitively includes CoreMedia/CMTimePrivate.h. The latter
+ header has a bunch of inline code in certain SDKs which conflicts with the
+ CoreMediaSoftLink.h header. For instance, CoreMediaSoftLink.h redefines CMTimeCompare to
+ softLink_CoreMedia_CMTimeCompare, which messes up the inline code in the CMTimePrivate.h
+ header that references CMTimeCompare.
+
+ For now, we just avoid including FigPhoto.h altogether and use a constant. We'll clean this
+ up once we start weak linking rather than soft linking CoreMedia and MediaToolbox (216388).
+
+ * pal/cocoa/MediaToolboxSoftLink.cpp:
+ * pal/cocoa/MediaToolboxSoftLink.h:
+ * pal/spi/cocoa/MediaToolboxSPI.h:
+
+ Source/WebKit:
+
+ Use the workaround constant kPALFigPhotoContainerFormat_JFIF instead of the enum value
+ kFigPhotoContainerFormat_JFIF.
+
+ * WebProcess/cocoa/WebProcessCocoa.mm:
+ (WebKit::WebProcess::platformInitializeWebProcess):
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@266932 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2020-09-11 Ben Nham <[email protected]>
+
+ Fix undeclared identifier issue due to clashes in soft link headers
+ https://bugs.webkit.org/show_bug.cgi?id=216412
+
+ Reviewed by Geoffrey Garen.
+
+ Use the workaround constant kPALFigPhotoContainerFormat_JFIF instead of the enum value
+ kFigPhotoContainerFormat_JFIF.
+
+ * WebProcess/cocoa/WebProcessCocoa.mm:
+ (WebKit::WebProcess::platformInitializeWebProcess):
+
+2020-09-14 Alan Coon <[email protected]>
+
Cherry-pick r266898. rdar://problem/68881029
Disable hardware JPEG decoding on x86 Mac
Modified: branches/safari-610-branch/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm (267048 => 267049)
--- branches/safari-610-branch/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm 2020-09-14 22:17:30 UTC (rev 267048)
+++ branches/safari-610-branch/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm 2020-09-14 22:17:33 UTC (rev 267049)
@@ -327,7 +327,7 @@
#if HAVE(FIG_PHOTO_DECOMPRESSION_SET_HARDWARE_CUTOFF) && !ENABLE(HARDWARE_JPEG)
if (PAL::isMediaToolboxFrameworkAvailable() && PAL::canLoad_MediaToolbox_FigPhotoDecompressionSetHardwareCutoff())
- PAL::softLinkMediaToolboxFigPhotoDecompressionSetHardwareCutoff(kFigPhotoContainerFormat_JFIF, INT_MAX);
+ PAL::softLinkMediaToolboxFigPhotoDecompressionSetHardwareCutoff(kPALFigPhotoContainerFormat_JFIF, INT_MAX);
#endif
updateProcessName();