Changeset 275041 in webkit
- Timestamp:
- Mar 25, 2021, 10:06:19 AM (5 years ago)
- Location:
- releases/WebKitGTK/webkit-2.32/Source
- Files:
-
- 5 edited
-
WebCore/ChangeLog (modified) (1 diff)
-
WebCore/platform/graphics/x11/PlatformDisplayX11.cpp (modified) (2 diffs)
-
WebCore/platform/graphics/x11/PlatformDisplayX11.h (modified) (2 diffs)
-
WebKit/ChangeLog (modified) (1 diff)
-
WebKit/UIProcess/gtk/AcceleratedBackingStoreX11.cpp (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
releases/WebKitGTK/webkit-2.32/Source/WebCore/ChangeLog
r275029 r275041 1 2021-03-12 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 [GTK] GTK4 crashes with XVFB: GLXBadWindow 4 https://bugs.webkit.org/show_bug.cgi?id=223108 5 6 Reviewed by Žan Doberšek. 7 8 * platform/graphics/x11/PlatformDisplayX11.cpp: 9 (WebCore::PlatformDisplayX11::supportsGLX const): Check if GLX extension is supported and return the base error code. 10 * platform/graphics/x11/PlatformDisplayX11.h: 11 1 12 2021-03-24 Zan Dobersek <zdobersek@igalia.com> 2 13 -
releases/WebKitGTK/webkit-2.32/Source/WebCore/platform/graphics/x11/PlatformDisplayX11.cpp
r271220 r275041 40 40 #include <EGL/egl.h> 41 41 #include <EGL/eglext.h> 42 #endif 43 44 #if USE(GLX) 45 #include <GL/glx.h> 42 46 #endif 43 47 … … 126 130 } 127 131 132 bool PlatformDisplayX11::supportsGLX(Optional<int>& glxErrorBase) const 133 { 134 #if USE(GLX) 135 if (!m_supportsGLX) { 136 m_supportsGLX = false; 137 if (m_display) { 138 int eventBase, errorBase; 139 m_supportsGLX = glXQueryExtension(m_display, &errorBase, &eventBase); 140 if (m_supportsGLX.value()) 141 m_glxErrorBase = errorBase; 142 } 143 } 144 145 glxErrorBase = m_glxErrorBase; 146 return m_supportsGLX.value(); 147 #else 148 return false; 149 #endif 150 } 151 128 152 void* PlatformDisplayX11::visual() const 129 153 { -
releases/WebKitGTK/webkit-2.32/Source/WebCore/platform/graphics/x11/PlatformDisplayX11.h
r267024 r275041 50 50 bool supportsXComposite() const; 51 51 bool supportsXDamage(Optional<int>& damageEventBase, Optional<int>& damageErrorBase) const; 52 bool supportsGLX(Optional<int>& glxErrorBase) const; 52 53 53 54 private: … … 65 66 mutable Optional<int> m_damageEventBase; 66 67 mutable Optional<int> m_damageErrorBase; 68 #if USE(GLX) 69 mutable Optional<bool> m_supportsGLX; 70 mutable Optional<int> m_glxErrorBase; 71 #endif 67 72 mutable void* m_visual { nullptr }; 68 73 }; -
releases/WebKitGTK/webkit-2.32/Source/WebKit/ChangeLog
r275026 r275041 1 2021-03-12 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 [GTK] GTK4 crashes with XVFB: GLXBadWindow 4 https://bugs.webkit.org/show_bug.cgi?id=223108 5 6 Reviewed by Žan Doberšek. 7 8 Handle GLXBadWindow errors in AcceleratedBackingStoreX11. 9 10 * UIProcess/gtk/AcceleratedBackingStoreX11.cpp: 11 (WebKit::AcceleratedBackingStoreX11::checkRequirements): 12 (WebKit::glxErrorCode): 13 (WebKit::AcceleratedBackingStoreX11::~AcceleratedBackingStoreX11): 14 (WebKit::AcceleratedBackingStoreX11::update): 15 1 16 2021-03-24 Pablo Saavedra <psaavedra@igalia.com> 2 17 -
releases/WebKitGTK/webkit-2.32/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreX11.cpp
r267398 r275041 47 47 #include <wtf/NeverDestroyed.h> 48 48 49 #if USE(GLX) 50 #include <X11/Xproto.h> 51 #include <GL/glxproto.h> 52 #endif 53 49 54 namespace WebKit { 50 55 51 56 static Optional<int> s_damageEventBase; 52 57 static Optional<int> s_damageErrorBase; 58 #if USE(GLX) 59 static Optional<int> s_glxErrorBase; 60 #endif 53 61 54 62 class XDamageNotifier { … … 136 144 { 137 145 auto& display = downcast<WebCore::PlatformDisplayX11>(WebCore::PlatformDisplay::sharedDisplay()); 146 #if USE(GLX) 147 // GLX is optional, he we just want the error base. 148 display.supportsGLX(s_glxErrorBase); 149 #endif 138 150 return display.supportsXComposite() && display.supportsXDamage(s_damageEventBase, s_damageErrorBase); 139 151 } … … 156 168 } 157 169 170 #if USE(GLX) 171 static inline unsigned char glxErrorCode(unsigned char errorCode) 172 { 173 ASSERT(s_glxErrorBase); 174 return static_cast<unsigned>(s_glxErrorBase.value()) + errorCode; 175 } 176 #endif 177 158 178 AcceleratedBackingStoreX11::~AcceleratedBackingStoreX11() 159 179 { … … 162 182 163 183 Display* display = downcast<WebCore::PlatformDisplayX11>(WebCore::PlatformDisplay::sharedDisplay()).native(); 164 WebCore::XErrorTrapper trapper(display, WebCore::XErrorTrapper::Policy::Crash, { BadDrawable, xDamageErrorCode(BadDamage) }); 184 Vector<unsigned char> errorList = { BadDrawable, xDamageErrorCode(BadDamage) }; 185 #if USE(GLX) 186 if (s_glxErrorBase) 187 errorList.append(glxErrorCode(GLXBadWindow)); 188 #endif 189 WebCore::XErrorTrapper trapper(display, WebCore::XErrorTrapper::Policy::Crash, WTFMove(errorList)); 165 190 if (m_damage) { 166 191 XDamageNotifier::singleton().remove(m_damage.get()); … … 179 204 180 205 if (m_surface) { 181 WebCore::XErrorTrapper trapper(display, WebCore::XErrorTrapper::Policy::Crash, { BadDrawable, xDamageErrorCode(BadDamage) }); 206 Vector<unsigned char> errorList = { BadDrawable, xDamageErrorCode(BadDamage) }; 207 #if USE(GLX) 208 if (s_glxErrorBase) 209 errorList.append(glxErrorCode(GLXBadWindow)); 210 #endif 211 WebCore::XErrorTrapper trapper(display, WebCore::XErrorTrapper::Policy::Crash, WTFMove(errorList)); 182 212 if (m_damage) { 183 213 XDamageNotifier::singleton().remove(m_damage.get()); … … 199 229 size.scale(deviceScaleFactor); 200 230 201 WebCore::XErrorTrapper trapper(display, WebCore::XErrorTrapper::Policy::Crash, { BadDrawable, xDamageErrorCode(BadDamage) }); 231 Vector<unsigned char> errorList = { BadDrawable, xDamageErrorCode(BadDamage) }; 232 #if USE(GLX) 233 if (s_glxErrorBase) 234 errorList.append(glxErrorCode(GLXBadWindow)); 235 #endif 236 WebCore::XErrorTrapper trapper(display, WebCore::XErrorTrapper::Policy::Crash, WTFMove(errorList)); 202 237 ASSERT(downcast<WebCore::PlatformDisplayX11>(WebCore::PlatformDisplay::sharedDisplay()).native() == gdk_x11_display_get_xdisplay(gdk_display_get_default())); 203 238 #if USE(GTK4)
Note:
See TracChangeset
for help on using the changeset viewer.