[CMake] Consolidate CMake code related to Cairo
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 25 May 2017 02:16:33 +0000 (02:16 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 25 May 2017 02:16:33 +0000 (02:16 +0000)
https://bugs.webkit.org/show_bug.cgi?id=172568

Patch by Don Olmstead <don.olmstead@am.sony.com> on 2017-05-24
Reviewed by Alex Christensen.

.:

* Source/cmake/OptionsGTK.cmake:
* Source/cmake/OptionsWPE.cmake:
* Source/cmake/OptionsWinCairo.cmake:

Source/WebCore:

No new tests. No change in behavior.

* PlatformGTK.cmake:
* PlatformWPE.cmake:
* PlatformWinCairo.cmake:
* config.h:
* platform/Cairo.cmake: Added.
* platform/GStreamer.cmake:
* platform/ImageDecoders.cmake:

Tools:

* DumpRenderTree/config.h:
* TestWebKitAPI/config.h:

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

15 files changed:
ChangeLog
Source/WebCore/ChangeLog
Source/WebCore/PlatformGTK.cmake
Source/WebCore/PlatformWPE.cmake
Source/WebCore/PlatformWinCairo.cmake
Source/WebCore/config.h
Source/WebCore/platform/Cairo.cmake [new file with mode: 0644]
Source/WebCore/platform/GStreamer.cmake
Source/WebCore/platform/ImageDecoders.cmake
Source/cmake/OptionsGTK.cmake
Source/cmake/OptionsWPE.cmake
Source/cmake/OptionsWinCairo.cmake
Tools/ChangeLog
Tools/DumpRenderTree/config.h
Tools/TestWebKitAPI/config.h

index 986bc7c..a1b5830 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2017-05-24  Don Olmstead  <don.olmstead@am.sony.com>
+
+        [CMake] Consolidate CMake code related to Cairo
+        https://bugs.webkit.org/show_bug.cgi?id=172568
+
+        Reviewed by Alex Christensen.
+
+        * Source/cmake/OptionsGTK.cmake:
+        * Source/cmake/OptionsWPE.cmake:
+        * Source/cmake/OptionsWinCairo.cmake:
+
 2017-05-23  Myles C. Maxfield  <mmaxfield@apple.com>
 
         Remove dead ENABLE(FONT_LOAD_EVENTS) code
index c4f6334..8a3f917 100644 (file)
@@ -1,3 +1,20 @@
+2017-05-24  Don Olmstead  <don.olmstead@am.sony.com>
+
+        [CMake] Consolidate CMake code related to Cairo
+        https://bugs.webkit.org/show_bug.cgi?id=172568
+
+        Reviewed by Alex Christensen.
+
+        No new tests. No change in behavior.
+
+        * PlatformGTK.cmake:
+        * PlatformWPE.cmake:
+        * PlatformWinCairo.cmake:
+        * config.h:
+        * platform/Cairo.cmake: Added.
+        * platform/GStreamer.cmake:
+        * platform/ImageDecoders.cmake:
+
 2017-05-24  Said Abou-Hallawa  <sabouhallawa@apple.com>
 
         REGRESSION (r206481): Don't assume frameCount() is larger than or equal to the size of the image frame cache
index 9826cc4..e7daad1 100644 (file)
@@ -1,3 +1,4 @@
+include(platform/Cairo.cmake)
 include(platform/GStreamer.cmake)
 include(platform/ImageDecoders.cmake)
 include(platform/Linux.cmake)
@@ -14,13 +15,11 @@ list(APPEND WebCore_INCLUDE_DIRECTORIES
     "${WEBCORE_DIR}/accessibility/atk"
     "${WEBCORE_DIR}/editing/atk"
     "${WEBCORE_DIR}/page/gtk"
-    "${WEBCORE_DIR}/platform/cairo"
     "${WEBCORE_DIR}/platform/gamepad"
     "${WEBCORE_DIR}/platform/gamepad/deprecated"
     "${WEBCORE_DIR}/platform/gamepad/glib"
     "${WEBCORE_DIR}/platform/geoclue"
     "${WEBCORE_DIR}/platform/gtk"
-    "${WEBCORE_DIR}/platform/graphics/cairo"
     "${WEBCORE_DIR}/platform/graphics/egl"
     "${WEBCORE_DIR}/platform/graphics/glx"
     "${WEBCORE_DIR}/platform/graphics/gtk"
@@ -87,25 +86,8 @@ list(APPEND WebCore_SOURCES
     platform/graphics/GLContext.cpp
     platform/graphics/GraphicsContext3DPrivate.cpp
 
-    platform/graphics/cairo/BackingStoreBackendCairoImpl.cpp
     platform/graphics/cairo/BackingStoreBackendCairoX11.cpp
-    platform/graphics/cairo/CairoUtilities.cpp
-    platform/graphics/cairo/FloatRectCairo.cpp
-    platform/graphics/cairo/FontCairo.cpp
     platform/graphics/cairo/FontCairoHarfbuzzNG.cpp
-    platform/graphics/cairo/GradientCairo.cpp
-    platform/graphics/cairo/GraphicsContext3DCairo.cpp
-    platform/graphics/cairo/GraphicsContextCairo.cpp
-    platform/graphics/cairo/ImageBufferCairo.cpp
-    platform/graphics/cairo/ImageCairo.cpp
-    platform/graphics/cairo/IntRectCairo.cpp
-    platform/graphics/cairo/NativeImageCairo.cpp
-    platform/graphics/cairo/PathCairo.cpp
-    platform/graphics/cairo/PatternCairo.cpp
-    platform/graphics/cairo/PlatformContextCairo.cpp
-    platform/graphics/cairo/PlatformPathCairo.cpp
-    platform/graphics/cairo/RefPtrCairo.cpp
-    platform/graphics/cairo/TransformationMatrixCairo.cpp
 
     platform/graphics/egl/GLContextEGL.cpp
     platform/graphics/egl/GLContextEGLWayland.cpp
@@ -145,8 +127,6 @@ list(APPEND WebCore_SOURCES
     platform/gtk/SelectionData.cpp
     platform/gtk/UserAgentGtk.cpp
 
-    platform/image-decoders/cairo/ImageBackingStoreCairo.cpp
-
     platform/network/soup/AuthenticationChallengeSoup.cpp
     platform/network/soup/CertificateInfo.cpp
     platform/network/soup/CookieJarSoup.cpp
index 93b3ef6..9a8461b 100644 (file)
@@ -29,8 +29,6 @@ list(APPEND WebCore_INCLUDE_DIRECTORIES
     "${JAVASCRIPTCORE_DIR}/yarr"
     "${THIRDPARTY_DIR}/ANGLE/"
     "${THIRDPARTY_DIR}/ANGLE/include/KHR"
-    "${WEBCORE_DIR}/platform/cairo"
-    "${WEBCORE_DIR}/platform/graphics/cairo"
     "${WEBCORE_DIR}/platform/graphics/egl"
     "${WEBCORE_DIR}/platform/graphics/glx"
     "${WEBCORE_DIR}/platform/graphics/freetype"
@@ -83,24 +81,7 @@ list(APPEND WebCore_SOURCES
     platform/graphics/PlatformDisplay.cpp
     platform/graphics/WOFFFileFormat.cpp
 
-    platform/graphics/cairo/BackingStoreBackendCairoImpl.cpp
-    platform/graphics/cairo/CairoUtilities.cpp
-    platform/graphics/cairo/FloatRectCairo.cpp
-    platform/graphics/cairo/FontCairo.cpp
     platform/graphics/cairo/FontCairoHarfbuzzNG.cpp
-    platform/graphics/cairo/GradientCairo.cpp
-    platform/graphics/cairo/GraphicsContext3DCairo.cpp
-    platform/graphics/cairo/GraphicsContextCairo.cpp
-    platform/graphics/cairo/ImageBufferCairo.cpp
-    platform/graphics/cairo/ImageCairo.cpp
-    platform/graphics/cairo/IntRectCairo.cpp
-    platform/graphics/cairo/NativeImageCairo.cpp
-    platform/graphics/cairo/PathCairo.cpp
-    platform/graphics/cairo/PatternCairo.cpp
-    platform/graphics/cairo/PlatformContextCairo.cpp
-    platform/graphics/cairo/PlatformPathCairo.cpp
-    platform/graphics/cairo/RefPtrCairo.cpp
-    platform/graphics/cairo/TransformationMatrixCairo.cpp
 
     platform/graphics/egl/GLContextEGL.cpp
 
@@ -110,8 +91,6 @@ list(APPEND WebCore_SOURCES
     platform/graphics/freetype/GlyphPageTreeNodeFreeType.cpp
     platform/graphics/freetype/SimpleFontDataFreeType.cpp
 
-    platform/graphics/gstreamer/ImageGStreamerCairo.cpp
-
     platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp
     platform/graphics/harfbuzz/HarfBuzzFace.cpp
     platform/graphics/harfbuzz/HarfBuzzFaceCairo.cpp
@@ -127,8 +106,6 @@ list(APPEND WebCore_SOURCES
 
     platform/graphics/wpe/PlatformDisplayWPE.cpp
 
-    platform/image-decoders/cairo/ImageBackingStoreCairo.cpp
-
     platform/network/soup/AuthenticationChallengeSoup.cpp
     platform/network/soup/CertificateInfo.cpp
     platform/network/soup/CookieJarSoup.cpp
index 2e593fe..53605cc 100644 (file)
@@ -1,8 +1,8 @@
+include(platform/Cairo.cmake)
 include(platform/ImageDecoders.cmake)
 include(platform/TextureMapper.cmake)
 
 list(APPEND WebCore_INCLUDE_DIRECTORIES
-    ${CAIRO_INCLUDE_DIRS}
     "${FORWARDING_HEADERS_DIR}/JavaScriptCore"
     "${DirectX_INCLUDE_DIRS}"
     "${WEBKIT_LIBRARIES_DIR}/include"
@@ -10,7 +10,6 @@ list(APPEND WebCore_INCLUDE_DIRECTORIES
     "${WEBKIT_LIBRARIES_DIR}/include/zlib"
     "${WEBCORE_DIR}/loader/archive/cf"
     "${WEBCORE_DIR}/platform/cf"
-    "${WEBCORE_DIR}/platform/graphics/cairo"
     "${WEBCORE_DIR}/platform/network/curl"
 )
 
@@ -20,25 +19,6 @@ list(APPEND WebCore_SOURCES
     platform/graphics/GLContext.cpp
     platform/graphics/PlatformDisplay.cpp
 
-    platform/graphics/cairo/CairoUtilities.cpp
-    platform/graphics/cairo/FloatRectCairo.cpp
-    platform/graphics/cairo/FontCairo.cpp
-    platform/graphics/cairo/GradientCairo.cpp
-    platform/graphics/cairo/GraphicsContext3DCairo.cpp
-    platform/graphics/cairo/GraphicsContextCairo.cpp
-    platform/graphics/cairo/ImageBufferCairo.cpp
-    platform/graphics/cairo/ImageCairo.cpp
-    platform/graphics/cairo/IntRectCairo.cpp
-    platform/graphics/cairo/NativeImageCairo.cpp
-    platform/graphics/cairo/PathCairo.cpp
-    platform/graphics/cairo/PatternCairo.cpp
-    platform/graphics/cairo/PlatformContextCairo.cpp
-    platform/graphics/cairo/PlatformPathCairo.cpp
-    platform/graphics/cairo/RefPtrCairo.cpp
-    platform/graphics/cairo/TransformationMatrixCairo.cpp
-
-    platform/graphics/texmap/TextureMapperTiledBackingStore.cpp
-
     platform/graphics/win/FontCustomPlatformDataCairo.cpp
     platform/graphics/win/FontPlatformDataCairoWin.cpp
     platform/graphics/win/GlyphPageTreeNodeCairoWin.cpp
@@ -47,8 +27,6 @@ list(APPEND WebCore_SOURCES
     platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp
     platform/graphics/win/SimpleFontDataCairoWin.cpp
 
-    platform/image-decoders/cairo/ImageBackingStoreCairo.cpp
-
     platform/network/NetworkStorageSessionStub.cpp
 
     platform/network/curl/CookieJarCurl.cpp
@@ -75,7 +53,6 @@ list(APPEND WebCore_SOURCES
 )
 
 list(APPEND WebCore_LIBRARIES
-    ${CAIRO_LIBRARIES}
     ${DirectX_LIBRARIES}
     CFLite
     SQLite3
index 7d9e460..cf2579a 100644 (file)
@@ -81,7 +81,6 @@
 #if PLATFORM(WIN)
 #if PLATFORM(WIN_CAIRO)
 #undef USE_CG
-#define USE_CAIRO 1
 #define USE_CURL 1
 #ifndef _WINSOCKAPI_
 #define _WINSOCKAPI_ // Prevent inclusion of winsock.h in windows.h
diff --git a/Source/WebCore/platform/Cairo.cmake b/Source/WebCore/platform/Cairo.cmake
new file mode 100644 (file)
index 0000000..7dd1e00
--- /dev/null
@@ -0,0 +1,28 @@
+list(APPEND WebCore_INCLUDE_DIRECTORIES
+    ${CAIRO_INCLUDE_DIRS}
+    "${WEBCORE_DIR}/platform/graphics/cairo"
+)
+
+list(APPEND WebCore_SOURCES
+    platform/graphics/cairo/BackingStoreBackendCairoImpl.cpp
+    platform/graphics/cairo/CairoUtilities.cpp
+    platform/graphics/cairo/FloatRectCairo.cpp
+    platform/graphics/cairo/FontCairo.cpp
+    platform/graphics/cairo/GradientCairo.cpp
+    platform/graphics/cairo/GraphicsContext3DCairo.cpp
+    platform/graphics/cairo/GraphicsContextCairo.cpp
+    platform/graphics/cairo/ImageBufferCairo.cpp
+    platform/graphics/cairo/ImageCairo.cpp
+    platform/graphics/cairo/IntRectCairo.cpp
+    platform/graphics/cairo/NativeImageCairo.cpp
+    platform/graphics/cairo/PathCairo.cpp
+    platform/graphics/cairo/PatternCairo.cpp
+    platform/graphics/cairo/PlatformContextCairo.cpp
+    platform/graphics/cairo/PlatformPathCairo.cpp
+    platform/graphics/cairo/RefPtrCairo.cpp
+    platform/graphics/cairo/TransformationMatrixCairo.cpp
+)
+
+list(APPEND WebCore_LIBRARIES
+    ${CAIRO_LIBRARIES}
+)
index ff764be..ca68a76 100644 (file)
@@ -139,3 +139,9 @@ if (ENABLE_LEGACY_ENCRYPTED_MEDIA OR ENABLE_ENCRYPTED_MEDIA)
         ${LIBGCRYPT_LIBRARIES} -lgpg-error
     )
 endif ()
+
+if (USE_CAIRO)
+    list(APPEND WebCore_SOURCES
+        platform/graphics/gstreamer/ImageGStreamerCairo.cpp
+    )
+endif ()
index 1fc8b9b..c3ee94c 100644 (file)
@@ -52,3 +52,9 @@ if (WEBP_FOUND)
         ${WEBP_LIBRARIES}
     )
 endif ()
+
+if (USE_CAIRO)
+    list(APPEND WebCore_SOURCES
+        platform/image-decoders/cairo/ImageBackingStoreCairo.cpp
+    )
+endif ()
index b9123c2..98c922b 100644 (file)
@@ -54,6 +54,7 @@ find_package(OpenGLES2)
 
 WEBKIT_OPTION_BEGIN()
 
+set(USE_CAIRO ON)
 set(USE_WOFF2 ON)
 set(USE_XDGMIME ON)
 
index f77d42d..b4ed54f 100644 (file)
@@ -79,6 +79,7 @@ find_package(EGL REQUIRED)
 
 find_package(WPEBackend REQUIRED)
 
+set(USE_CAIRO ON)
 set(USE_XDGMIME ON)
 
 if (ENABLE_VIDEO OR ENABLE_WEB_AUDIO)
index 7e7e200..b4b5c11 100644 (file)
@@ -4,6 +4,8 @@ include(OptionsWin)
 
 find_package(Cairo 1.14.4 REQUIRED)
 
+SET_AND_EXPOSE_TO_BUILD(USE_CAIRO ON)
+
 set(USE_CF 1)
 set(USE_CURL 1)
 set(USE_ICU_UNICODE 1)
index a0bd467..cbe3e8d 100644 (file)
@@ -1,3 +1,13 @@
+2017-05-24  Don Olmstead  <don.olmstead@am.sony.com>
+
+        [CMake] Consolidate CMake code related to Cairo
+        https://bugs.webkit.org/show_bug.cgi?id=172568
+
+        Reviewed by Alex Christensen.
+
+        * DumpRenderTree/config.h:
+        * TestWebKitAPI/config.h:
+
 2017-05-24  Wenson Hsieh  <wenson_hsieh@apple.com>
 
         Plumb additional image metadata to item providers when beginning data interaction on an image
index 7450660..9e82548 100644 (file)
@@ -40,7 +40,6 @@
 #if PLATFORM(WIN)
 #define USE_CF 1 
 #if PLATFORM(WIN_CAIRO)
-#define USE_CAIRO 1
 #define USE_CURL 1
 #else
 #define USE_CG 1
index 24ebcb6..f0a490d 100644 (file)
@@ -46,7 +46,6 @@
 
 #if PLATFORM(WIN_CAIRO)
 #undef USE_CG
-#define USE_CAIRO 1
 #define USE_CURL 1
 #ifndef _WINSOCKAPI_
 #define _WINSOCKAPI_ // Prevent inclusion of winsock.h in windows.h