Skip to content

Commit 803415e

Browse files
committed
[GTK][WPE] Remove the build option to enable cairo
https://bugs.webkit.org/show_bug.cgi?id=306269 Reviewed by Michael Catanzaro. Skia implementation is now mature enough, so we can remove the option to build with cairo. For big endian systems we now use the flag I_ACKNOWLEDGE_SKIA_DOES_NOT_SUPPORT_BIG_ENDIAN to make it build. Canonical link: https://commits.webkit.org/306343@main
1 parent 6b8dbb2 commit 803415e

File tree

82 files changed

+92
-2442
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+92
-2442
lines changed

‎LayoutTests/platform/glib/TestExpectations‎

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
# The layout test runner evaluates the rules from top to bottom
2424
# and it picks as the valid rule the last one matching.
2525
# * Accessibility
26-
# * Cairo
2726
# * Clipboard API
2827
# * Compositing
2928
# * Cookie
@@ -1095,15 +1094,6 @@ accessibility/contenteditable-spinbutton-uses-arrow-keys.html [ Skip ]
10951094
#////////////////////////////////////////////////////////////////////////////////////////
10961095

10971096

1098-
#////////////////////////////////////////////////////////////////////////////////////////
1099-
# Cairo-related bugs
1100-
#////////////////////////////////////////////////////////////////////////////////////////
1101-
1102-
#////////////////////////////////////////////////////////////////////////////////////////
1103-
# End of Cairo-related bugs
1104-
#////////////////////////////////////////////////////////////////////////////////////////
1105-
1106-
11071097
#////////////////////////////////////////////////////////////////////////////////////////
11081098
# Clipboard API
11091099
#////////////////////////////////////////////////////////////////////////////////////////
@@ -4493,9 +4483,6 @@ imported/w3c/web-platform-tests/css/css-view-transitions/start-skip-start.html [
44934483

44944484
imported/w3c/web-platform-tests/svg/text/reftests/transform-dynamic-change.html [ ImageOnlyFailure ]
44954485

4496-
# This test hits some infinite-loop condition inside Cairo
4497-
fast/css/repeating-conic-gradient-small-range.html [ Skip ]
4498-
44994486
# Kerning for SVG not working as expected.
45004487
webkit.org/b/156148 fast/text/svg-font-face-with-kerning.html [ Failure ]
45014488
webkit.org/b/156148 svg/custom/glyph-selection-lang-attribute.svg [ Failure ]

‎Source/ThirdParty/skia/CMakeLists.txt‎

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1034,8 +1034,6 @@ target_compile_definitions(Skia PUBLIC
10341034

10351035
SK_ENABLE_PRECOMPILE
10361036

1037-
SK_R32_SHIFT=16
1038-
10391037
$<IF:$<BOOL:${SKIA_DEBUG}>,SK_DEBUG,SK_RELEASE>
10401038
)
10411039

@@ -1076,6 +1074,21 @@ else ()
10761074
target_compile_definitions(Skia PRIVATE SK_TYPEFACE_FACTORY_FREETYPE)
10771075
endif ()
10781076

1077+
if (CMAKE_CXX_BYTE_ORDER STREQUAL "BIG_ENDIAN")
1078+
target_compile_definitions(Skia PUBLIC
1079+
I_ACKNOWLEDGE_SKIA_DOES_NOT_SUPPORT_BIG_ENDIAN
1080+
1081+
SK_R32_SHIFT=24
1082+
SK_G32_SHIFT=16
1083+
SK_B32_SHIFT=8
1084+
SK_A32_SHIFT=0
1085+
)
1086+
else ()
1087+
target_compile_definitions(Skia PUBLIC
1088+
SK_R32_SHIFT=16
1089+
)
1090+
endif ()
1091+
10791092
#
10801093
# The SkCMS module includes AVX/SSE optimizations, which may need additional
10811094
# compiler flags.

‎Source/WTF/wtf/PlatformUse.h‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,6 @@
7070
#define USE_GLIB 1
7171
#endif
7272

73-
#if ((PLATFORM(GTK) || PLATFORM(WPE)) && !USE(SKIA))
74-
#define USE_FREETYPE 1
75-
#endif
76-
7773
#if PLATFORM(GTK) || PLATFORM(WPE)
7874
#define USE_HARFBUZZ 1
7975
#define USE_FONT_VARIANT_VIA_FEATURES 1

‎Source/WTF/wtf/glib/GTypedefs.h‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,6 @@ typedef struct _GByteArray GByteArray;
7676
typedef struct _GBytes GBytes;
7777
typedef struct _GClosure GClosure;
7878

79-
#if USE(CAIRO)
80-
typedef struct _cairo_surface cairo_surface_t;
81-
typedef struct _cairo_rectangle_int cairo_rectangle_int_t;
82-
#endif
83-
8479
#if PLATFORM(GTK)
8580
typedef struct _GtkAction GtkAction;
8681
typedef struct _GtkAdjustment GtkAdjustment;

‎Source/WebCore/PlatformGTK.cmake‎

Lines changed: 11 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,10 @@ include(platform/Adwaita.cmake)
22
include(platform/GCrypt.cmake)
33
include(platform/GStreamer.cmake)
44
include(platform/ImageDecoders.cmake)
5+
include(platform/Skia.cmake)
56
include(platform/Soup.cmake)
67
include(platform/TextureMapper.cmake)
78

8-
if (USE_CAIRO)
9-
include(platform/Cairo.cmake)
10-
include(platform/FreeType.cmake)
11-
elseif (USE_SKIA)
12-
include(platform/Skia.cmake)
13-
endif ()
14-
159
list(APPEND WebCore_UNIFIED_SOURCE_LIST_FILES
1610
"SourcesGTK.txt"
1711

@@ -62,8 +56,6 @@ list(APPEND WebCore_PRIVATE_FRAMEWORK_HEADERS
6256

6357
platform/graphics/x11/XErrorTrapper.h
6458

65-
platform/gtk/ScrollbarThemeGtk.h
66-
6759
platform/text/enchant/TextCheckerEnchant.h
6860
)
6961

@@ -82,13 +74,6 @@ list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
8274
${UPOWERGLIB_INCLUDE_DIRS}
8375
)
8476

85-
if (USE_CAIRO)
86-
# GTK is only used by WebCore when building with cairo enabled.
87-
list(APPEND WebCore_LIBRARIES
88-
GTK::GTK
89-
)
90-
endif ()
91-
9277
if (ENABLE_WAYLAND_TARGET)
9378
list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES
9479
${WAYLAND_INCLUDE_DIRS}
@@ -111,25 +96,18 @@ if (ENABLE_BUBBLEWRAP_SANDBOX)
11196
list(APPEND WebCore_LIBRARIES Libseccomp::Libseccomp)
11297
endif ()
11398

114-
if (USE_CAIRO)
115-
list(APPEND WebCore_SOURCES
116-
platform/cairo/DragImageCairo.cpp
117-
)
118-
elseif (USE_SKIA)
119-
# When building with Skia we don't build Cairo sources, but since
120-
# Cairo is still needed in the UI process API we need to include
121-
# here the Cairo sources required.
122-
list(APPEND WebCore_SOURCES
123-
platform/graphics/cairo/IntRectCairo.cpp
124-
platform/graphics/cairo/RefPtrCairo.cpp
99+
# We don't build most Cairo sources, but since Cairo is still needed in the
100+
# UI process API we need to include here the Cairo sources required.
101+
list(APPEND WebCore_SOURCES
102+
platform/graphics/cairo/IntRectCairo.cpp
103+
platform/graphics/cairo/RefPtrCairo.cpp
125104

126-
platform/skia/DragImageSkia.cpp
127-
)
105+
platform/skia/DragImageSkia.cpp
106+
)
128107

129-
list(APPEND WebCore_PRIVATE_FRAMEWORK_HEADERS
130-
platform/graphics/cairo/RefPtrCairo.h
131-
)
132-
endif ()
108+
list(APPEND WebCore_PRIVATE_FRAMEWORK_HEADERS
109+
platform/graphics/cairo/RefPtrCairo.h
110+
)
133111

134112
include_directories(SYSTEM
135113
${WebCore_SYSTEM_INCLUDE_DIRECTORIES}

‎Source/WebCore/PlatformWPE.cmake‎

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,8 @@
11
include(platform/Adwaita.cmake)
2-
3-
if (USE_CAIRO)
4-
include(platform/Cairo.cmake)
5-
include(platform/FreeType.cmake)
6-
elseif (USE_SKIA)
7-
include(platform/Skia.cmake)
8-
endif ()
9-
102
include(platform/GCrypt.cmake)
113
include(platform/GStreamer.cmake)
124
include(platform/ImageDecoders.cmake)
5+
include(platform/Skia.cmake)
136
include(platform/Soup.cmake)
147
include(platform/TextureMapper.cmake)
158

@@ -93,7 +86,7 @@ if (USE_OPENXR)
9386
list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES ${OPENXR_INCLUDE_DIRS})
9487
endif ()
9588

96-
if (USE_SKIA AND ENABLE_DRAG_SUPPORT)
89+
if (ENABLE_DRAG_SUPPORT)
9790
list(APPEND WebCore_SOURCES
9891
platform/skia/DragImageSkia.cpp
9992
)

‎Source/WebCore/SourcesGTK.txt‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,6 @@ platform/gtk/LocalizedStringsGtk.cpp
9595
platform/gtk/PasteboardGtk.cpp
9696
platform/gtk/PlatformKeyboardEventGtk.cpp
9797
platform/gtk/PlatformScreenGtk.cpp
98-
platform/gtk/RenderThemeGadget.cpp
99-
platform/gtk/RenderThemeScrollbar.cpp
100-
platform/gtk/ScrollbarThemeGtk.cpp
10198

10299
platform/text/Hyphenation.cpp
103100
platform/text/LocaleICU.cpp

‎Source/WebCore/html/ImageBitmap.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ static inline RenderingMode bufferRenderingMode(ScriptExecutionContext& scriptEx
9898
static RenderingMode defaultRenderingMode = RenderingMode::Unaccelerated;
9999
#endif
100100

101-
#if PLATFORM(GTK) && USE(SKIA)
101+
#if PLATFORM(GTK)
102102
if (!scriptExecutionContext.settingsValues().acceleratedCompositingEnabled)
103103
return RenderingMode::Unaccelerated;
104104
#else

‎Source/WebCore/platform/DragImage.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ DragImage::~DragImage()
285285
deleteDragImage(m_dragImageRef);
286286
}
287287

288-
#if !PLATFORM(COCOA) && !PLATFORM(GTK) && !PLATFORM(WIN) && !(PLATFORM(WPE) && ENABLE(DRAG_SUPPORT) && USE(SKIA))
288+
#if !PLATFORM(COCOA) && !PLATFORM(GTK) && !PLATFORM(WIN) && !(PLATFORM(WPE) && ENABLE(DRAG_SUPPORT))
289289

290290
IntSize dragImageSize(DragImageRef)
291291
{

‎Source/WebCore/platform/SourcesGStreamer.txt‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ platform/graphics/gstreamer/GStreamerVideoFrameConverter.cpp
6464
platform/graphics/gstreamer/GStreamerVideoSinkCommon.cpp
6565
platform/graphics/gstreamer/GstAllocatorFastMalloc.cpp
6666
platform/graphics/gstreamer/ImageDecoderGStreamer.cpp
67-
platform/graphics/gstreamer/ImageGStreamerCairo.cpp
6867
platform/graphics/gstreamer/ImageGStreamerSkia.cpp
6968
platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp
7069
platform/graphics/gstreamer/MediaEngineConfigurationFactoryGStreamer.cpp

0 commit comments

Comments
 (0)