WebKit Bugzilla
Attachment 369688 Details for
Bug 186364
: [WinCairo] Enable coordinated graphics
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
WIP patch
wip.patch (text/plain), 27.95 KB, created by
Fujii Hironori
on 2019-05-12 19:58:39 PDT
(
hide
)
Description:
WIP patch
Filename:
MIME Type:
Creator:
Fujii Hironori
Created:
2019-05-12 19:58:39 PDT
Size:
27.95 KB
patch
obsolete
>diff --git a/Source/WebCore/PlatformWinCairo.cmake b/Source/WebCore/PlatformWinCairo.cmake >index ed69d743ae5..8186eb51b91 100644 >--- a/Source/WebCore/PlatformWinCairo.cmake >+++ b/Source/WebCore/PlatformWinCairo.cmake >@@ -11,11 +11,21 @@ list(APPEND WebCore_PRIVATE_INCLUDE_DIRECTORIES > ) > > list(APPEND WebCore_SOURCES >+ page/scrolling/nicosia/ScrollingCoordinatorNicosia.cpp >+ page/scrolling/nicosia/ScrollingStateNodeNicosia.cpp >+ page/scrolling/nicosia/ScrollingTreeNicosia.cpp >+ page/scrolling/nicosia/ScrollingTreeFixedNode.cpp >+ page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.cpp >+ page/scrolling/nicosia/ScrollingTreeStickyNode.cpp >+ >+ page/scrolling/generic/ScrollingThreadGeneric.cpp >+ > page/win/FrameCairoWin.cpp > > platform/graphics/GLContext.cpp > platform/graphics/PlatformDisplay.cpp > >+ platform/graphics/win/DisplayRefreshMonitorWin.cpp > platform/graphics/win/FontCustomPlatformDataCairo.cpp > platform/graphics/win/FontPlatformDataCairoWin.cpp > platform/graphics/win/GlyphPageTreeNodeCairoWin.cpp >diff --git a/Source/WebCore/platform/graphics/DisplayRefreshMonitor.cpp b/Source/WebCore/platform/graphics/DisplayRefreshMonitor.cpp >index 76a20813a65..d5d47647467 100644 >--- a/Source/WebCore/platform/graphics/DisplayRefreshMonitor.cpp >+++ b/Source/WebCore/platform/graphics/DisplayRefreshMonitor.cpp >@@ -38,6 +38,8 @@ > #include "DisplayRefreshMonitorMac.h" > #elif PLATFORM(GTK) > #include "DisplayRefreshMonitorGtk.h" >+#elif PLATFORM(WIN) >+#include "DisplayRefreshMonitorWin.h" > #endif > > namespace WebCore { >@@ -52,6 +54,9 @@ RefPtr<DisplayRefreshMonitor> DisplayRefreshMonitor::createDefaultDisplayRefresh > #endif > #if PLATFORM(GTK) > return DisplayRefreshMonitorGtk::create(displayID); >+#endif >+#if PLATFORM(WIN) >+ return DisplayRefreshMonitorWin::create(displayID); > #endif > UNUSED_PARAM(displayID); > return nullptr; >diff --git a/Source/WebCore/platform/graphics/PlatformDisplay.cpp b/Source/WebCore/platform/graphics/PlatformDisplay.cpp >index d23c60792ea..b0fd2f0d8d8 100644 >--- a/Source/WebCore/platform/graphics/PlatformDisplay.cpp >+++ b/Source/WebCore/platform/graphics/PlatformDisplay.cpp >@@ -211,7 +211,6 @@ void PlatformDisplay::initializeEGLDisplay() > > eglDisplays().add(this); > >-#if !PLATFORM(WIN) > static bool eglAtexitHandlerInitialized = false; > if (!eglAtexitHandlerInitialized) { > // EGL registers atexit handlers to cleanup its global display list. >@@ -225,7 +224,6 @@ void PlatformDisplay::initializeEGLDisplay() > eglAtexitHandlerInitialized = true; > std::atexit(shutDownEglDisplays); > } >-#endif > } > > void PlatformDisplay::terminateEGLDisplay() >diff --git a/Source/WebCore/platform/graphics/win/DisplayRefreshMonitorWin.cpp b/Source/WebCore/platform/graphics/win/DisplayRefreshMonitorWin.cpp >new file mode 100644 >index 00000000000..a35a847423d >--- /dev/null >+++ b/Source/WebCore/platform/graphics/win/DisplayRefreshMonitorWin.cpp >@@ -0,0 +1,66 @@ >+/* >+ * Copyright (C) 2018 Igalia S.L. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config.h" >+#include "DisplayRefreshMonitorWin.h" >+ >+#if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR) >+ >+namespace WebCore { >+ >+RefPtr<DisplayRefreshMonitorWin> DisplayRefreshMonitorWin::create(PlatformDisplayID displayID) >+{ >+ return adoptRef(*new DisplayRefreshMonitorWin(displayID)); >+} >+ >+DisplayRefreshMonitorWin::DisplayRefreshMonitorWin(PlatformDisplayID displayID) >+ : DisplayRefreshMonitor(displayID) >+ , m_timer(RunLoop::main(), this, &DisplayRefreshMonitorWin::displayLinkFired) >+{ >+} >+ >+bool DisplayRefreshMonitorWin::requestRefreshCallback() >+{ >+ if (!isActive()) >+ return false; >+ m_timer.startOneShot(16_ms); >+ setIsActive(true); >+ setIsScheduled(true); >+ return true; >+} >+ >+void DisplayRefreshMonitorWin::displayLinkFired() >+{ >+ if (!isPreviousFrameDone()) >+ return; >+ >+ setIsPreviousFrameDone(false); >+ >+ handleDisplayRefreshedNotificationOnMainThread(this); >+} >+ >+} // namespace WebCore >+ >+#endif // USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR) >diff --git a/Source/WebCore/platform/graphics/win/DisplayRefreshMonitorWin.h b/Source/WebCore/platform/graphics/win/DisplayRefreshMonitorWin.h >new file mode 100644 >index 00000000000..1d37051d2c5 >--- /dev/null >+++ b/Source/WebCore/platform/graphics/win/DisplayRefreshMonitorWin.h >@@ -0,0 +1,49 @@ >+/* >+ * Copyright (C) 2019 Sony Interactive Entertainment Inc. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR) >+ >+#include "DisplayRefreshMonitor.h" >+#include <wtf/RunLoop.h> >+ >+namespace WebCore { >+ >+class DisplayRefreshMonitorWin : public DisplayRefreshMonitor { >+public: >+ static RefPtr<DisplayRefreshMonitorWin> create(PlatformDisplayID displayID); >+ >+ void displayLinkFired() override; >+ bool requestRefreshCallback() override; >+ >+private: >+ explicit DisplayRefreshMonitorWin(PlatformDisplayID); >+ RunLoop::Timer<DisplayRefreshMonitorWin> m_timer; >+}; >+ >+} // namespace WebCore >+ >+#endif // USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR) >diff --git a/Source/WebKit/PlatformWin.cmake b/Source/WebKit/PlatformWin.cmake >index 4e9e2a601b8..099602c0fcd 100644 >--- a/Source/WebKit/PlatformWin.cmake >+++ b/Source/WebKit/PlatformWin.cmake >@@ -22,6 +22,8 @@ list(APPEND WebKit_SOURCES > > Shared/API/c/curl/WKCertificateInfoCurl.cpp > >+ Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp >+ > Shared/Plugins/Netscape/NetscapePluginModuleNone.cpp > > Shared/win/AuxiliaryProcessMainWin.cpp >@@ -160,6 +162,12 @@ if (${WTF_PLATFORM_WIN_CAIRO}) > > Shared/API/c/cairo/WKImageCairo.cpp > >+ Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp >+ Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp >+ Shared/CoordinatedGraphics/threadedcompositor/ThreadedDisplayRefreshMonitor.cpp >+ >+ Shared/CoordinatedGraphics/SimpleViewportController.cpp >+ > Shared/cairo/ShareableBitmapCairo.cpp > > Shared/curl/WebCoreArgumentCodersCurl.cpp >@@ -169,6 +177,8 @@ if (${WTF_PLATFORM_WIN_CAIRO}) > UIProcess/cairo/BackingStoreCairo.cpp > > WebProcess/WebCoreSupport/curl/WebFrameNetworkingContext.cpp >+ >+ WebProcess/WebPage/win/AcceleratedSurfaceWin.cpp > ) > > list(APPEND WebKit_INCLUDE_DIRECTORIES >diff --git a/Source/WebKit/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp b/Source/WebKit/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp >index eb6af980624..beb72fca3b2 100644 >--- a/Source/WebKit/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp >+++ b/Source/WebKit/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp >@@ -220,7 +220,7 @@ void CoordinatedGraphicsScene::updateSceneState() > > // Store layer and impl references along with the corresponding update > // for each type of possible layer backing. >- struct { >+ struct LayersByBacking { > struct BackingStore { > std::reference_wrapper<TextureMapperLayer> layer; > std::reference_wrapper<Nicosia::BackingStoreTextureMapperImpl> backingStore; >@@ -352,7 +352,7 @@ void CoordinatedGraphicsScene::updateSceneState() > { std::ref(layer), std::ref(impl.proxy()), layerState.delta.contentLayerChanged }); > } else if (layerState.imageBacking) { > auto& impl = imageBackingImpl(*layerState.imageBacking); >- layersByBacking.imageBacking.append( >+ layersByBacking.imageBacking.append<LayersByBacking::ImageBacking>( > { std::ref(layer), std::ref(impl), impl.takeUpdate() }); > } else > layer.setContentsLayer(nullptr); >diff --git a/Source/WebKit/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp b/Source/WebKit/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp >index e0cdeedfc21..0cf57078716 100644 >--- a/Source/WebKit/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp >+++ b/Source/WebKit/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp >@@ -188,7 +188,7 @@ void ThreadedCompositor::forceRepaint() > { > // FIXME: Enable this for WPE once it's possible to do these forced updates > // in a way that doesn't starve out the underlying graphics buffers. >-#if PLATFORM(GTK) >+#if !PLATFORM(WPE) > m_compositingRunLoop->performTaskSync([this, protectedThis = makeRef(*this)] { > SetForScope<bool> change(m_inForceRepaint, true); > renderLayerTree(); >diff --git a/Source/WebKit/Shared/WebPageCreationParameters.cpp b/Source/WebKit/Shared/WebPageCreationParameters.cpp >index 89f535d4e29..a1bba08970c 100644 >--- a/Source/WebKit/Shared/WebPageCreationParameters.cpp >+++ b/Source/WebKit/Shared/WebPageCreationParameters.cpp >@@ -105,6 +105,9 @@ void WebPageCreationParameters::encode(IPC::Encoder& encoder) const > #endif > #if PLATFORM(WPE) > encoder << hostFileDescriptor; >+#endif >+#if PLATFORM(WIN) >+ encoder << nativeWindowHandle; > #endif > encoder << appleMailPaginationQuirkEnabled; > encoder << appleMailLinesClampEnabled; >@@ -306,6 +309,11 @@ Optional<WebPageCreationParameters> WebPageCreationParameters::decode(IPC::Decod > return WTF::nullopt; > #endif > >+#if PLATFORM(WIN) >+ if (!decoder.decode(parameters.nativeWindowHandle)) >+ return WTF::nullopt; >+#endif >+ > if (!decoder.decode(parameters.appleMailPaginationQuirkEnabled)) > return WTF::nullopt; > >diff --git a/Source/WebKit/Shared/WebPageCreationParameters.h b/Source/WebKit/Shared/WebPageCreationParameters.h >index 43af461a730..abb2103bb9d 100644 >--- a/Source/WebKit/Shared/WebPageCreationParameters.h >+++ b/Source/WebKit/Shared/WebPageCreationParameters.h >@@ -164,6 +164,9 @@ struct WebPageCreationParameters { > #endif > #if PLATFORM(WPE) > IPC::Attachment hostFileDescriptor; >+#endif >+#if PLATFORM(WIN) >+ uint64_t nativeWindowHandle; > #endif > bool appleMailPaginationQuirkEnabled; > bool appleMailLinesClampEnabled; >diff --git a/Source/WebKit/UIProcess/WebPageProxy.cpp b/Source/WebKit/UIProcess/WebPageProxy.cpp >index 1b6b5168609..5642297a5b1 100644 >--- a/Source/WebKit/UIProcess/WebPageProxy.cpp >+++ b/Source/WebKit/UIProcess/WebPageProxy.cpp >@@ -7174,6 +7174,10 @@ WebPageCreationParameters WebPageProxy::creationParameters(WebProcessProxy& proc > parameters.hostFileDescriptor = pageClient().hostFileDescriptor(); > #endif > >+#if PLATFORM(WIN) >+ parameters.nativeWindowHandle = reinterpret_cast<uint64_t>(viewWidget()); >+#endif >+ > for (auto& iterator : m_urlSchemeHandlersByScheme) > parameters.urlSchemeHandlers.set(iterator.key, iterator.value->identifier()); > >diff --git a/Source/WebKit/WebProcess/WebPage/AcceleratedSurface.cpp b/Source/WebKit/WebProcess/WebPage/AcceleratedSurface.cpp >index e579a5df3a0..a806df78b5d 100644 >--- a/Source/WebKit/WebProcess/WebPage/AcceleratedSurface.cpp >+++ b/Source/WebKit/WebProcess/WebPage/AcceleratedSurface.cpp >@@ -41,6 +41,10 @@ > #include "AcceleratedSurfaceWPE.h" > #endif > >+#if PLATFORM(WIN) >+#include "AcceleratedSurfaceWin.h" >+#endif >+ > namespace WebKit { > using namespace WebCore; > >@@ -57,6 +61,10 @@ std::unique_ptr<AcceleratedSurface> AcceleratedSurface::create(WebPage& webPage, > #if PLATFORM(WPE) > if (PlatformDisplay::sharedDisplay().type() == PlatformDisplay::Type::WPE) > return AcceleratedSurfaceWPE::create(webPage, client); >+#endif >+#if PLATFORM(WIN) >+ if (PlatformDisplay::sharedDisplay().type() == PlatformDisplay::Type::Windows) >+ return AcceleratedSurfaceWin::create(webPage, client); > #endif > return nullptr; > } >diff --git a/Source/WebKit/WebProcess/WebPage/WebPage.cpp b/Source/WebKit/WebProcess/WebPage/WebPage.cpp >index 0104e0063f4..d03c66d8b80 100644 >--- a/Source/WebKit/WebProcess/WebPage/WebPage.cpp >+++ b/Source/WebKit/WebProcess/WebPage/WebPage.cpp >@@ -385,6 +385,10 @@ WebPage::WebPage(uint64_t pageID, WebPageCreationParameters&& parameters) > , m_viewGestureGeometryCollector(std::make_unique<ViewGestureGeometryCollector>(*this)) > #elif HAVE(ACCESSIBILITY) && PLATFORM(GTK) > , m_accessibilityObject(nullptr) >+#endif >+#if PLATFORM(WIN) && USE(TEXTURE_MAPPER_GL) >+ // Our view's window in the UI process. >+ , m_nativeWindowHandle(parameters.nativeWindowHandle) > #endif > , m_setCanStartMediaTimer(RunLoop::main(), this, &WebPage::setCanStartMediaTimerFired) > #if ENABLE(CONTEXT_MENUS) >diff --git a/Source/WebKit/WebProcess/WebPage/WebPage.h b/Source/WebKit/WebProcess/WebPage/WebPage.h >index a38eb8ba1de..d8caed56ea8 100644 >--- a/Source/WebKit/WebProcess/WebPage/WebPage.h >+++ b/Source/WebKit/WebProcess/WebPage/WebPage.h >@@ -966,7 +966,7 @@ public: > void dispatchTouchEvent(const WebTouchEvent&, bool& handled); > #endif > >-#if PLATFORM(GTK) && USE(TEXTURE_MAPPER_GL) >+#if PLATFORM(WIN) && USE(TEXTURE_MAPPER_GL) > uint64_t nativeWindowHandle() { return m_nativeWindowHandle; } > #endif > >@@ -1663,7 +1663,7 @@ private: > GRefPtr<AtkObject> m_accessibilityObject; > #endif > >-#if PLATFORM(GTK) && USE(TEXTURE_MAPPER_GL) >+#if PLATFORM(WIN) && USE(TEXTURE_MAPPER_GL) > // Our view's window in the UI process. > uint64_t m_nativeWindowHandle { 0 }; > #endif >diff --git a/Source/WebKit/WebProcess/WebPage/win/AcceleratedSurfaceWin.cpp b/Source/WebKit/WebProcess/WebPage/win/AcceleratedSurfaceWin.cpp >new file mode 100644 >index 00000000000..8a72ede9de5 >--- /dev/null >+++ b/Source/WebKit/WebProcess/WebPage/win/AcceleratedSurfaceWin.cpp >@@ -0,0 +1,64 @@ >+/* >+ * Copyright (C) 2018 Sony Interactive Entertainment Inc. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config.h" >+#include "AcceleratedSurfaceWin.h" >+ >+#include "WebPage.h" >+ >+namespace WebKit { >+using namespace WebCore; >+ >+std::unique_ptr<AcceleratedSurfaceWin> AcceleratedSurfaceWin::create(WebPage& webPage, Client& client) >+{ >+ return std::unique_ptr<AcceleratedSurfaceWin>(new AcceleratedSurfaceWin(webPage, client)); >+} >+ >+AcceleratedSurfaceWin::AcceleratedSurfaceWin(WebPage& webPage, Client& client) >+ : AcceleratedSurface(webPage, client) >+{ >+} >+ >+AcceleratedSurfaceWin::~AcceleratedSurfaceWin() >+{ >+} >+ >+uint64_t AcceleratedSurfaceWin::window() const >+{ >+ return m_webPage.nativeWindowHandle(); >+} >+ >+uint64_t AcceleratedSurfaceWin::surfaceID() const >+{ >+ return m_webPage.pageID(); >+} >+ >+void AcceleratedSurfaceWin::didRenderFrame() >+{ >+ // FIXME: frameComplete() should be called when the frame was actually rendered in the screen. >+ m_client.frameComplete(); >+} >+ >+} // namespace WebKit >diff --git a/Source/WebKit/WebProcess/WebPage/win/AcceleratedSurfaceWin.h b/Source/WebKit/WebProcess/WebPage/win/AcceleratedSurfaceWin.h >new file mode 100644 >index 00000000000..65b44ec4369 >--- /dev/null >+++ b/Source/WebKit/WebProcess/WebPage/win/AcceleratedSurfaceWin.h >@@ -0,0 +1,52 @@ >+/* >+ * Copyright (C) 2018 Sony Interactive Entertainment Inc. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#if PLATFORM(WIN) >+ >+#include "AcceleratedSurface.h" >+ >+namespace WebKit { >+ >+class WebPage; >+ >+class AcceleratedSurfaceWin final : public AcceleratedSurface { >+ WTF_MAKE_NONCOPYABLE(AcceleratedSurfaceWin); WTF_MAKE_FAST_ALLOCATED; >+public: >+ static std::unique_ptr<AcceleratedSurfaceWin> create(WebPage&, Client&); >+ ~AcceleratedSurfaceWin(); >+ >+ uint64_t window() const override; >+ uint64_t surfaceID() const override; >+ void didRenderFrame() override; >+ >+private: >+ AcceleratedSurfaceWin(WebPage&, Client&); >+}; >+ >+} // namespace WebKit >+ >+#endif // PLATFORM(WIN) >diff --git a/Source/WebKit/WebProcess/win/WebProcessMainWin.cpp b/Source/WebKit/WebProcess/win/WebProcessMainWin.cpp >index fc37bfac9ae..027bc6c82d5 100644 >--- a/Source/WebKit/WebProcess/win/WebProcessMainWin.cpp >+++ b/Source/WebKit/WebProcess/win/WebProcessMainWin.cpp >@@ -36,6 +36,7 @@ class WebProcessMain final : public AuxiliaryProcessMainBase { > public: > bool platformInitialize() override > { >+ SetProcessDPIAware(); > return true; > } > }; >diff --git a/Source/WebKitLegacy/win/WebCoreSupport/AcceleratedCompositingContext.cpp b/Source/WebKitLegacy/win/WebCoreSupport/AcceleratedCompositingContext.cpp >index e447370d9d1..6690f8fbb29 100644 >--- a/Source/WebKitLegacy/win/WebCoreSupport/AcceleratedCompositingContext.cpp >+++ b/Source/WebKitLegacy/win/WebCoreSupport/AcceleratedCompositingContext.cpp >@@ -25,7 +25,7 @@ > > #include "AcceleratedCompositingContext.h" > >-#if USE(TEXTURE_MAPPER_GL) >+#if USE(TEXTURE_MAPPER_GL) && !USE(COORDINATED_GRAPHICS) > > #include "WebView.h" > >@@ -413,4 +413,4 @@ float AcceleratedCompositingContext::deviceScaleFactor() const > return m_webView.deviceScaleFactor(); > } > >-#endif // USE(TEXTURE_MAPPER_GL) >+#endif // USE(TEXTURE_MAPPER_GL) && !USE(COORDINATED_GRAPHICS) >diff --git a/Source/WebKitLegacy/win/WebCoreSupport/AcceleratedCompositingContext.h b/Source/WebKitLegacy/win/WebCoreSupport/AcceleratedCompositingContext.h >index 6bb334d441d..3374d6aa4b9 100644 >--- a/Source/WebKitLegacy/win/WebCoreSupport/AcceleratedCompositingContext.h >+++ b/Source/WebKitLegacy/win/WebCoreSupport/AcceleratedCompositingContext.h >@@ -26,7 +26,7 @@ > #ifndef AcceleratedCompositingContext_h > #define AcceleratedCompositingContext_h > >-#if USE(TEXTURE_MAPPER_GL) >+#if USE(TEXTURE_MAPPER_GL) && !USE(COORDINATED_GRAPHICS) > > #include <WebCore/FloatRect.h> > #include <WebCore/GLContext.h> >@@ -99,6 +99,6 @@ private: > void applyDeviceScaleFactor(); > }; > >-#endif // TEXTURE_MAPPER_GL >+#endif // TEXTURE_MAPPER_GL && !USE(COORDINATED_GRAPHICS) > > #endif // AcceleratedCompositingContext_h >diff --git a/Source/WebKitLegacy/win/WebView.cpp b/Source/WebKitLegacy/win/WebView.cpp >index 79fc46d0fb8..17bf2404457 100644 >--- a/Source/WebKitLegacy/win/WebView.cpp >+++ b/Source/WebKitLegacy/win/WebView.cpp >@@ -198,7 +198,7 @@ > #if USE(CA) > #include <WebCore/CACFLayerTreeHost.h> > #include <WebCore/PlatformCALayer.h> >-#elif USE(TEXTURE_MAPPER_GL) >+#elif USE(TEXTURE_MAPPER_GL) && !USE(COORDINATED_GRAPHICS) > #include "AcceleratedCompositingContext.h" > #endif > >@@ -920,7 +920,7 @@ void WebView::addToDirtyRegion(const IntRect& dirtyRect) > if (isAcceleratedCompositing()) { > #if USE(CA) > m_backingLayer->setNeedsDisplayInRect(dirtyRect); >-#elif USE(TEXTURE_MAPPER_GL) >+#elif USE(TEXTURE_MAPPER_GL) && !USE(COORDINATED_GRAPHICS) > m_acceleratedCompositingContext->setNonCompositedContentsNeedDisplay(dirtyRect); > #endif > return; >@@ -992,7 +992,7 @@ void WebView::scrollBackingStore(FrameView* frameView, int logicalDx, int logica > // any newly-exposed tiles. <http://webkit.org/b/52714> > #if USE(CA) > m_backingLayer->setNeedsDisplayInRect(scrollViewRect); >-#elif USE(TEXTURE_MAPPER_GL) >+#elif USE(TEXTURE_MAPPER_GL) && !USE(COORDINATED_GRAPHICS) > m_acceleratedCompositingContext->scrollNonCompositedContents(scrollViewRect, IntSize(dx, dy)); > #endif > return; >@@ -1070,7 +1070,7 @@ void WebView::sizeChanged(const IntSize& newSize) > m_backingLayer->setSize(newSize); > m_backingLayer->setNeedsDisplay(); > } >-#elif USE(TEXTURE_MAPPER_GL) >+#elif USE(TEXTURE_MAPPER_GL) && !USE(COORDINATED_GRAPHICS) > if (m_acceleratedCompositingContext) > m_acceleratedCompositingContext->resizeRootLayer(newSize); > #endif >@@ -5477,7 +5477,7 @@ HRESULT WebView::notifyPreferencesChanged(IWebNotification* notification) > hr = prefsPrivate->acceleratedCompositingEnabled(&enabled); > if (FAILED(hr)) > return hr; >-#if USE(TEXTURE_MAPPER_GL) >+#if USE(TEXTURE_MAPPER_GL) && !USE(COORDINATED_GRAPHICS) > static bool acceleratedCompositingAvailable = AcceleratedCompositingContext::acceleratedCompositingAvailable(); > enabled = enabled && acceleratedCompositingAvailable; > #elif USE(DIRECT2D) >@@ -6494,7 +6494,7 @@ bool WebView::paintCompositedContentToHDC(HDC deviceContext) > > #if USE(CA) > m_layerTreeHost->flushPendingLayerChangesNow(); >-#elif USE(TEXTURE_MAPPER_GL) >+#elif USE(TEXTURE_MAPPER_GL) && !USE(COORDINATED_GRAPHICS) > m_acceleratedCompositingContext->flushAndRenderLayers(); > #endif > >@@ -7154,7 +7154,7 @@ void WebView::setRootChildLayer(GraphicsLayer* layer) > else > m_backingLayer->removeAllChildren(); > >-#elif USE(TEXTURE_MAPPER_GL) >+#elif USE(TEXTURE_MAPPER_GL) && !USE(COORDINATED_GRAPHICS) > if (!m_acceleratedCompositingContext) > return; > m_acceleratedCompositingContext->setRootCompositingLayer(layer); >@@ -7169,7 +7169,7 @@ void WebView::flushPendingGraphicsLayerChangesSoon() > return; > } > m_layerTreeHost->flushPendingGraphicsLayerChangesSoon(); >-#elif USE(TEXTURE_MAPPER_GL) >+#elif USE(TEXTURE_MAPPER_GL) && !USE(COORDINATED_GRAPHICS) > if (!m_acceleratedCompositingContext) > return; > m_acceleratedCompositingContext->flushPendingLayerChangesSoon(); >@@ -7230,7 +7230,7 @@ void WebView::setAcceleratedCompositing(bool accelerated) > m_backingLayer = nullptr; > m_isAcceleratedCompositing = false; > } >-#elif USE(TEXTURE_MAPPER_GL) >+#elif USE(TEXTURE_MAPPER_GL) && !USE(COORDINATED_GRAPHICS) > if (accelerated && !m_acceleratedCompositingContext) > m_acceleratedCompositingContext = std::make_unique<AcceleratedCompositingContext>(*this); > m_isAcceleratedCompositing = accelerated; >diff --git a/Source/WebKitLegacy/win/WebView.h b/Source/WebKitLegacy/win/WebView.h >index ad4e32d47e8..3e685549db1 100644 >--- a/Source/WebKitLegacy/win/WebView.h >+++ b/Source/WebKitLegacy/win/WebView.h >@@ -68,7 +68,7 @@ class WebBackForwardList; > class WebFrame; > class WebInspector; > class WebInspectorClient; >-#if USE(TEXTURE_MAPPER_GL) >+#if USE(TEXTURE_MAPPER_GL) && !USE(COORDINATED_GRAPHICS) > class AcceleratedCompositingContext; > #endif > class WebViewGroup; >@@ -706,7 +706,7 @@ protected: > #if USE(CA) > RefPtr<WebCore::CACFLayerTreeHost> m_layerTreeHost; > RefPtr<WebCore::GraphicsLayer> m_backingLayer; >-#elif USE(TEXTURE_MAPPER_GL) >+#elif USE(TEXTURE_MAPPER_GL) && !USE(COORDINATED_GRAPHICS) > std::unique_ptr<AcceleratedCompositingContext> m_acceleratedCompositingContext; > #endif > bool m_isAcceleratedCompositing { false }; >diff --git a/Source/cmake/OptionsWin.cmake b/Source/cmake/OptionsWin.cmake >index b6c13862321..db73f0de785 100644 >--- a/Source/cmake/OptionsWin.cmake >+++ b/Source/cmake/OptionsWin.cmake >@@ -77,6 +77,7 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_WEB_CRYPTO PRIVATE OFF) > WEBKIT_OPTION_DEFAULT_PORT_VALUE(USE_SYSTEM_MALLOC PRIVATE ON) > > if (${WTF_PLATFORM_WIN_CAIRO}) >+ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_ASYNC_SCROLLING PRIVATE ON) > WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_LEGACY_CUSTOM_PROTOCOL_MANAGER PUBLIC OFF) > WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_LEGACY_ENCRYPTED_MEDIA PUBLIC OFF) > WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_INTL PUBLIC ON) >diff --git a/Source/cmake/OptionsWinCairo.cmake b/Source/cmake/OptionsWinCairo.cmake >index a716ec6f0ea..bb2c7659e78 100644 >--- a/Source/cmake/OptionsWinCairo.cmake >+++ b/Source/cmake/OptionsWinCairo.cmake >@@ -24,7 +24,11 @@ endif () > > SET_AND_EXPOSE_TO_BUILD(USE_CAIRO ON) > SET_AND_EXPOSE_TO_BUILD(USE_CF ON) >+SET_AND_EXPOSE_TO_BUILD(USE_COORDINATED_GRAPHICS ON) >+SET_AND_EXPOSE_TO_BUILD(USE_COORDINATED_GRAPHICS_THREADED ON) > SET_AND_EXPOSE_TO_BUILD(USE_CURL ON) >+SET_AND_EXPOSE_TO_BUILD(USE_NICOSIA ON) >+SET_AND_EXPOSE_TO_BUILD(USE_REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR ON) > SET_AND_EXPOSE_TO_BUILD(USE_TEXTURE_MAPPER ON) > SET_AND_EXPOSE_TO_BUILD(USE_TEXTURE_MAPPER_GL ON) > SET_AND_EXPOSE_TO_BUILD(USE_MEDIA_FOUNDATION ON)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 186364
:
362273
|
362377
|
362600
|
362601
|
362971
|
363475
|
363575
|
363736
|
364241
|
365947
|
365949
|
369688
|
369820
|
369827
|
369934
|
370239
|
370924
|
391378
|
397177
|
418496