Remove now-unneeded HAVE(CORE_VIDEO)
authordarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 10 May 2020 21:35:30 +0000 (21:35 +0000)
committerdarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 10 May 2020 21:35:30 +0000 (21:35 +0000)
https://bugs.webkit.org/show_bug.cgi?id=211677

Reviewed by Dan Bernstein.

Source/WebCore:

* page/cocoa/MemoryReleaseCocoa.mm:
* platform/cocoa/CoreVideoSoftLink.cpp: Remove HAVE(CORE_VIDEO).
* platform/cocoa/CoreVideoSoftLink.h: Ditto.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: Ditto.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::updateLastImage): Ditto.
* platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm:
(WebCore::MediaSampleAVFObjC::getRGBAImageData const): Ditto.
* platform/graphics/cv/PixelBufferConformerCV.cpp: Ditto.
* platform/graphics/cv/PixelBufferConformerCV.h: Ditto.
* platform/graphics/cv/TextureCacheCV.h: Ditto.
* platform/graphics/cv/TextureCacheCV.mm: Ditto.
* platform/graphics/cv/VideoTextureCopierCV.cpp: Ditto.
* platform/graphics/cv/VideoTextureCopierCV.h: Ditto.

Source/WTF:

* wtf/PlatformHave.h: Remove HAVE_CORE_VIDEO.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@261460 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 files changed:
Source/WTF/ChangeLog
Source/WTF/wtf/PlatformHave.h
Source/WebCore/ChangeLog
Source/WebCore/platform/cocoa/CoreVideoSoftLink.cpp
Source/WebCore/platform/cocoa/CoreVideoSoftLink.h
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm
Source/WebCore/platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm
Source/WebCore/platform/graphics/cv/PixelBufferConformerCV.cpp
Source/WebCore/platform/graphics/cv/PixelBufferConformerCV.h
Source/WebCore/platform/graphics/cv/TextureCacheCV.h
Source/WebCore/platform/graphics/cv/TextureCacheCV.mm
Source/WebCore/platform/graphics/cv/VideoTextureCopierCV.cpp
Source/WebCore/platform/graphics/cv/VideoTextureCopierCV.h

index a0961fe..3a31637 100644 (file)
@@ -1,3 +1,12 @@
+2020-05-10  Darin Adler  <darin@apple.com>
+
+        Remove now-unneeded HAVE(CORE_VIDEO)
+        https://bugs.webkit.org/show_bug.cgi?id=211677
+
+        Reviewed by Dan Bernstein.
+
+        * wtf/PlatformHave.h: Remove HAVE_CORE_VIDEO.
+
 2020-05-09  Darin Adler  <darin@apple.com>
 
         Delete some dead code in WorkQueueCocoa.cpp
index d9f020e..60e98d0 100644 (file)
 #endif
 
 #if PLATFORM(COCOA)
-#define HAVE_CORE_VIDEO 1
-#endif
-
-#if PLATFORM(COCOA)
 #define HAVE_MEDIA_ACCESSIBILITY_FRAMEWORK 1
 #endif
 
index cfc923e..7e20a81 100644 (file)
@@ -1,3 +1,25 @@
+2020-05-10  Darin Adler  <darin@apple.com>
+
+        Remove now-unneeded HAVE(CORE_VIDEO)
+        https://bugs.webkit.org/show_bug.cgi?id=211677
+
+        Reviewed by Dan Bernstein.
+
+        * page/cocoa/MemoryReleaseCocoa.mm:
+        * platform/cocoa/CoreVideoSoftLink.cpp: Remove HAVE(CORE_VIDEO).
+        * platform/cocoa/CoreVideoSoftLink.h: Ditto.
+        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: Ditto.
+        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
+        (WebCore::MediaPlayerPrivateAVFoundationObjC::updateLastImage): Ditto.
+        * platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm:
+        (WebCore::MediaSampleAVFObjC::getRGBAImageData const): Ditto.
+        * platform/graphics/cv/PixelBufferConformerCV.cpp: Ditto.
+        * platform/graphics/cv/PixelBufferConformerCV.h: Ditto.
+        * platform/graphics/cv/TextureCacheCV.h: Ditto.
+        * platform/graphics/cv/TextureCacheCV.mm: Ditto.
+        * platform/graphics/cv/VideoTextureCopierCV.cpp: Ditto.
+        * platform/graphics/cv/VideoTextureCopierCV.h: Ditto.
+
 2020-05-09  Darin Adler  <darin@apple.com>
 
         Tighten up logic in DocumentTimelinesController::updateAnimationsAndSendEvents
index 4f603bd..8fe0f70 100644 (file)
@@ -25,8 +25,6 @@
 
 #include "config.h"
 
-#if HAVE(CORE_VIDEO)
-
 #include <CoreVideo/CoreVideo.h>
 #include <wtf/SoftLinking.h>
 
@@ -93,4 +91,3 @@ SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, CoreVideo, CVPixelBufferCreate, CVReturn,
 SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, CoreVideo, CVPixelBufferCreateWithBytes, CVReturn, (CFAllocatorRef allocator, size_t width, size_t height, OSType pixelFormatType, void* data, size_t bytesPerRow, void (*releaseCallback)(void*, const void*), void* releasePointer, CFDictionaryRef pixelBufferAttributes, CVPixelBufferRef *pixelBufferOut), (allocator, width, height, pixelFormatType, data, bytesPerRow, releaseCallback, releasePointer, pixelBufferAttributes, pixelBufferOut))
 SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, CoreVideo, CVPixelBufferCreateWithIOSurface, CVReturn, (CFAllocatorRef allocator, IOSurfaceRef surface, CFDictionaryRef pixelBufferAttributes, CVPixelBufferRef * pixelBufferOut), (allocator, surface, pixelBufferAttributes, pixelBufferOut))
 
-#endif // HAVE(CORE_VIDEO)
index cf5f89a..acdd242 100644 (file)
@@ -25,8 +25,6 @@
 
 #pragma once
 
-#if HAVE(CORE_VIDEO)
-
 #include <CoreVideo/CoreVideo.h>
 #include <wtf/SoftLinking.h>
 
@@ -147,5 +145,3 @@ SOFT_LINK_FUNCTION_FOR_HEADER(WebCore, CoreVideo, CVPixelBufferCreateWithBytes,
 #define CVPixelBufferCreateWithBytes softLink_CoreVideo_CVPixelBufferCreateWithBytes
 SOFT_LINK_FUNCTION_FOR_HEADER(WebCore, CoreVideo, CVPixelBufferCreateWithIOSurface, CVReturn, (CFAllocatorRef allocator, IOSurfaceRef surface, CFDictionaryRef pixelBufferAttributes, CVPixelBufferRef * pixelBufferOut), (allocator, surface, pixelBufferAttributes, pixelBufferOut))
 #define CVPixelBufferCreateWithIOSurface softLink_CoreVideo_CVPixelBufferCreateWithIOSurface
-
-#endif // HAVE(CORE_VIDEO)
index 29a77a7..936127d 100644 (file)
@@ -344,10 +344,7 @@ private:
     RetainPtr<CGImageRef> m_lastImage;
     std::unique_ptr<ImageRotationSessionVT> m_imageRotationSession;
     std::unique_ptr<VideoTextureCopierCV> m_videoTextureCopier;
-
-#if HAVE(CORE_VIDEO)
     std::unique_ptr<PixelBufferConformerCV> m_pixelBufferConformer;
-#endif
 
     friend class WebCoreAVFResourceLoader;
     HashMap<RetainPtr<CFTypeRef>, RefPtr<WebCoreAVFResourceLoader>> m_resourceLoaderMap;
index df21ecf..e2bc2fe 100644 (file)
@@ -2195,7 +2195,6 @@ bool MediaPlayerPrivateAVFoundationObjC::videoOutputHasAvailableFrame()
 
 void MediaPlayerPrivateAVFoundationObjC::updateLastImage(UpdateType type)
 {
-#if HAVE(CORE_VIDEO)
     if (!m_avPlayerItem)
         return;
 
@@ -2218,7 +2217,6 @@ void MediaPlayerPrivateAVFoundationObjC::updateLastImage(UpdateType type)
     m_lastImage = m_pixelBufferConformer->createImageFromPixelBuffer(m_lastPixelBuffer.get());
 
     INFO_LOG(LOGIDENTIFIER, "creating buffer took ", (MonotonicTime::now() - start).seconds());
-#endif // HAVE(CORE_VIDEO)
 }
 
 void MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput(GraphicsContext& context, const FloatRect& outputRect)
index a39e3f9..1201fe1 100644 (file)
@@ -289,7 +289,6 @@ Ref<MediaSample> MediaSampleAVFObjC::createNonDisplayingCopy() const
 
 RefPtr<JSC::Uint8ClampedArray> MediaSampleAVFObjC::getRGBAImageData() const
 {
-#if HAVE(CORE_VIDEO)
     const OSType imageFormat = kCVPixelFormatType_32RGBA;
     RetainPtr<CFNumberRef> imageFormatNumber = adoptCF(CFNumberCreate(nullptr,  kCFNumberIntType,  &imageFormat));
 
@@ -310,9 +309,6 @@ RefPtr<JSC::Uint8ClampedArray> MediaSampleAVFObjC::getRGBAImageData() const
     ASSERT(status == noErr);
 
     return result;
-#else
-    return nullptr;
-#endif
 }
 
 void MediaSampleAVFObjC::setAsDisplayImmediately(MediaSample& sample)
index 7fe6b18..bb790dd 100644 (file)
@@ -26,8 +26,6 @@
 #include "config.h"
 #include "PixelBufferConformerCV.h"
 
-#if HAVE(CORE_VIDEO)
-
 #include "GraphicsContextCG.h"
 #include "ImageBufferUtilitiesCG.h"
 #include "Logging.h"
@@ -178,5 +176,3 @@ RetainPtr<CGImageRef> PixelBufferConformerCV::createImageFromPixelBuffer(CVPixel
 }
 
 }
-
-#endif // HAVE(CORE_VIDEO)
index 81b1843..ad410f2 100644 (file)
@@ -25,8 +25,6 @@
 
 #pragma once
 
-#if HAVE(CORE_VIDEO)
-
 #include <wtf/RetainPtr.h>
 
 typedef struct OpaqueVTPixelBufferConformer* VTPixelBufferConformerRef;
@@ -47,5 +45,3 @@ private:
 };
 
 }
-
-#endif // HAVE(CORE_VIDEO)
index c47c694..bc70502 100644 (file)
@@ -25,8 +25,6 @@
 
 #pragma once
 
-#if HAVE(CORE_VIDEO)
-
 #include "GraphicsTypesGL.h"
 #include <wtf/Ref.h>
 #include <wtf/RetainPtr.h>
@@ -67,5 +65,3 @@ private:
 };
 
 }
-
-#endif // HAVE(CORE_VIDEO)
index cf0fb8e..e356d91 100644 (file)
@@ -26,8 +26,6 @@
 #import "config.h"
 #import "TextureCacheCV.h"
 
-#if HAVE(CORE_VIDEO)
-
 #import "GraphicsContextGLOpenGL.h"
 
 #import "CoreVideoSoftLink.h"
@@ -108,5 +106,3 @@ RetainPtr<TextureCacheCV::TextureType> TextureCacheCV::textureFromImage(CVPixelB
 }
 
 }
-
-#endif // HAVE(CORE_VIDEO)
index 84c9afa..487042c 100644 (file)
@@ -26,8 +26,6 @@
 #include "config.h"
 #include "VideoTextureCopierCV.h"
 
-#if HAVE(CORE_VIDEO)
-
 #include "FourCC.h"
 #include "Logging.h"
 #include "TextureCacheCV.h"
@@ -1066,5 +1064,3 @@ bool VideoTextureCopierCV::copyVideoTextureToPlatformTexture(PlatformGLObject vi
 }
 
 }
-
-#endif // HAVE(CORE_VIDEO)
index a2dd3fc..e004d22 100644 (file)
@@ -25,8 +25,6 @@
 
 #pragma once
 
-#if HAVE(CORE_VIDEO)
-
 #import "GraphicsContextGLOpenGL.h"
 #import <wtf/UnsafePointer.h>
 
@@ -107,5 +105,3 @@ private:
 };
 
 }
-
-#endif // HAVE(CORE_VIDEO)