summaryrefslogtreecommitdiffstats
path: root/meta/recipes-sato/webkit/webkitgtk/0001-Fix-build-without-opengl-or-es.patch
blob: 09256951f43a1de2aa832677ad2390678238ecc7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
From 646e347c173dbb9782492ac7cb4f54b65533ba90 Mon Sep 17 00:00:00 2001
From: Martin Jansa <Martin.Jansa@gmail.com>
Date: Sun, 17 Oct 2021 20:49:21 +0000
Subject: [PATCH] Fix build without opengl-or-es

* fix build failure when opengl-or-es is disabled:
  In file included from /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/webkitgtk/2.34.0-r0/webkitgtk-2.34.0/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp:30,
                   from /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/webkitgtk/2.34.0-r0/build/DerivedSources/WebKit/unified-sources/UnifiedSource-54928a2b-36.cpp:1:
  /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/webkitgtk/2.34.0-r0/webkitgtk-2.34.0/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.h:41:10: fatal error: WebCore/CoordinatedGraphicsLayer.h: No such file or directory
     41 | #include <WebCore/CoordinatedGraphicsLayer.h>
        |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  compilation terminated.

* the CoordinatedGraphicsLayer.h header installation is controled by
  USE_COORDINATED_GRAPHICS in webkitgtk-2.34.0/Source/WebCore/platform/TextureMapper.cmake
  but in Source/cmake/OptionsGTK.cmake USE_COORDINATED_GRAPHICS was enabled only inside
  if (USE_OPENGL_OR_ES)

Upstream-Status: Submitted [https://bugs.webkit.org/show_bug.cgi?id=232934]
---
 .../DrawingAreaProxyCoordinatedGraphics.cpp                 | 2 +-
 .../DrawingAreaProxyCoordinatedGraphics.h                   | 2 +-
 .../CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp  | 2 +-
 .../CoordinatedGraphics/DrawingAreaCoordinatedGraphics.h    | 2 +-
 .../WebPage/CoordinatedGraphics/LayerTreeHost.cpp           | 4 ++--
 .../WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.h  | 6 +++---
 6 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp b/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp
index 038d9ee2..5e828a10 100644
--- a/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp
+++ b/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp
@@ -152,7 +152,7 @@ void DrawingAreaProxyCoordinatedGraphics::setBackingStoreIsDiscardable(bool isBa
 #endif
 }
 
-#if PLATFORM(GTK)
+#if PLATFORM(GTK) && USE(COORDINATED_GRAPHICS)
 void DrawingAreaProxyCoordinatedGraphics::adjustTransientZoom(double scale, FloatPoint origin)
 {
     send(Messages::DrawingArea::AdjustTransientZoom(scale, origin));
diff --git a/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h b/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h
index b23a45ff..cd263402 100644
--- a/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h
+++ b/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h
@@ -57,7 +57,7 @@ private:
     void waitForBackingStoreUpdateOnNextPaint() override;
     void setBackingStoreIsDiscardable(bool) override;
 
-#if PLATFORM(GTK)
+#if PLATFORM(GTK) && USE(COORDINATED_GRAPHICS)
     void adjustTransientZoom(double scale, WebCore::FloatPoint origin) override;
     void commitTransientZoom(double scale, WebCore::FloatPoint origin) override;
 #endif
diff --git a/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp b/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp
index 33ac2e1d..42375784 100644
--- a/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp
+++ b/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp
@@ -486,7 +486,7 @@ void DrawingAreaCoordinatedGraphics::didUpdate()
     displayTimerFired();
 }
 
-#if PLATFORM(GTK)
+#if PLATFORM(GTK) && USE(COORDINATED_GRAPHICS)
 void DrawingAreaCoordinatedGraphics::adjustTransientZoom(double scale, FloatPoint origin)
 {
     if (!m_transientZoom) {
diff --git a/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.h b/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.h
index d8dc6df7..c8322364 100644
--- a/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.h
+++ b/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.h
@@ -84,7 +84,7 @@ private:
     void updateBackingStoreState(uint64_t backingStoreStateID, bool respondImmediately, float deviceScaleFactor, const WebCore::IntSize&, const WebCore::IntSize& scrollOffset) override;
     void didUpdate() override;
 
-#if PLATFORM(GTK)
+#if PLATFORM(GTK) && USE(COORDINATED_GRAPHICS)
     void adjustTransientZoom(double scale, WebCore::FloatPoint origin) override;
     void commitTransientZoom(double scale, WebCore::FloatPoint origin) override;
 #endif
diff --git a/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp b/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp
index f3304d10..ca0476ff 100644
--- a/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp
+++ b/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp
@@ -156,7 +156,7 @@ void LayerTreeHost::layerFlushTimerFired()
 
     bool didSync = m_coordinator.flushPendingLayerChanges(flags);
 
-#if PLATFORM(GTK)
+#if PLATFORM(GTK) && USE(COORDINATED_GRAPHICS)
     // If we have an active transient zoom, we want the zoom to win over any changes
     // that WebCore makes to the relevant layers, so re-apply our changes after flushing.
     if (m_transientZoom)
@@ -453,7 +453,7 @@ void LayerTreeHost::renderNextFrame(bool forceRepaint)
     }
 }
 
-#if PLATFORM(GTK)
+#if PLATFORM(GTK) && USE(COORDINATED_GRAPHICS)
 FloatPoint LayerTreeHost::constrainTransientZoomOrigin(double scale, FloatPoint origin) const
 {
     FrameView& frameView = *m_webPage.mainFrameView();
diff --git a/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.h b/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.h
index 4f727e41..b070266e 100644
--- a/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.h
+++ b/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.h
@@ -37,7 +37,7 @@
 #include <wtf/Forward.h>
 #include <wtf/OptionSet.h>
 #include <wtf/RunLoop.h>
-#if PLATFORM(GTK)
+#if PLATFORM(GTK) && USE(COORDINATED_GRAPHICS)
 #include <WebCore/CoordinatedGraphicsLayer.h>
 #endif
 
@@ -100,7 +100,7 @@ public:
 
     WebCore::PlatformDisplayID displayID() const { return m_displayID; }
 
-#if PLATFORM(GTK)
+#if PLATFORM(GTK) && USE(COORDINATED_GRAPHICS)
     void adjustTransientZoom(double, WebCore::FloatPoint);
     void commitTransientZoom(double, WebCore::FloatPoint);
 #endif
@@ -213,7 +213,7 @@ private:
 #endif // USE(COORDINATED_GRAPHICS)
     WebCore::PlatformDisplayID m_displayID;
 
-#if PLATFORM(GTK)
+#if PLATFORM(GTK) && USE(COORDINATED_GRAPHICS)
     bool m_transientZoom { false };
     double m_transientZoomScale { 1 };
     WebCore::FloatPoint m_transientZoomOrigin;