WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
WIP patch
bug186364-11.patch (text/plain), 30.78 KB, created by
Fujii Hironori
on 2019-03-11 02:23:47 PDT
(
hide
)
Description:
WIP patch
Filename:
MIME Type:
Creator:
Fujii Hironori
Created:
2019-03-11 02:23:47 PDT
Size:
30.78 KB
patch
obsolete
>diff --git a/Source/WebCore/PlatformWinCairo.cmake b/Source/WebCore/PlatformWinCairo.cmake >index b0565a09c88..4f613fb8879 100644 >--- a/Source/WebCore/PlatformWinCairo.cmake >+++ b/Source/WebCore/PlatformWinCairo.cmake >@@ -11,11 +11,21 @@ list(APPEND WebCore_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 >@@ -56,5 +66,8 @@ list(APPEND WebCoreTestSupport_LIBRARIES > list(APPEND WebCore_FORWARDING_HEADERS_DIRECTORIES > platform/mediacapabilities > platform/graphics/cairo >+ platform/graphics/nicosia >+ platform/graphics/nicosia/texmap >+ platform/graphics/texmap/coordinated > platform/network/curl > ) >diff --git a/Source/WebCore/page/scrolling/ScrollingTreeFrameScrollingNode.h b/Source/WebCore/page/scrolling/ScrollingTreeFrameScrollingNode.h >index 59ca2f650d1..35d2c1cc3df 100644 >--- a/Source/WebCore/page/scrolling/ScrollingTreeFrameScrollingNode.h >+++ b/Source/WebCore/page/scrolling/ScrollingTreeFrameScrollingNode.h >@@ -69,7 +69,7 @@ private: > LayoutPoint parentToLocalPoint(LayoutPoint) const final; > LayoutPoint localToContentsPoint(LayoutPoint) const final; > >- WEBCORE_EXPORT void updateViewportForCurrentScrollPosition(Optional<FloatRect>) override; >+ void updateViewportForCurrentScrollPosition(Optional<FloatRect>) override; > bool scrollPositionAndLayoutViewportMatch(const FloatPoint& position, Optional<FloatRect> overrideLayoutViewport) override; > > void dumpProperties(WTF::TextStream&, ScrollingStateTreeAsTextBehavior) const override; >diff --git a/Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.h b/Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.h >index 40c0a88daa2..93789fee7cd 100644 >--- a/Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.h >+++ b/Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.h >@@ -92,11 +92,11 @@ protected: > virtual FloatPoint adjustedScrollPosition(const FloatPoint&, ScrollPositionClamp = ScrollPositionClamp::ToContentEdges) const; > > virtual void currentScrollPositionChanged(); >- WEBCORE_EXPORT virtual void updateViewportForCurrentScrollPosition(Optional<FloatRect> = { }) { } >+ virtual void updateViewportForCurrentScrollPosition(Optional<FloatRect> = { }) { } > virtual bool scrollPositionAndLayoutViewportMatch(const FloatPoint& position, Optional<FloatRect> overrideLayoutViewport); > >- WEBCORE_EXPORT virtual void repositionScrollingLayers() { } >- WEBCORE_EXPORT virtual void repositionRelatedLayers() { } >+ virtual void repositionScrollingLayers() { } >+ virtual void repositionRelatedLayers() { } > > void applyLayerPositions(const FloatRect& layoutViewport, FloatSize& cumulativeDelta) override; > >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 7ed4671813d..20bb85fd526 100644 >--- a/Source/WebKit/PlatformWin.cmake >+++ b/Source/WebKit/PlatformWin.cmake >@@ -24,6 +24,8 @@ list(APPEND WebKit_SOURCES > > Shared/API/c/curl/WKCertificateInfoCurl.cpp > >+ Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp >+ > Shared/Plugins/Netscape/NetscapePluginModuleNone.cpp > > Shared/win/AuxiliaryProcessMainWin.cpp >@@ -162,6 +164,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 >@@ -171,6 +179,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 55d81d3ea07..e83c8ecab62 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/WebPageCreationParameters.cpp b/Source/WebKit/Shared/WebPageCreationParameters.cpp >index db1b3810ddc..e57c6831c9f 100644 >--- a/Source/WebKit/Shared/WebPageCreationParameters.cpp >+++ b/Source/WebKit/Shared/WebPageCreationParameters.cpp >@@ -100,6 +100,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; >@@ -287,6 +290,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 976c886f433..91edac7c31f 100644 >--- a/Source/WebKit/Shared/WebPageCreationParameters.h >+++ b/Source/WebKit/Shared/WebPageCreationParameters.h >@@ -158,6 +158,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 51fe5d9e3a2..50e7ab6ff44 100644 >--- a/Source/WebKit/UIProcess/WebPageProxy.cpp >+++ b/Source/WebKit/UIProcess/WebPageProxy.cpp >@@ -7009,6 +7009,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/CoordinatedGraphics/LayerTreeHost.h b/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.h >index 8f2468f961d..38f3b7fabd4 100644 >--- a/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.h >+++ b/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.h >@@ -137,7 +137,7 @@ private: > m_layerTreeHost.didDestroyGLContext(); > } > >- void resize(const WebCore::IntSize& size) >+ void resize(const WebCore::IntSize& size) override > { > if (m_layerTreeHost.m_surface) > m_layerTreeHost.m_surface->clientResize(size); >@@ -158,7 +158,7 @@ private: > m_layerTreeHost.requestDisplayRefreshMonitorUpdate(); > } > >- void handleDisplayRefreshMonitorUpdate(bool hasBeenRescheduled) >+ void handleDisplayRefreshMonitorUpdate(bool hasBeenRescheduled) override > { > m_layerTreeHost.handleDisplayRefreshMonitorUpdate(hasBeenRescheduled); > } >diff --git a/Source/WebKit/WebProcess/WebPage/WebPage.cpp b/Source/WebKit/WebProcess/WebPage/WebPage.cpp >index fdbb382f05a..913cdd67fc7 100644 >--- a/Source/WebKit/WebProcess/WebPage/WebPage.cpp >+++ b/Source/WebKit/WebProcess/WebPage/WebPage.cpp >@@ -371,6 +371,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 b00984b3639..35069dac806 100644 >--- a/Source/WebKit/WebProcess/WebPage/WebPage.h >+++ b/Source/WebKit/WebProcess/WebPage/WebPage.h >@@ -950,7 +950,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 > >@@ -1605,7 +1605,7 @@ private: > GRefPtr<WebPageAccessibilityObject> 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..8e510c7ef14 >--- /dev/null >+++ b/Source/WebKit/WebProcess/WebPage/win/AcceleratedSurfaceWin.cpp >@@ -0,0 +1,78 @@ >+/* >+ * 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" >+#include <egl.h> >+#include <WebCore/PlatformDisplayWin.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() >+{ >+} >+ >+void AcceleratedSurfaceWin::initialize() >+{ >+} >+ >+void AcceleratedSurfaceWin::finalize() >+{ >+} >+ >+uint64_t AcceleratedSurfaceWin::window() const >+{ >+ return m_webPage.nativeWindowHandle(); >+} >+ >+uint64_t AcceleratedSurfaceWin::surfaceID() const >+{ >+ return m_webPage.pageID(); >+} >+ >+void AcceleratedSurfaceWin::willRenderFrame() >+{ >+} >+ >+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..cf1fd7e93f3 >--- /dev/null >+++ b/Source/WebKit/WebProcess/WebPage/win/AcceleratedSurfaceWin.h >@@ -0,0 +1,56 @@ >+/* >+ * 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 initialize() override; >+ void finalize() override; >+ void willRenderFrame() 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 a52b120abb2..a09fc04adbd 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" > >@@ -414,4 +414,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 6f7be1200fd..f5d31f7d6b0 100644 >--- a/Source/WebKitLegacy/win/WebView.cpp >+++ b/Source/WebKitLegacy/win/WebView.cpp >@@ -197,7 +197,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 > >@@ -921,7 +921,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; >@@ -993,7 +993,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; >@@ -1071,7 +1071,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 >@@ -5478,7 +5478,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) >@@ -6485,7 +6485,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 > >@@ -7147,7 +7147,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); >@@ -7162,7 +7162,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(); >@@ -7223,7 +7223,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 c3eb08c4288..ebb23dad768 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 61fa485b25d..aaee42415b4 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 4ad2c4b423a..0c55f57b3ed 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