Diff
Modified: trunk/Source/WebCore/ChangeLog (240234 => 240235)
--- trunk/Source/WebCore/ChangeLog 2019-01-21 13:32:01 UTC (rev 240234)
+++ trunk/Source/WebCore/ChangeLog 2019-01-21 17:22:36 UTC (rev 240235)
@@ -1,3 +1,19 @@
+2019-01-21 David Kilzer <[email protected]>
+
+ Switch remaining VideoToolbox soft-linking in WebCore over to VideoToolboxSoftLink.{cpp,h}
+ <https://webkit.org/b/193645>
+ <rdar://problem/47421574>
+
+ Reviewed by Alex Christensen.
+
+ * platform/cocoa/VideoToolboxSoftLink.cpp:
+ * platform/cocoa/VideoToolboxSoftLink.h:
+ - Move soft-linking of VTPixelBufferConformer* functions from
+ PixelBufferConformerCV.cpp to here.
+ * platform/graphics/cv/PixelBufferConformerCV.cpp:
+ - Remove local soft-linking of VideoToolbox.framework and switch
+ to VideoToolboxSoftLink.h.
+
2019-01-21 Antti Koivisto <[email protected]>
Move delegatesScrolling() tests to lower level conversion function in ScrollView
Modified: trunk/Source/WebCore/platform/cocoa/VideoToolboxSoftLink.cpp (240234 => 240235)
--- trunk/Source/WebCore/platform/cocoa/VideoToolboxSoftLink.cpp 2019-01-21 13:32:01 UTC (rev 240234)
+++ trunk/Source/WebCore/platform/cocoa/VideoToolboxSoftLink.cpp 2019-01-21 17:22:36 UTC (rev 240235)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2017-2019 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -25,10 +25,13 @@
#include "config.h"
+#if USE(VIDEOTOOLBOX)
+
#include <VideoToolbox/VideoToolbox.h>
#include <wtf/SoftLinking.h>
typedef struct OpaqueVTImageRotationSession* VTImageRotationSessionRef;
+typedef struct OpaqueVTPixelBufferConformer* VTPixelBufferConformerRef;
typedef struct OpaqueVTPixelTransferSession* VTPixelTransferSessionRef;
SOFT_LINK_FRAMEWORK_FOR_SOURCE(WebCore, VideoToolbox)
@@ -68,3 +71,9 @@
SOFT_LINK_CONSTANT_MAY_FAIL_FOR_SOURCE(WebCore, VideoToolbox, kVTHEVCDecoderProfileCapability_IsHardwareAccelerated, CFStringRef)
SOFT_LINK_CONSTANT_MAY_FAIL_FOR_SOURCE(WebCore, VideoToolbox, kVTHEVCDecoderProfileCapability_MaxDecodeLevel, CFStringRef)
SOFT_LINK_CONSTANT_MAY_FAIL_FOR_SOURCE(WebCore, VideoToolbox, kVTHEVCDecoderProfileCapability_MaxPlaybackLevel, CFStringRef)
+
+SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, VideoToolbox, VTPixelBufferConformerCreateWithAttributes, OSStatus, (CFAllocatorRef allocator, CFDictionaryRef attributes, VTPixelBufferConformerRef* conformerOut), (allocator, attributes, conformerOut));
+SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, VideoToolbox, VTPixelBufferConformerIsConformantPixelBuffer, Boolean, (VTPixelBufferConformerRef conformer, CVPixelBufferRef pixBuf), (conformer, pixBuf))
+SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, VideoToolbox, VTPixelBufferConformerCopyConformedPixelBuffer, OSStatus, (VTPixelBufferConformerRef conformer, CVPixelBufferRef sourceBuffer, Boolean ensureModifiable, CVPixelBufferRef* conformedBufferOut), (conformer, sourceBuffer, ensureModifiable, conformedBufferOut))
+
+#endif // USE(VIDEOTOOLBOX)
Modified: trunk/Source/WebCore/platform/cocoa/VideoToolboxSoftLink.h (240234 => 240235)
--- trunk/Source/WebCore/platform/cocoa/VideoToolboxSoftLink.h 2019-01-21 13:32:01 UTC (rev 240234)
+++ trunk/Source/WebCore/platform/cocoa/VideoToolboxSoftLink.h 2019-01-21 17:22:36 UTC (rev 240235)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2017-2019 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -25,10 +25,13 @@
#pragma once
+#if USE(VIDEOTOOLBOX)
+
#include <VideoToolbox/VideoToolbox.h>
#include <wtf/SoftLinking.h>
typedef struct OpaqueVTImageRotationSession* VTImageRotationSessionRef;
+typedef struct OpaqueVTPixelBufferConformer* VTPixelBufferConformerRef;
typedef struct OpaqueVTPixelTransferSession* VTPixelTransferSessionRef;
SOFT_LINK_FRAMEWORK_FOR_HEADER(WebCore, VideoToolbox)
@@ -102,3 +105,12 @@
#define kVTHEVCDecoderProfileCapability_MaxDecodeLevel get_VideoToolbox_kVTHEVCDecoderProfileCapability_MaxDecodeLevel()
SOFT_LINK_CONSTANT_MAY_FAIL_FOR_HEADER(WebCore, VideoToolbox, kVTHEVCDecoderProfileCapability_MaxPlaybackLevel, CFStringRef)
#define kVTHEVCDecoderProfileCapability_MaxPlaybackLevel get_VideoToolbox_kVTHEVCDecoderProfileCapability_MaxPlaybackLevel()
+
+SOFT_LINK_FUNCTION_FOR_HEADER(WebCore, VideoToolbox, VTPixelBufferConformerCreateWithAttributes, OSStatus, (CFAllocatorRef allocator, CFDictionaryRef attributes, VTPixelBufferConformerRef* conformerOut), (allocator, attributes, conformerOut));
+#define VTPixelBufferConformerCreateWithAttributes softLink_VideoToolbox_VTPixelBufferConformerCreateWithAttributes
+SOFT_LINK_FUNCTION_FOR_HEADER(WebCore, VideoToolbox, VTPixelBufferConformerIsConformantPixelBuffer, Boolean, (VTPixelBufferConformerRef conformer, CVPixelBufferRef pixBuf), (conformer, pixBuf))
+#define VTPixelBufferConformerIsConformantPixelBuffer softLink_VideoToolbox_VTPixelBufferConformerIsConformantPixelBuffer
+SOFT_LINK_FUNCTION_FOR_HEADER(WebCore, VideoToolbox, VTPixelBufferConformerCopyConformedPixelBuffer, OSStatus, (VTPixelBufferConformerRef conformer, CVPixelBufferRef sourceBuffer, Boolean ensureModifiable, CVPixelBufferRef* conformedBufferOut), (conformer, sourceBuffer, ensureModifiable, conformedBufferOut))
+#define VTPixelBufferConformerCopyConformedPixelBuffer softLink_VideoToolbox_VTPixelBufferConformerCopyConformedPixelBuffer
+
+#endif // USE(VIDEOTOOLBOX)
Modified: trunk/Source/WebCore/platform/graphics/cv/PixelBufferConformerCV.cpp (240234 => 240235)
--- trunk/Source/WebCore/platform/graphics/cv/PixelBufferConformerCV.cpp 2019-01-21 13:32:01 UTC (rev 240234)
+++ trunk/Source/WebCore/platform/graphics/cv/PixelBufferConformerCV.cpp 2019-01-21 17:22:36 UTC (rev 240235)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2016-2019 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -31,17 +31,10 @@
#include "GraphicsContextCG.h"
#include "ImageBufferUtilitiesCG.h"
#include "Logging.h"
-#include <wtf/SoftLinking.h>
#include "CoreVideoSoftLink.h"
+#include "VideoToolboxSoftLink.h"
-#if USE(VIDEOTOOLBOX)
-SOFT_LINK_FRAMEWORK_OPTIONAL(VideoToolbox)
-SOFT_LINK(VideoToolbox, VTPixelBufferConformerCreateWithAttributes, OSStatus, (CFAllocatorRef allocator, CFDictionaryRef attributes, VTPixelBufferConformerRef* conformerOut), (allocator, attributes, conformerOut));
-SOFT_LINK(VideoToolbox, VTPixelBufferConformerIsConformantPixelBuffer, Boolean, (VTPixelBufferConformerRef conformer, CVPixelBufferRef pixBuf), (conformer, pixBuf))
-SOFT_LINK(VideoToolbox, VTPixelBufferConformerCopyConformedPixelBuffer, OSStatus, (VTPixelBufferConformerRef conformer, CVPixelBufferRef sourceBuffer, Boolean ensureModifiable, CVPixelBufferRef* conformedBufferOut), (conformer, sourceBuffer, ensureModifiable, conformedBufferOut))
-#endif
-
namespace WebCore {
PixelBufferConformerCV::PixelBufferConformerCV(CFDictionaryRef attributes)
Modified: trunk/Tools/ChangeLog (240234 => 240235)
--- trunk/Tools/ChangeLog 2019-01-21 13:32:01 UTC (rev 240234)
+++ trunk/Tools/ChangeLog 2019-01-21 17:22:36 UTC (rev 240235)
@@ -1,3 +1,21 @@
+2019-01-21 David Kilzer <[email protected]>
+
+ Switch remaining VideoToolbox soft-linking in WebCore over to VideoToolboxSoftLink.{cpp,h}
+ <https://webkit.org/b/193645>
+ <rdar://problem/47421574>
+
+ Reviewed by Alex Christensen.
+
+ - Now checks for local soft-linking of all frameworks that have
+ their own *SoftLinking.{cpp,h,mm} files.
+ - Changes softlink/uikit warning to softlink/framework.
+
+ * Scripts/webkitpy/style/checkers/cpp.py:
+ (check_language):
+ (CppChecker):
+ * Scripts/webkitpy/style/checkers/cpp_unittest.py:
+ (CppStyleTest):
+
2019-01-20 Saam Barati <[email protected]>
Rollout r240210: It broke tests on iOS
Modified: trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py (240234 => 240235)
--- trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py 2019-01-21 13:32:01 UTC (rev 240234)
+++ trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py 2019-01-21 17:22:36 UTC (rev 240235)
@@ -2,7 +2,7 @@
#
# Copyright (C) 2009, 2010, 2012 Google Inc. All rights reserved.
# Copyright (C) 2009 Torch Mobile Inc.
-# Copyright (C) 2009, 2013 Apple Inc. All rights reserved.
+# Copyright (C) 2009-2019 Apple Inc. All rights reserved.
# Copyright (C) 2010 Chris Jerdonek ([email protected])
#
# Redistribution and use in source and binary forms, with or without
@@ -3332,9 +3332,13 @@
'RetainPtr<> should never contain a type with \'*\'. Correct: RetainPtr<NSString>, RetainPtr<CFStringRef>.')
break
- if search(r'^\s*SOFT_LINK_FRAMEWORK\(UIKit\)', line):
- error(line_number, 'softlink/uikit', 5,
- 'Use #import <pal/ios/UIKitSoftLink.h> and update pal/ios/UIKitSoftLink.mm to soft-link to UIKit.framework.')
+ frameworks_with_soft_links = ['CoreMedia', 'CoreVideo', 'DataDetectorsCore', 'MediaAccessibility', 'MediaRemote', 'PassKit', 'QuickLook', 'UIKit', 'VideoToolbox']
+ matched = re.compile('^\s*SOFT_LINK_FRAMEWORK.*\(({})\)'.format('|'.join(frameworks_with_soft_links))).search(line)
+ if matched:
+ framework_name = matched.group(1)
+ if not re.compile('^\s*SOFT_LINK_FRAMEWORK_FOR_(HEADER|SOURCE)(_WITH_EXPORT)?\({}\)'.format(framework_name)).search(line):
+ error(line_number, 'softlink/framework', 5,
+ 'Use {framework}SoftLink.{{cpp,h,mm}} to soft-link to {framework}.framework.'.format(framework=framework_name))
# Check for suspicious usage of "if" like
# } if (a == b) {
@@ -4088,7 +4092,7 @@
'security/assertion',
'security/printf',
'security/temp_file',
- 'softlink/uikit',
+ 'softlink/framework',
'whitespace/blank_line',
'whitespace/braces',
'whitespace/brackets',
Modified: trunk/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py (240234 => 240235)
--- trunk/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py 2019-01-21 13:32:01 UTC (rev 240234)
+++ trunk/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py 2019-01-21 17:22:36 UTC (rev 240235)
@@ -2,7 +2,7 @@
#
# Copyright (C) 2011 Google Inc. All rights reserved.
# Copyright (C) 2009 Torch Mobile Inc.
-# Copyright (C) 2009, 2013 Apple Inc. All rights reserved.
+# Copyright (C) 2009-2019 Apple Inc. All rights reserved.
# Copyright (C) 2010 Chris Jerdonek ([email protected])
#
# Redistribution and use in source and binary forms, with or without
@@ -1693,9 +1693,42 @@
'''SOFT_LINK_FRAMEWORK(AVFoundation)''',
'')
self.assert_lint(
+ '''SOFT_LINK_FRAMEWORK_OPTIONAL(AVFoundation)''',
+ '')
+ self.assert_lint(
+ '''SOFT_LINK_FRAMEWORK_OPTIONAL_PREFLIGHT(AVFoundation)''',
+ '')
+ self.assert_lint(
+ '''SOFT_LINK_FRAMEWORK_FOR_HEADER(AVFoundation)''',
+ '')
+ self.assert_lint(
+ '''SOFT_LINK_FRAMEWORK_FOR_SOURCE(AVFoundation)''',
+ '')
+ self.assert_lint(
+ '''SOFT_LINK_FRAMEWORK_FOR_SOURCE_WITH_EXPORT(AVFoundation)''',
+ '')
+
+ self.assert_lint(
'''SOFT_LINK_FRAMEWORK(UIKit)''',
- 'Use #import <pal/ios/UIKitSoftLink.h> and update pal/ios/UIKitSoftLink.mm to soft-link to UIKit.framework.'
- ' [softlink/uikit] [5]')
+ 'Use UIKitSoftLink.{cpp,h,mm} to soft-link to UIKit.framework.'
+ ' [softlink/framework] [5]')
+ self.assert_lint(
+ '''SOFT_LINK_FRAMEWORK_OPTIONAL(UIKit)''',
+ 'Use UIKitSoftLink.{cpp,h,mm} to soft-link to UIKit.framework.'
+ ' [softlink/framework] [5]')
+ self.assert_lint(
+ '''SOFT_LINK_FRAMEWORK_OPTIONAL_PREFLIGHT(UIKit)''',
+ 'Use UIKitSoftLink.{cpp,h,mm} to soft-link to UIKit.framework.'
+ ' [softlink/framework] [5]')
+ self.assert_lint(
+ '''SOFT_LINK_FRAMEWORK_FOR_HEADER(UIKit)''',
+ '')
+ self.assert_lint(
+ '''SOFT_LINK_FRAMEWORK_FOR_SOURCE(UIKit)''',
+ '')
+ self.assert_lint(
+ '''SOFT_LINK_FRAMEWORK_FOR_SOURCE_WITH_EXPORT(UIKit)''',
+ '')
# Variable-length arrays are not permitted.
def test_variable_length_array_detection(self):