--- Source/WebCore/platform/graphics/egl/PlatformDisplayDefault.cpp.orig +++ Source/WebCore/platform/graphics/egl/PlatformDisplayDefault.cpp @@ -37,8 +37,7 @@ std::unique_ptr PlatformDisplayDefault::create() { auto glDisplay = GLDisplay::create(eglGetDisplay(EGL_DEFAULT_DISPLAY)); if (!glDisplay) { - WTFLogAlways("Could not create default EGL display: %s. Aborting...", GLContext::lastErrorString()); - CRASH(); + return nullptr; } return std::unique_ptr(new PlatformDisplayDefault(WTFMove(glDisplay))); --- Source/WebCore/platform/graphics/egl/PlatformDisplaySurfaceless.cpp.orig +++ Source/WebCore/platform/graphics/egl/PlatformDisplaySurfaceless.cpp @@ -44,8 +44,7 @@ std::unique_ptr PlatformDisplaySurfaceless::create() glDisplay = GLDisplay::create(eglGetPlatformDisplay(EGL_PLATFORM_SURFACELESS_MESA, EGL_DEFAULT_DISPLAY, nullptr)); if (!glDisplay) { - WTFLogAlways("Could not create surfaceless EGL display: %s. Aborting...", GLContext::lastErrorString()); - CRASH(); + return nullptr; } return std::unique_ptr(new PlatformDisplaySurfaceless(WTFMove(glDisplay))); --- Source/WebKit/WebProcess/glib/WebProcessGLib.cpp.orig +++ Source/WebKit/WebProcess/glib/WebProcessGLib.cpp @@ -169,8 +169,7 @@ void WebProcess::initializePlatformDisplayIfNeeded() const } #endif - WTFLogAlways("Could not create EGL display: no supported platform available. Aborting..."); - CRASH(); + return; } void WebProcess::platformInitializeWebProcess(WebProcessCreationParameters& parameters) --- Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp.orig +++ Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp @@ -44,6 +44,7 @@ #include #include #include +#include #include #include #include @@ -204,8 +205,13 @@ void DrawingAreaCoordinatedGraphics::updatePreferences(const WebPreferencesStore& { Settings& settings = m_webPage->corePage()->settings(); #if PLATFORM(GTK) - if (settings.acceleratedCompositingEnabled()) + if (settings.acceleratedCompositingEnabled()) { WebProcess::singleton().initializePlatformDisplayIfNeeded(); + if (!PlatformDisplay::sharedDisplayIfExists()) { + settings.setAcceleratedCompositingEnabled(false); + settings.setForceCompositingMode(false); + } + } #endif settings.setForceCompositingMode(store.getBoolValueForKey(WebPreferencesKey::forceCompositingModeKey())); // Fixed position elements need to be composited and create stacking contexts