Diff
Modified: trunk/ChangeLog (246307 => 246308)
--- trunk/ChangeLog 2019-06-11 09:11:24 UTC (rev 246307)
+++ trunk/ChangeLog 2019-06-11 11:17:31 UTC (rev 246308)
@@ -1,3 +1,12 @@
+2019-06-11 Carlos Garcia Campos <[email protected]>
+
+ [GTK] Remove option REDIRECTED_XCOMPOSITE_WINDOW
+ https://bugs.webkit.org/show_bug.cgi?id=198748
+
+ Reviewed by Žan Doberšek.
+
+ * Source/cmake/OptionsGTK.cmake: Remove USE_REDIRECTED_XCOMPOSITE_WINDOW build option.
+
2019-06-10 Sam Weinig <[email protected]>
Remove Dashboard support
Modified: trunk/Source/WebKit/ChangeLog (246307 => 246308)
--- trunk/Source/WebKit/ChangeLog 2019-06-11 09:11:24 UTC (rev 246307)
+++ trunk/Source/WebKit/ChangeLog 2019-06-11 11:17:31 UTC (rev 246308)
@@ -1,3 +1,67 @@
+2019-06-11 Carlos Garcia Campos <[email protected]>
+
+ [GTK] Remove option REDIRECTED_XCOMPOSITE_WINDOW
+ https://bugs.webkit.org/show_bug.cgi?id=198748
+
+ Reviewed by Žan Doberšek.
+
+ It's unused and untested, we kept that code path only because the redirected window caused performance issues in
+ some drivers in embedded devices. Nowadays there are much better solutions for those cases like using WPE port
+ or GTK port under wayland instead of X11.
+
+ * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
+ (WebKit::ThreadedCompositor::create): Remove the ShouldDoFrameSync parameter since it always receives Yes.
+ (WebKit::ThreadedCompositor::ThreadedCompositor): Ditto.
+ (WebKit::ThreadedCompositor::createGLContext): Remove the code to handle the case of ShouldDoFrameSync being No,
+ since it's always Yes.
+ (WebKit::ThreadedCompositor::setNativeSurfaceHandleForCompositing): Deleted.
+ * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:
+ * UIProcess/API/gtk/WebKitWebViewBase.cpp:
+ (webkitWebViewBaseRealize): Remove the code for !USE(REDIRECTED_XCOMPOSITE_WINDOW).
+ (webkitWebViewBaseUnrealize): Ditto.
+ (webkitWebViewBaseDraw): acceleratedBackingStore member can't be nullptr now.
+ (webkitWebViewBaseEnterAcceleratedCompositingMode): Ditto.
+ (webkitWebViewBaseUpdateAcceleratedCompositingMode): Ditto.
+ (webkitWebViewBaseExitAcceleratedCompositingMode): Ditto.
+ (webkitWebViewBaseMakeGLContextCurrent): Ditto.
+ (webkitWebViewBaseDidRelaunchWebProcess): Remove the code for !USE(REDIRECTED_XCOMPOSITE_WINDOW).
+ (webkitWebViewBasePageClosed): Ditto.
+ (webkitWebViewBaseRenderHostFileDescriptor): acceleratedBackingStore member can't be nullptr now.
+ * UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp:
+ (WebKit::DrawingAreaProxyCoordinatedGraphics::didUpdateBackingStoreState): Remove the code for !USE(REDIRECTED_XCOMPOSITE_WINDOW).
+ (WebKit::DrawingAreaProxyCoordinatedGraphics::setNativeSurfaceHandleForCompositing): Deleted.
+ (WebKit::DrawingAreaProxyCoordinatedGraphics::destroyNativeSurfaceHandleForCompositing): Deleted.
+ * UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h:
+ * UIProcess/gtk/AcceleratedBackingStore.cpp:
+ (WebKit::AcceleratedBackingStore::create): Add an assert to ensure we create an AcceleratedBackingStore.
+ * UIProcess/gtk/AcceleratedBackingStoreX11.cpp:
+ * UIProcess/gtk/AcceleratedBackingStoreX11.h:
+ * UIProcess/gtk/HardwareAccelerationManager.cpp:
+ (WebKit::HardwareAccelerationManager::HardwareAccelerationManager): Remove the code for !USE(REDIRECTED_XCOMPOSITE_WINDOW).
+ * WebProcess/WebPage/AcceleratedSurface.cpp:
+ (WebKit::AcceleratedSurface::create): Add an assert to ensure we create an AcceleratedSurface.
+ * WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp:
+ (WebKit::DrawingAreaCoordinatedGraphics::enterAcceleratedCompositingMode): Remove the code for !USE(REDIRECTED_XCOMPOSITE_WINDOW).
+ (WebKit::DrawingAreaCoordinatedGraphics::setNativeSurfaceHandleForCompositing): Deleted.
+ (WebKit::DrawingAreaCoordinatedGraphics::destroyNativeSurfaceHandleForCompositing): Deleted.
+ * WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.h:
+ * WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp:
+ (WebKit::LayerTreeHost::LayerTreeHost): m_surface can't be nullptr now.
+ (WebKit::LayerTreeHost::sizeDidChange): Ditto.
+ (WebKit::LayerTreeHost::deviceOrPageScaleFactorChanged): Ditto.
+ (WebKit::LayerTreeHost::nativeSurfaceHandleForCompositing): Ditto.
+ (WebKit::LayerTreeHost::didDestroyGLContext): Ditto.
+ (WebKit::LayerTreeHost::willRenderFrame): Ditto.
+ (WebKit::LayerTreeHost::didRenderFrame): Ditto.
+ (WebKit::LayerTreeHost::setNativeSurfaceHandleForCompositing): Deleted.
+ * WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.h:
+ * WebProcess/WebPage/DrawingArea.h:
+ * WebProcess/WebPage/DrawingArea.messages.in:
+ * WebProcess/WebPage/WebPage.h:
+ (WebKit::WebPage::nativeWindowHandle): Deleted.
+ * WebProcess/WebPage/gtk/AcceleratedSurfaceX11.cpp:
+ * WebProcess/WebPage/gtk/AcceleratedSurfaceX11.h:
+
2019-06-11 Michael Catanzaro <[email protected]>
[WPE][GTK] bubblewrap sandbox should grant access to web extensions directory
Modified: trunk/Source/WebKit/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp (246307 => 246308)
--- trunk/Source/WebKit/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp 2019-06-11 09:11:24 UTC (rev 246307)
+++ trunk/Source/WebKit/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp 2019-06-11 11:17:31 UTC (rev 246308)
@@ -45,14 +45,13 @@
namespace WebKit {
using namespace WebCore;
-Ref<ThreadedCompositor> ThreadedCompositor::create(Client& client, ThreadedDisplayRefreshMonitor::Client& displayRefreshMonitorClient, PlatformDisplayID displayID, const IntSize& viewportSize, float scaleFactor, ShouldDoFrameSync doFrameSync, TextureMapper::PaintFlags paintFlags)
+Ref<ThreadedCompositor> ThreadedCompositor::create(Client& client, ThreadedDisplayRefreshMonitor::Client& displayRefreshMonitorClient, PlatformDisplayID displayID, const IntSize& viewportSize, float scaleFactor, TextureMapper::PaintFlags paintFlags)
{
- return adoptRef(*new ThreadedCompositor(client, displayRefreshMonitorClient, displayID, viewportSize, scaleFactor, doFrameSync, paintFlags));
+ return adoptRef(*new ThreadedCompositor(client, displayRefreshMonitorClient, displayID, viewportSize, scaleFactor, paintFlags));
}
-ThreadedCompositor::ThreadedCompositor(Client& client, ThreadedDisplayRefreshMonitor::Client& displayRefreshMonitorClient, PlatformDisplayID displayID, const IntSize& viewportSize, float scaleFactor, ShouldDoFrameSync doFrameSync, TextureMapper::PaintFlags paintFlags)
+ThreadedCompositor::ThreadedCompositor(Client& client, ThreadedDisplayRefreshMonitor::Client& displayRefreshMonitorClient, PlatformDisplayID displayID, const IntSize& viewportSize, float scaleFactor, TextureMapper::PaintFlags paintFlags)
: m_client(client)
- , m_doFrameSync(doFrameSync)
, m_paintFlags(paintFlags)
, m_compositingRunLoop(std::make_unique<CompositingRunLoop>([this] { renderLayerTree(); }))
#if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR)
@@ -88,14 +87,8 @@
ASSERT(m_nativeSurfaceHandle);
m_context = GLContext::createContextForWindow(reinterpret_cast<GLNativeWindowType>(m_nativeSurfaceHandle), &PlatformDisplay::sharedDisplayForCompositing());
- if (!m_context)
- return;
-
- if (!m_context->makeContextCurrent())
- return;
-
- if (m_doFrameSync == ShouldDoFrameSync::No)
- m_context->swapInterval(0);
+ if (m_context)
+ m_context->makeContextCurrent();
}
void ThreadedCompositor::invalidate()
@@ -139,22 +132,6 @@
m_compositingRunLoop->resume();
}
-void ThreadedCompositor::setNativeSurfaceHandleForCompositing(uint64_t handle)
-{
- m_compositingRunLoop->stopUpdates();
- m_compositingRunLoop->performTaskSync([this, protectedThis = makeRef(*this), handle] {
- // A new native handle can't be set without destroying the previous one first if any.
- ASSERT(!!handle ^ !!m_nativeSurfaceHandle);
- m_nativeSurfaceHandle = handle;
-
- m_scene->setActive(!!m_nativeSurfaceHandle);
- if (m_nativeSurfaceHandle)
- createGLContext();
- else
- m_context = nullptr;
- });
-}
-
void ThreadedCompositor::setScaleFactor(float scale)
{
LockHolder locker(m_attributes.lock);
Modified: trunk/Source/WebKit/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h (246307 => 246308)
--- trunk/Source/WebKit/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h 2019-06-11 09:11:24 UTC (rev 246307)
+++ trunk/Source/WebKit/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h 2019-06-11 11:17:31 UTC (rev 246308)
@@ -61,12 +61,9 @@
virtual void didRenderFrame() = 0;
};
- enum class ShouldDoFrameSync { No, Yes };
-
- static Ref<ThreadedCompositor> create(Client&, ThreadedDisplayRefreshMonitor::Client&, WebCore::PlatformDisplayID, const WebCore::IntSize&, float scaleFactor, ShouldDoFrameSync = ShouldDoFrameSync::Yes, WebCore::TextureMapper::PaintFlags = 0);
+ static Ref<ThreadedCompositor> create(Client&, ThreadedDisplayRefreshMonitor::Client&, WebCore::PlatformDisplayID, const WebCore::IntSize&, float scaleFactor, WebCore::TextureMapper::PaintFlags);
virtual ~ThreadedCompositor();
- void setNativeSurfaceHandleForCompositing(uint64_t);
void setScaleFactor(float);
void setScrollPosition(const WebCore::IntPoint&, float scale);
void setViewportSize(const WebCore::IntSize&, float scale);
@@ -87,7 +84,7 @@
void resume();
private:
- ThreadedCompositor(Client&, ThreadedDisplayRefreshMonitor::Client&, WebCore::PlatformDisplayID, const WebCore::IntSize&, float scaleFactor, ShouldDoFrameSync, WebCore::TextureMapper::PaintFlags);
+ ThreadedCompositor(Client&, ThreadedDisplayRefreshMonitor::Client&, WebCore::PlatformDisplayID, const WebCore::IntSize&, float scaleFactor, WebCore::TextureMapper::PaintFlags);
// CoordinatedGraphicsSceneClient
void updateViewport() override;
@@ -102,7 +99,6 @@
std::unique_ptr<WebCore::GLContext> m_context;
uint64_t m_nativeSurfaceHandle;
- ShouldDoFrameSync m_doFrameSync;
WebCore::TextureMapper::PaintFlags m_paintFlags { 0 };
bool m_inForceRepaint { false };
unsigned m_suspendedCount { 0 };
Modified: trunk/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp (246307 => 246308)
--- trunk/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp 2019-06-11 09:11:24 UTC (rev 246307)
+++ trunk/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp 2019-06-11 11:17:31 UTC (rev 246308)
@@ -425,13 +425,6 @@
gtk_widget_set_window(widget, window);
gdk_window_set_user_data(window, widget);
-#if USE(TEXTURE_MAPPER_GL) && PLATFORM(X11) && !USE(REDIRECTED_XCOMPOSITE_WINDOW)
- if (PlatformDisplay::sharedDisplay().type() == PlatformDisplay::Type::X11) {
- if (auto* drawingArea = static_cast<DrawingAreaProxyCoordinatedGraphics*>(priv->pageProxy->drawingArea()))
- drawingArea->setNativeSurfaceHandleForCompositing(GDK_WINDOW_XID(window));
- }
-#endif
-
gtk_im_context_set_client_window(priv->inputMethodFilter.context(), window);
}
@@ -438,12 +431,6 @@
static void webkitWebViewBaseUnrealize(GtkWidget* widget)
{
WebKitWebViewBase* webView = WEBKIT_WEB_VIEW_BASE(widget);
-#if USE(TEXTURE_MAPPER_GL) && PLATFORM(X11) && !USE(REDIRECTED_XCOMPOSITE_WINDOW)
- if (PlatformDisplay::sharedDisplay().type() == PlatformDisplay::Type::X11) {
- if (auto* drawingArea = static_cast<DrawingAreaProxyCoordinatedGraphics*>(webView->priv->pageProxy->drawingArea()))
- drawingArea->destroyNativeSurfaceHandleForCompositing();
- }
-#endif
gtk_im_context_set_client_window(webView->priv->inputMethodFilter.context(), nullptr);
GTK_WIDGET_CLASS(webkit_web_view_base_parent_class)->unrealize(widget);
@@ -602,7 +589,7 @@
if (showingNavigationSnapshot)
cairo_push_group(cr);
- if (webViewBase->priv->acceleratedBackingStore && drawingArea->isInAcceleratedCompositingMode())
+ if (drawingArea->isInAcceleratedCompositingMode())
webViewBase->priv->acceleratedBackingStore->paint(cr, clipRect);
else {
WebCore::Region unpaintedRegion; // This is simply unused.
@@ -1658,27 +1645,22 @@
void webkitWebViewBaseEnterAcceleratedCompositingMode(WebKitWebViewBase* webkitWebViewBase, const LayerTreeContext& layerTreeContext)
{
- if (webkitWebViewBase->priv->acceleratedBackingStore)
- webkitWebViewBase->priv->acceleratedBackingStore->update(layerTreeContext);
+ webkitWebViewBase->priv->acceleratedBackingStore->update(layerTreeContext);
}
void webkitWebViewBaseUpdateAcceleratedCompositingMode(WebKitWebViewBase* webkitWebViewBase, const LayerTreeContext& layerTreeContext)
{
- if (webkitWebViewBase->priv->acceleratedBackingStore)
- webkitWebViewBase->priv->acceleratedBackingStore->update(layerTreeContext);
+ webkitWebViewBase->priv->acceleratedBackingStore->update(layerTreeContext);
}
void webkitWebViewBaseExitAcceleratedCompositingMode(WebKitWebViewBase* webkitWebViewBase)
{
- if (webkitWebViewBase->priv->acceleratedBackingStore)
- webkitWebViewBase->priv->acceleratedBackingStore->update(LayerTreeContext());
+ webkitWebViewBase->priv->acceleratedBackingStore->update(LayerTreeContext());
}
bool webkitWebViewBaseMakeGLContextCurrent(WebKitWebViewBase* webkitWebViewBase)
{
- if (webkitWebViewBase->priv->acceleratedBackingStore)
- return webkitWebViewBase->priv->acceleratedBackingStore->makeContextCurrent();
- return false;
+ return webkitWebViewBase->priv->acceleratedBackingStore->makeContextCurrent();
}
void webkitWebViewBaseDidRelaunchWebProcess(WebKitWebViewBase* webkitWebViewBase)
@@ -1687,23 +1669,6 @@
gtk_widget_queue_resize_no_redraw(GTK_WIDGET(webkitWebViewBase));
WebKitWebViewBasePrivate* priv = webkitWebViewBase->priv;
-
-#if PLATFORM(X11) && USE(TEXTURE_MAPPER_GL) && !USE(REDIRECTED_XCOMPOSITE_WINDOW)
- if (PlatformDisplay::sharedDisplay().type() != PlatformDisplay::Type::X11)
- return;
-
- auto* drawingArea = static_cast<DrawingAreaProxyCoordinatedGraphics*>(priv->pageProxy->drawingArea());
- ASSERT(drawingArea);
-
- if (!gtk_widget_get_realized(GTK_WIDGET(webkitWebViewBase)))
- return;
-
- uint64_t windowID = GDK_WINDOW_XID(gtk_widget_get_window(GTK_WIDGET(webkitWebViewBase)));
- drawingArea->setNativeSurfaceHandleForCompositing(windowID);
-#else
- UNUSED_PARAM(webkitWebViewBase);
-#endif
-
priv->viewGestureController = std::make_unique<WebKit::ViewGestureController>(*priv->pageProxy);
priv->viewGestureController->setSwipeGestureEnabled(priv->isBackForwardNavigationGestureEnabled);
}
@@ -1710,20 +1675,7 @@
void webkitWebViewBasePageClosed(WebKitWebViewBase* webkitWebViewBase)
{
- if (webkitWebViewBase->priv->acceleratedBackingStore)
- webkitWebViewBase->priv->acceleratedBackingStore->update(LayerTreeContext());
-#if PLATFORM(X11) && USE(TEXTURE_MAPPER_GL) && !USE(REDIRECTED_XCOMPOSITE_WINDOW)
- if (PlatformDisplay::sharedDisplay().type() != PlatformDisplay::Type::X11)
- return;
-
- if (!gtk_widget_get_realized(GTK_WIDGET(webkitWebViewBase)))
- return;
-
- WebKitWebViewBasePrivate* priv = webkitWebViewBase->priv;
- auto* drawingArea = static_cast<DrawingAreaProxyCoordinatedGraphics*>(priv->pageProxy->drawingArea());
- ASSERT(drawingArea);
- drawingArea->destroyNativeSurfaceHandleForCompositing();
-#endif
+ webkitWebViewBase->priv->acceleratedBackingStore->update(LayerTreeContext());
}
RefPtr<WebKit::ViewSnapshot> webkitWebViewBaseTakeViewSnapshot(WebKitWebViewBase* webkitWebViewBase)
@@ -1832,8 +1784,6 @@
#if USE(WPE_RENDERER)
int webkitWebViewBaseRenderHostFileDescriptor(WebKitWebViewBase* webkitWebViewBase)
{
- if (webkitWebViewBase->priv->acceleratedBackingStore)
- return webkitWebViewBase->priv->acceleratedBackingStore->renderHostFileDescriptor();
- return -1;
+ return webkitWebViewBase->priv->acceleratedBackingStore->renderHostFileDescriptor();
}
#endif
Modified: trunk/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp (246307 => 246308)
--- trunk/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp 2019-06-11 09:11:24 UTC (rev 246307)
+++ trunk/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp 2019-06-11 11:17:31 UTC (rev 246308)
@@ -181,17 +181,9 @@
if (m_nextBackingStoreStateID != m_currentBackingStoreStateID)
sendUpdateBackingStoreState(RespondImmediately);
- else {
+ else
m_hasReceivedFirstUpdate = true;
-#if USE(TEXTURE_MAPPER_GL) && PLATFORM(GTK) && PLATFORM(X11) && !USE(REDIRECTED_XCOMPOSITE_WINDOW)
- if (m_pendingNativeSurfaceHandleForCompositing) {
- setNativeSurfaceHandleForCompositing(m_pendingNativeSurfaceHandleForCompositing);
- m_pendingNativeSurfaceHandleForCompositing = 0;
- }
-#endif
- }
-
#if !PLATFORM(WPE)
if (isInAcceleratedCompositingMode()) {
ASSERT(!m_backingStore);
@@ -374,27 +366,6 @@
}
#endif
-#if USE(TEXTURE_MAPPER_GL) && PLATFORM(GTK) && PLATFORM(X11) && !USE(REDIRECTED_XCOMPOSITE_WINDOW)
-void DrawingAreaProxyCoordinatedGraphics::setNativeSurfaceHandleForCompositing(uint64_t handle)
-{
- if (!m_hasReceivedFirstUpdate) {
- m_pendingNativeSurfaceHandleForCompositing = handle;
- return;
- }
- send(Messages::DrawingArea::SetNativeSurfaceHandleForCompositing(handle), IPC::SendOption::DispatchMessageEvenWhenWaitingForSyncReply);
-}
-
-void DrawingAreaProxyCoordinatedGraphics::destroyNativeSurfaceHandleForCompositing()
-{
- if (m_pendingNativeSurfaceHandleForCompositing) {
- m_pendingNativeSurfaceHandleForCompositing = 0;
- return;
- }
- bool handled;
- sendSync(Messages::DrawingArea::DestroyNativeSurfaceHandleForCompositing(), Messages::DrawingArea::DestroyNativeSurfaceHandleForCompositing::Reply(handled));
-}
-#endif
-
DrawingAreaProxyCoordinatedGraphics::DrawingMonitor::DrawingMonitor(WebPageProxy& webPage)
: m_timer(RunLoop::main(), this, &DrawingMonitor::stop)
#if PLATFORM(GTK)
Modified: trunk/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h (246307 => 246308)
--- trunk/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h 2019-06-11 09:11:24 UTC (rev 246307)
+++ trunk/Source/WebKit/UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.h 2019-06-11 11:17:31 UTC (rev 246308)
@@ -49,11 +49,6 @@
bool isInAcceleratedCompositingMode() const { return !m_layerTreeContext.isEmpty(); }
-#if USE(TEXTURE_MAPPER_GL) && PLATFORM(GTK) && PLATFORM(X11) && !USE(REDIRECTED_XCOMPOSITE_WINDOW)
- void setNativeSurfaceHandleForCompositing(uint64_t);
- void destroyNativeSurfaceHandleForCompositing();
-#endif
-
private:
// DrawingAreaProxy
void sizeDidChange() override;
@@ -130,10 +125,6 @@
// For a new Drawing Area don't draw anything until the WebProcess has sent over the first content.
bool m_hasReceivedFirstUpdate { false };
-#if USE(TEXTURE_MAPPER_GL) && PLATFORM(GTK) && PLATFORM(X11) && !USE(REDIRECTED_XCOMPOSITE_WINDOW)
- uint64_t m_pendingNativeSurfaceHandleForCompositing { 0 };
-#endif
-
#if !PLATFORM(WPE)
bool m_isBackingStoreDiscardable { true };
std::unique_ptr<BackingStore> m_backingStore;
Modified: trunk/Source/WebKit/UIProcess/gtk/AcceleratedBackingStore.cpp (246307 => 246308)
--- trunk/Source/WebKit/UIProcess/gtk/AcceleratedBackingStore.cpp 2019-06-11 09:11:24 UTC (rev 246307)
+++ trunk/Source/WebKit/UIProcess/gtk/AcceleratedBackingStore.cpp 2019-06-11 11:17:31 UTC (rev 246308)
@@ -34,7 +34,7 @@
#include "AcceleratedBackingStoreWayland.h"
#endif
-#if USE(REDIRECTED_XCOMPOSITE_WINDOW)
+#if PLATFORM(X11)
#include "AcceleratedBackingStoreX11.h"
#endif
@@ -47,10 +47,11 @@
if (PlatformDisplay::sharedDisplay().type() == PlatformDisplay::Type::Wayland)
return AcceleratedBackingStoreWayland::create(webPage);
#endif
-#if USE(REDIRECTED_XCOMPOSITE_WINDOW)
+#if PLATFORM(X11)
if (PlatformDisplay::sharedDisplay().type() == PlatformDisplay::Type::X11)
return AcceleratedBackingStoreX11::create(webPage);
#endif
+ RELEASE_ASSERT_NOT_REACHED();
return nullptr;
}
Modified: trunk/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreX11.cpp (246307 => 246308)
--- trunk/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreX11.cpp 2019-06-11 09:11:24 UTC (rev 246307)
+++ trunk/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreX11.cpp 2019-06-11 11:17:31 UTC (rev 246308)
@@ -26,7 +26,7 @@
#include "config.h"
#include "AcceleratedBackingStoreX11.h"
-#if USE(REDIRECTED_XCOMPOSITE_WINDOW)
+#if PLATFORM(X11)
#include "DrawingAreaProxyCoordinatedGraphics.h"
#include "LayerTreeContext.h"
@@ -202,4 +202,4 @@
} // namespace WebKit
-#endif // USE(REDIRECTED_XCOMPOSITE_WINDOW)
+#endif // PLATFORM(X11)
Modified: trunk/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreX11.h (246307 => 246308)
--- trunk/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreX11.h 2019-06-11 09:11:24 UTC (rev 246307)
+++ trunk/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreX11.h 2019-06-11 11:17:31 UTC (rev 246308)
@@ -27,7 +27,7 @@
#include "AcceleratedBackingStore.h"
-#if USE(REDIRECTED_XCOMPOSITE_WINDOW)
+#if PLATFORM(X11)
#include <WebCore/RefPtrCairo.h>
#include <WebCore/XUniqueResource.h>
@@ -43,7 +43,7 @@
~AcceleratedBackingStoreX11();
private:
- AcceleratedBackingStoreX11(WebPageProxy&);
+ explicit AcceleratedBackingStoreX11(WebPageProxy&);
void update(const LayerTreeContext&) override;
bool paint(cairo_t*, const WebCore::IntRect&) override;
@@ -54,4 +54,4 @@
} // namespace WebKit
-#endif // USE(REDIRECTED_XCOMPOSITE_WINDOW)
+#endif // PLATFORM(X11)
Modified: trunk/Source/WebKit/UIProcess/gtk/HardwareAccelerationManager.cpp (246307 => 246308)
--- trunk/Source/WebKit/UIProcess/gtk/HardwareAccelerationManager.cpp 2019-06-11 09:11:24 UTC (rev 246307)
+++ trunk/Source/WebKit/UIProcess/gtk/HardwareAccelerationManager.cpp 2019-06-11 11:17:31 UTC (rev 246308)
@@ -29,7 +29,7 @@
#include <WebCore/NotImplemented.h>
#include <WebCore/PlatformDisplay.h>
-#if USE(REDIRECTED_XCOMPOSITE_WINDOW)
+#if PLATFORM(X11)
#include <WebCore/PlatformDisplayX11.h>
#endif
@@ -65,7 +65,7 @@
return;
}
-#if USE(REDIRECTED_XCOMPOSITE_WINDOW)
+#if PLATFORM(X11)
if (PlatformDisplay::sharedDisplay().type() == PlatformDisplay::Type::X11) {
auto& display = downcast<PlatformDisplayX11>(PlatformDisplay::sharedDisplay());
Optional<int> damageBase, errorBase;
Modified: trunk/Source/WebKit/WebProcess/WebPage/AcceleratedSurface.cpp (246307 => 246308)
--- trunk/Source/WebKit/WebProcess/WebPage/AcceleratedSurface.cpp 2019-06-11 09:11:24 UTC (rev 246307)
+++ trunk/Source/WebKit/WebProcess/WebPage/AcceleratedSurface.cpp 2019-06-11 11:17:31 UTC (rev 246308)
@@ -33,7 +33,7 @@
#include "AcceleratedSurfaceWayland.h"
#endif
-#if USE(REDIRECTED_XCOMPOSITE_WINDOW)
+#if PLATFORM(X11)
#include "AcceleratedSurfaceX11.h"
#endif
@@ -54,7 +54,7 @@
return AcceleratedSurfaceWayland::create(webPage, client);
#endif
#endif
-#if USE(REDIRECTED_XCOMPOSITE_WINDOW)
+#if PLATFORM(X11)
if (PlatformDisplay::sharedDisplay().type() == PlatformDisplay::Type::X11)
return AcceleratedSurfaceX11::create(webPage, client);
#endif
@@ -62,6 +62,7 @@
if (PlatformDisplay::sharedDisplay().type() == PlatformDisplay::Type::WPE)
return AcceleratedSurfaceLibWPE::create(webPage, client);
#endif
+ RELEASE_ASSERT_NOT_REACHED();
return nullptr;
}
Modified: trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp (246307 => 246308)
--- trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp 2019-06-11 09:11:24 UTC (rev 246307)
+++ trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp 2019-06-11 11:17:31 UTC (rev 246308)
@@ -333,23 +333,6 @@
}
#endif
-#if USE(TEXTURE_MAPPER_GL) && PLATFORM(GTK) && PLATFORM(X11) && !USE(REDIRECTED_XCOMPOSITE_WINDOW)
-void DrawingAreaCoordinatedGraphics::setNativeSurfaceHandleForCompositing(uint64_t handle)
-{
- m_nativeSurfaceHandleForCompositing = handle;
- if (m_layerTreeHost) {
- m_webPage.corePage()->settings().setAcceleratedCompositingEnabled(true);
- m_layerTreeHost->setNativeSurfaceHandleForCompositing(handle);
- }
-}
-
-void DrawingAreaCoordinatedGraphics::destroyNativeSurfaceHandleForCompositing(bool& handled)
-{
- handled = true;
- setNativeSurfaceHandleForCompositing(0);
-}
-#endif
-
void DrawingAreaCoordinatedGraphics::activityStateDidChange(OptionSet<ActivityState::Flag> changed, ActivityStateChangeID, const Vector<CallbackID>&)
{
if (changed & ActivityState::IsVisible) {
@@ -567,10 +550,6 @@
m_layerTreeHost->pauseRendering();
}
-#if USE(TEXTURE_MAPPER_GL) && PLATFORM(GTK) && PLATFORM(X11) && !USE(REDIRECTED_XCOMPOSITE_WINDOW)
- if (m_nativeSurfaceHandleForCompositing)
- m_layerTreeHost->setNativeSurfaceHandleForCompositing(m_nativeSurfaceHandleForCompositing);
-#endif
if (!m_inUpdateBackingStoreState)
m_layerTreeHost->setShouldNotifyAfterNextScheduledLayerFlush(true);
Modified: trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.h (246307 => 246308)
--- trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.h 2019-06-11 09:11:24 UTC (rev 246307)
+++ trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.h 2019-06-11 11:17:31 UTC (rev 246308)
@@ -73,11 +73,6 @@
RefPtr<WebCore::DisplayRefreshMonitor> createDisplayRefreshMonitor(WebCore::PlatformDisplayID) override;
#endif
-#if USE(TEXTURE_MAPPER_GL) && PLATFORM(GTK) && PLATFORM(X11) && !USE(REDIRECTED_XCOMPOSITE_WINDOW)
- void setNativeSurfaceHandleForCompositing(uint64_t) override;
- void destroyNativeSurfaceHandleForCompositing(bool&) override;
-#endif
-
void activityStateDidChange(OptionSet<WebCore::ActivityState::Flag>, ActivityStateChangeID, const Vector<CallbackID>& /* callbackIDs */) override;
void attachViewOverlayGraphicsLayer(WebCore::GraphicsLayer*) override;
Modified: trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp (246307 => 246308)
--- trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp 2019-06-11 09:11:24 UTC (rev 246307)
+++ trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp 2019-06-11 11:17:31 UTC (rev 246308)
@@ -71,17 +71,13 @@
scaledSize.scale(m_webPage.deviceScaleFactor());
float scaleFactor = m_webPage.deviceScaleFactor() * m_viewportController.pageScaleFactor();
- if (m_surface) {
- TextureMapper::PaintFlags paintFlags = 0;
+ TextureMapper::PaintFlags paintFlags = 0;
+ if (m_surface->shouldPaintMirrored())
+ paintFlags |= TextureMapper::PaintingMirrored;
- if (m_surface->shouldPaintMirrored())
- paintFlags |= TextureMapper::PaintingMirrored;
+ m_compositor = ThreadedCompositor::create(m_compositorClient, m_compositorClient, m_webPage.corePage()->chrome().displayID(), scaledSize, scaleFactor, paintFlags);
+ m_layerTreeContext.contextID = m_surface->surfaceID();
- m_compositor = ThreadedCompositor::create(m_compositorClient, m_compositorClient, m_webPage.corePage()->chrome().displayID(), scaledSize, scaleFactor, ThreadedCompositor::ShouldDoFrameSync::Yes, paintFlags);
- m_layerTreeContext.contextID = m_surface->surfaceID();
- } else
- m_compositor = ThreadedCompositor::create(m_compositorClient, m_compositorClient, m_webPage.corePage()->chrome().displayID(), scaledSize, scaleFactor);
-
didChangeViewport();
}
@@ -226,7 +222,7 @@
return;
}
- if (m_surface && m_surface->hostResize(size))
+ if (m_surface->hostResize(size))
m_layerTreeContext.contextID = m_surface->surfaceID();
m_coordinator.sizeDidChange(size);
@@ -335,15 +331,6 @@
didChangeViewport();
}
-#if PLATFORM(GTK) && PLATFORM(X11) && !USE(REDIRECTED_XCOMPOSITE_WINDOW)
-void LayerTreeHost::setNativeSurfaceHandleForCompositing(uint64_t handle)
-{
- m_layerTreeContext.contextID = handle;
- m_compositor->setNativeSurfaceHandleForCompositing(handle);
- scheduleLayerFlush();
-}
-#endif
-
void LayerTreeHost::deviceOrPageScaleFactorChanged()
{
if (m_isDiscardable) {
@@ -351,7 +338,7 @@
return;
}
- if (m_surface && m_surface->hostResize(m_webPage.size()))
+ if (m_surface->hostResize(m_webPage.size()))
m_layerTreeContext.contextID = m_surface->surfaceID();
m_coordinator.deviceOrPageScaleFactorChanged();
@@ -386,9 +373,6 @@
uint64_t LayerTreeHost::nativeSurfaceHandleForCompositing()
{
- if (!m_surface)
- return m_layerTreeContext.contextID;
-
m_surface->initialize();
return m_surface->window();
}
@@ -395,20 +379,17 @@
void LayerTreeHost::didDestroyGLContext()
{
- if (m_surface)
- m_surface->finalize();
+ m_surface->finalize();
}
void LayerTreeHost::willRenderFrame()
{
- if (m_surface)
- m_surface->willRenderFrame();
+ m_surface->willRenderFrame();
}
void LayerTreeHost::didRenderFrame()
{
- if (m_surface)
- m_surface->didRenderFrame();
+ m_surface->didRenderFrame();
}
void LayerTreeHost::requestDisplayRefreshMonitorUpdate()
Modified: trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.h (246307 => 246308)
--- trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.h 2019-06-11 09:11:24 UTC (rev 246307)
+++ trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.h 2019-06-11 11:17:31 UTC (rev 246308)
@@ -87,10 +87,6 @@
void setIsDiscardable(bool);
-#if USE(TEXTURE_MAPPER_GL) && PLATFORM(GTK)
- void setNativeSurfaceHandleForCompositing(uint64_t);
-#endif
-
void deviceOrPageScaleFactorChanged();
#if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR)
Modified: trunk/Source/WebKit/WebProcess/WebPage/DrawingArea.h (246307 => 246308)
--- trunk/Source/WebKit/WebProcess/WebPage/DrawingArea.h 2019-06-11 09:11:24 UTC (rev 246307)
+++ trunk/Source/WebKit/WebProcess/WebPage/DrawingArea.h 2019-06-11 11:17:31 UTC (rev 246308)
@@ -162,14 +162,9 @@
DrawingAreaIdentifier m_identifier;
WebPage& m_webPage;
-#if USE(TEXTURE_MAPPER_GL) && PLATFORM(GTK) && PLATFORM(X11) && !USE(REDIRECTED_XCOMPOSITE_WINDOW)
- uint64_t m_nativeSurfaceHandleForCompositing { 0 };
-#endif
-
private:
// IPC::MessageReceiver.
void didReceiveMessage(IPC::Connection&, IPC::Decoder&) override;
- void didReceiveSyncMessage(IPC::Connection&, IPC::Decoder&, std::unique_ptr<IPC::Encoder>&) override;
// Message handlers.
// FIXME: These should be pure virtual.
@@ -188,11 +183,6 @@
virtual void addTransactionCallbackID(WebKit::CallbackID) { ASSERT_NOT_REACHED(); }
#endif
-#if USE(TEXTURE_MAPPER_GL) && PLATFORM(GTK) && PLATFORM(X11) && !USE(REDIRECTED_XCOMPOSITE_WINDOW)
- virtual void setNativeSurfaceHandleForCompositing(uint64_t) = 0;
- virtual void destroyNativeSurfaceHandleForCompositing(bool&) = 0;
-#endif
-
bool m_hasRemovedMessageReceiver { false };
};
Modified: trunk/Source/WebKit/WebProcess/WebPage/DrawingArea.messages.in (246307 => 246308)
--- trunk/Source/WebKit/WebProcess/WebPage/DrawingArea.messages.in 2019-06-11 09:11:24 UTC (rev 246307)
+++ trunk/Source/WebKit/WebProcess/WebPage/DrawingArea.messages.in 2019-06-11 11:17:31 UTC (rev 246308)
@@ -39,9 +39,4 @@
AddTransactionCallbackID(WebKit::CallbackID callbackID)
#endif
-
-#if USE(TEXTURE_MAPPER_GL) && PLATFORM(GTK) && PLATFORM(X11) && !USE(REDIRECTED_XCOMPOSITE_WINDOW)
- SetNativeSurfaceHandleForCompositing(uint64_t handle)
- DestroyNativeSurfaceHandleForCompositing() -> (bool handled)
-#endif
}
Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.h (246307 => 246308)
--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.h 2019-06-11 09:11:24 UTC (rev 246307)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.h 2019-06-11 11:17:31 UTC (rev 246308)
@@ -972,10 +972,6 @@
void dispatchTouchEvent(const WebTouchEvent&, bool& handled);
#endif
-#if PLATFORM(GTK) && USE(TEXTURE_MAPPER_GL)
- uint64_t nativeWindowHandle() { return m_nativeWindowHandle; }
-#endif
-
bool shouldUseCustomContentProviderForResponse(const WebCore::ResourceResponse&);
bool asynchronousPluginInitializationEnabled() const { return m_asynchronousPluginInitializationEnabled; }
@@ -1683,11 +1679,6 @@
GRefPtr<AtkObject> m_accessibilityObject;
#endif
-#if PLATFORM(GTK) && USE(TEXTURE_MAPPER_GL)
- // Our view's window in the UI process.
- uint64_t m_nativeWindowHandle { 0 };
-#endif
-
#if !PLATFORM(IOS_FAMILY)
RefPtr<PageBanner> m_headerBanner;
RefPtr<PageBanner> m_footerBanner;
Modified: trunk/Source/WebKit/WebProcess/WebPage/gtk/AcceleratedSurfaceX11.cpp (246307 => 246308)
--- trunk/Source/WebKit/WebProcess/WebPage/gtk/AcceleratedSurfaceX11.cpp 2019-06-11 09:11:24 UTC (rev 246307)
+++ trunk/Source/WebKit/WebProcess/WebPage/gtk/AcceleratedSurfaceX11.cpp 2019-06-11 11:17:31 UTC (rev 246308)
@@ -26,7 +26,7 @@
#include "config.h"
#include "AcceleratedSurfaceX11.h"
-#if USE(REDIRECTED_XCOMPOSITE_WINDOW)
+#if PLATFORM(X11)
#include "WebPage.h"
#include <WebCore/PlatformDisplayX11.h>
@@ -156,4 +156,4 @@
} // namespace WebKit
-#endif // USE(REDIRECTED_XCOMPOSITE_WINDOW)
+#endif // PLATFORM(X11)
Modified: trunk/Source/WebKit/WebProcess/WebPage/gtk/AcceleratedSurfaceX11.h (246307 => 246308)
--- trunk/Source/WebKit/WebProcess/WebPage/gtk/AcceleratedSurfaceX11.h 2019-06-11 09:11:24 UTC (rev 246307)
+++ trunk/Source/WebKit/WebProcess/WebPage/gtk/AcceleratedSurfaceX11.h 2019-06-11 11:17:31 UTC (rev 246308)
@@ -25,7 +25,7 @@
#pragma once
-#if USE(REDIRECTED_XCOMPOSITE_WINDOW)
+#if PLATFORM(X11)
#include "AcceleratedSurface.h"
#include <WebCore/XUniqueResource.h>
@@ -64,4 +64,4 @@
} // namespace WebKit
-#endif // USE(REDIRECTED_XCOMPOSITE_WINDOW)
+#endif // PLATFORM(X11)
Modified: trunk/Source/cmake/OptionsGTK.cmake (246307 => 246308)
--- trunk/Source/cmake/OptionsGTK.cmake 2019-06-11 09:11:24 UTC (rev 246307)
+++ trunk/Source/cmake/OptionsGTK.cmake 2019-06-11 11:17:31 UTC (rev 246308)
@@ -90,7 +90,6 @@
# Private options specific to the GTK+ port. Changing these options is
# completely unsupported. They are intended for use only by WebKit developers.
-WEBKIT_OPTION_DEFINE(USE_REDIRECTED_XCOMPOSITE_WINDOW "Whether to use a Redirected XComposite Window for accelerated compositing in X11." PRIVATE ON)
WEBKIT_OPTION_DEFINE(USE_OPENVR "Whether to use OpenVR as WebVR backend." PRIVATE OFF)
# FIXME: Can we use cairo-glesv2 to avoid this conflict?
@@ -102,8 +101,6 @@
WEBKIT_OPTION_DEPEND(ENABLE_GLES2 ENABLE_OPENGL)
WEBKIT_OPTION_DEPEND(ENABLE_PLUGIN_PROCESS_GTK2 ENABLE_X11_TARGET)
WEBKIT_OPTION_DEPEND(ENABLE_WEBGL ENABLE_OPENGL)
-WEBKIT_OPTION_DEPEND(USE_REDIRECTED_XCOMPOSITE_WINDOW ENABLE_OPENGL)
-WEBKIT_OPTION_DEPEND(USE_REDIRECTED_XCOMPOSITE_WINDOW ENABLE_X11_TARGET)
WEBKIT_OPTION_DEPEND(USE_WPE_RENDERER ENABLE_OPENGL)
WEBKIT_OPTION_DEPEND(USE_WPE_RENDERER ENABLE_WAYLAND_TARGET)