WebKit Bugzilla
Attachment 359671 Details for
Bug 193645
: Switch remaining VideoToolbox soft-linking in WebCore over to VideoToolboxSoftLink.{cpp,h}
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch v1
bug-193645-20190120231719.patch (text/plain), 13.07 KB, created by
David Kilzer (:ddkilzer)
on 2019-01-20 23:17:19 PST
(
hide
)
Description:
Patch v1
Filename:
MIME Type:
Creator:
David Kilzer (:ddkilzer)
Created:
2019-01-20 23:17:19 PST
Size:
13.07 KB
patch
obsolete
>Subversion Revision: 240203 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index e0efae669a2071f2c1fe2d1f0521776e28de1078..368828cccf0bdcd20dd45170bfed0198e89da130 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,19 @@ >+2019-01-20 David Kilzer <ddkilzer@apple.com> >+ >+ Switch remaining VideoToolbox soft-linking in WebCore over to VideoToolboxSoftLink.{cpp,h} >+ <https://webkit.org/b/193645> >+ <rdar://problem/47421574> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * 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-19 Antoine Quint <graouts@apple.com> > > Add a POINTER_EVENTS feature flag >diff --git a/Source/WebCore/platform/cocoa/VideoToolboxSoftLink.cpp b/Source/WebCore/platform/cocoa/VideoToolboxSoftLink.cpp >index b0a22d8c3d46504ff1e65afdb5916d299234eca4..94d583102c998499fa87ee389b0e255577a33719 100644 >--- a/Source/WebCore/platform/cocoa/VideoToolboxSoftLink.cpp >+++ b/Source/WebCore/platform/cocoa/VideoToolboxSoftLink.cpp >@@ -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, kVTHEVCDecoderCapa > 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) >diff --git a/Source/WebCore/platform/cocoa/VideoToolboxSoftLink.h b/Source/WebCore/platform/cocoa/VideoToolboxSoftLink.h >index 9f345dd8a433d0024e16b5b9b485fb607e1c8647..2950095dc2356cb57141c4556fe2fe4fff8b547b 100644 >--- a/Source/WebCore/platform/cocoa/VideoToolboxSoftLink.h >+++ b/Source/WebCore/platform/cocoa/VideoToolboxSoftLink.h >@@ -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 @@ SOFT_LINK_CONSTANT_MAY_FAIL_FOR_HEADER(WebCore, VideoToolbox, kVTHEVCDecoderProf > #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) >diff --git a/Source/WebCore/platform/graphics/cv/PixelBufferConformerCV.cpp b/Source/WebCore/platform/graphics/cv/PixelBufferConformerCV.cpp >index e8450e049c65a78079f3fe21e0a480268edc953a..c6433e5acfc9ff5c8fe630cf2e6b3efc4b409a76 100644 >--- a/Source/WebCore/platform/graphics/cv/PixelBufferConformerCV.cpp >+++ b/Source/WebCore/platform/graphics/cv/PixelBufferConformerCV.cpp >@@ -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,16 +31,9 @@ > #include "GraphicsContextCG.h" > #include "ImageBufferUtilitiesCG.h" > #include "Logging.h" >-#include <wtf/SoftLinking.h> > > #include "CoreVideoSoftLink.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 >+#include "VideoToolboxSoftLink.h" > > namespace WebCore { > >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index ff4152e5df1d7da131b1e153ec6c432b3f912a44..734959fa9e642fdfa3bc4a5e398881f3464ed258 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,21 @@ >+2019-01-20 David Kilzer <ddkilzer@apple.com> >+ >+ Switch remaining VideoToolbox soft-linking in WebCore over to VideoToolboxSoftLink.{cpp,h} >+ <https://webkit.org/b/193645> >+ <rdar://problem/47421574> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ - 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-19 Antoine Quint <graouts@apple.com> > > Add a POINTER_EVENTS feature flag >diff --git a/Tools/Scripts/webkitpy/style/checkers/cpp.py b/Tools/Scripts/webkitpy/style/checkers/cpp.py >index 07630a106753def92e59ca27b01aaecfa87d2bd8..be373cf8a89ee449d97976079a362a42486f12af 100644 >--- a/Tools/Scripts/webkitpy/style/checkers/cpp.py >+++ b/Tools/Scripts/webkitpy/style/checkers/cpp.py >@@ -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 (cjerdonek@webkit.org) > # > # Redistribution and use in source and binary forms, with or without >@@ -3332,9 +3332,13 @@ def check_language(filename, clean_lines, line_number, file_extension, include_s > '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 @@ class CppChecker(object): > 'security/assertion', > 'security/printf', > 'security/temp_file', >- 'softlink/uikit', >+ 'softlink/framework', > 'whitespace/blank_line', > 'whitespace/braces', > 'whitespace/brackets', >diff --git a/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py b/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py >index 224b029f025390af1403f54618dc27c436ba1b8f..78f2f1dc495b3161219869d3803081ef622154f6 100644 >--- a/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py >+++ b/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py >@@ -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 (cjerdonek@webkit.org) > # > # Redistribution and use in source and binary forms, with or without >@@ -1692,10 +1692,43 @@ class CppStyleTest(CppStyleTestBase): > self.assert_lint( > '''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):
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 193645
: 359671