Esempio n. 1
0
void WebPreferences::platformInitializeStore()
{
#if PLATFORM(WAYLAND)
    if (WebCore::PlatformDisplay::sharedDisplay().type() == WebCore::PlatformDisplay::Type::Wayland) {
        // FIXME: Accelerated compositing under Wayland is not yet supported.
        // https://bugs.webkit.org/show_bug.cgi?id=115803
        setAcceleratedCompositingEnabled(false);
    }
#endif
#if !ENABLE(OPENGL)
    setAcceleratedCompositingEnabled(false);
#else
    if (getenv("WEBKIT_FORCE_COMPOSITING_MODE"))
        setForceCompositingMode(true);
    if (getenv("WEBKIT_DISABLE_COMPOSITING_MODE"))
        setAcceleratedCompositingEnabled(false);
#endif
}
Esempio n. 2
0
void WebPreferences::platformInitializeStore()
{
#if PLATFORM(WAYLAND)
    if (WebCore::PlatformDisplay::sharedDisplay().type() == WebCore::PlatformDisplay::Type::Wayland) {
        // FIXME: Accelerated compositing under Wayland is not yet supported.
        // https://bugs.webkit.org/show_bug.cgi?id=115803
        setAcceleratedCompositingEnabled(false);

        setPluginsEnabled(false);
    }
#endif
}
Esempio n. 3
0
void WebPreferences::platformInitializeStore()
{
#if !ENABLE(OPENGL)
    setAcceleratedCompositingEnabled(false);
#else
#if USE(COORDINATED_GRAPHICS_THREADED)
    setForceCompositingMode(true);
#else
    const char* force_compositing = getenv("WEBKIT_FORCE_COMPOSITING_MODE");
    if (force_compositing && strcmp(force_compositing, "0"))
        setForceCompositingMode(true);
#endif

    const char* disable_compositing = getenv("WEBKIT_DISABLE_COMPOSITING_MODE");
    if (disable_compositing && strcmp(disable_compositing, "0")) {
        setAcceleratedCompositingEnabled(false);
        return;
    }

#if USE(REDIRECTED_XCOMPOSITE_WINDOW)
    if (PlatformDisplay::sharedDisplay().type() == PlatformDisplay::Type::X11) {
        auto& display = downcast<PlatformDisplayX11>(PlatformDisplay::sharedDisplay());
        std::optional<int> damageBase;
        if (!display.supportsXComposite() || !display.supportsXDamage(damageBase))
            setAcceleratedCompositingEnabled(false);
    }
#endif

#if PLATFORM(WAYLAND)
    if (PlatformDisplay::sharedDisplay().type() == PlatformDisplay::Type::Wayland) {
        if (!WaylandCompositor::singleton().isRunning())
            setAcceleratedCompositingEnabled(false);
    }
#endif

#endif // ENABLE(OPENGL)
}