WebKit Bugzilla
Attachment 362601 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
bug186364-4.patch (text/plain), 27.89 KB, created by
Fujii Hironori
on 2019-02-21 02:29:29 PST
(
hide
)
Description:
WIP patch
Filename:
MIME Type:
Creator:
Fujii Hironori
Created:
2019-02-21 02:29:29 PST
Size:
27.89 KB
patch
obsolete
>diff --git a/Source/WTF/wtf/WorkQueue.h b/Source/WTF/wtf/WorkQueue.h >index b3844275a65..51684b208eb 100644 >--- a/Source/WTF/wtf/WorkQueue.h >+++ b/Source/WTF/wtf/WorkQueue.h >@@ -38,6 +38,7 @@ > > #if USE(WINDOWS_EVENT_LOOP) > #include <wtf/HashMap.h> >+#include <wtf/RunLoop.h> > #include <wtf/ThreadingPrimitives.h> > #include <wtf/Vector.h> > #endif >@@ -76,6 +77,8 @@ public: > dispatch_queue_t dispatchQueue() const { return m_dispatchQueue; } > #elif USE(GLIB_EVENT_LOOP) || USE(GENERIC_EVENT_LOOP) > RunLoop& runLoop() const { return *m_runLoop; } >+#elif USE(WINDOWS_EVENT_LOOP) >+ HANDLE timerQueue() const { return m_timerQueue; } > #endif > > private: >diff --git a/Source/WebCore/PlatformWinCairo.cmake b/Source/WebCore/PlatformWinCairo.cmake >index 434bc43932f..542df38692f 100644 >--- a/Source/WebCore/PlatformWinCairo.cmake >+++ b/Source/WebCore/PlatformWinCairo.cmake >@@ -11,6 +11,15 @@ 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 >@@ -59,5 +68,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/platform/graphics/PlatformDisplay.cpp b/Source/WebCore/platform/graphics/PlatformDisplay.cpp >index d23c60792ea..8e14b3a9bb2 100644 >--- a/Source/WebCore/platform/graphics/PlatformDisplay.cpp >+++ b/Source/WebCore/platform/graphics/PlatformDisplay.cpp >@@ -211,7 +211,7 @@ void PlatformDisplay::initializeEGLDisplay() > > eglDisplays().add(this); > >-#if !PLATFORM(WIN) >+#if 1 // !PLATFORM(WIN) > static bool eglAtexitHandlerInitialized = false; > if (!eglAtexitHandlerInitialized) { > // EGL registers atexit handlers to cleanup its global display list. >diff --git a/Source/WebKit/PlatformWin.cmake b/Source/WebKit/PlatformWin.cmake >index 0a5335a3cf8..c151aa3e81e 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 >@@ -164,6 +166,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 >@@ -173,6 +181,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 a5f15f01a50..ae802d7e28e 100644 >--- a/Source/WebKit/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp >+++ b/Source/WebKit/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp >@@ -232,7 +232,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; >@@ -364,7 +364,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/CompositingRunLoop.cpp b/Source/WebKit/Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp >index bdc5ee5a92f..e8f2f2534fb 100644 >--- a/Source/WebKit/Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp >+++ b/Source/WebKit/Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp >@@ -56,10 +56,19 @@ public: > getOrCreateWorkQueueForContext(context).dispatch(WTFMove(function)); > } > >+#if USE(GLIB_EVENT_LOOP) || USE(GENERIC_EVENT_LOOP) > RunLoop& runLoop(void* context) > { > return getOrCreateWorkQueueForContext(context).runLoop(); > } >+#endif >+ >+#if USE(WINDOWS_EVENT_LOOP) >+ HANDLE timerQueue(void* context) >+ { >+ return getOrCreateWorkQueueForContext(context).timerQueue(); >+ } >+#endif > > void invalidate(void* context) > { >@@ -106,7 +115,12 @@ private: > }; > > CompositingRunLoop::CompositingRunLoop(Function<void ()>&& updateFunction) >+#if USE(GLIB_EVENT_LOOP) || USE(GENERIC_EVENT_LOOP) > : m_updateTimer(WorkQueuePool::singleton().runLoop(this), this, &CompositingRunLoop::updateTimerFired) >+#elif USE(WINDOWS_EVENT_LOOP) >+ : m_timerQueue(WorkQueuePool::singleton().timerQueue(this)) >+ , m_updateTimer(INVALID_HANDLE_VALUE) >+#endif > , m_updateFunction(WTFMove(updateFunction)) > { > #if USE(GLIB_EVENT_LOOP) >@@ -142,6 +156,36 @@ void CompositingRunLoop::performTaskSync(Function<void ()>&& function) > m_dispatchSyncCondition.wait(m_dispatchSyncConditionMutex); > } > >+#if USE(WINDOWS_EVENT_LOOP) >+VOID CALLBACK CompositingRunLoop::updateTimerCallback(PVOID lpParam, BOOLEAN TimerOrWaitFired) >+{ >+ static_cast<CompositingRunLoop*>(lpParam)->m_updateTimer = INVALID_HANDLE_VALUE; >+ static_cast<CompositingRunLoop*>(lpParam)->updateTimerFired(); >+} >+#endif >+ >+void CompositingRunLoop::startUpdateTimer() >+{ >+#if USE(GLIB_EVENT_LOOP) || USE(GENERIC_EVENT_LOOP) >+ m_updateTimer.startOneShot(0_s); >+#elif USE(WINDOWS_EVENT_LOOP) >+ if (m_updateTimer == INVALID_HANDLE_VALUE) >+ ::CreateTimerQueueTimer(&m_updateTimer, m_timerQueue, updateTimerCallback, this, 0, 0, WT_EXECUTEINTIMERTHREAD); >+#endif >+} >+ >+void CompositingRunLoop::stopUpdateTimer() >+{ >+#if USE(GLIB_EVENT_LOOP) || USE(GENERIC_EVENT_LOOP) >+ m_updateTimer.stop(); >+#elif USE(WINDOWS_EVENT_LOOP) >+ if (m_updateTimer != INVALID_HANDLE_VALUE) { >+ ::DeleteTimerQueueTimer(m_timerQueue, m_updateTimer, NULL); >+ m_updateTimer = INVALID_HANDLE_VALUE; >+ } >+#endif >+} >+ > void CompositingRunLoop::scheduleUpdate() > { > LockHolder stateLocker(m_state.lock); >@@ -161,7 +205,7 @@ void CompositingRunLoop::scheduleUpdate(LockHolder& stateLocker) > switch (m_state.update) { > case UpdateState::Idle: > m_state.update = UpdateState::Scheduled; >- m_updateTimer.startOneShot(0_s); >+ startUpdateTimer(); > return; > case UpdateState::Scheduled: > return; >@@ -177,7 +221,7 @@ void CompositingRunLoop::stopUpdates() > // Stop everything. > > LockHolder locker(m_state.lock); >- m_updateTimer.stop(); >+ stopUpdateTimer(); > m_state.composition = CompositionState::Idle; > m_state.update = UpdateState::Idle; > m_state.pendingUpdate = false; >@@ -204,7 +248,7 @@ void CompositingRunLoop::compositionCompleted(LockHolder& stateLocker) > if (m_state.pendingUpdate) { > m_state.pendingUpdate = false; > m_state.update = UpdateState::Scheduled; >- m_updateTimer.startOneShot(0_s); >+ startUpdateTimer(); > return; > } > >@@ -236,7 +280,7 @@ void CompositingRunLoop::updateCompleted(LockHolder& stateLocker) > if (m_state.pendingUpdate) { > m_state.pendingUpdate = false; > m_state.update = UpdateState::Scheduled; >- m_updateTimer.startOneShot(0_s); >+ startUpdateTimer(); > return; > } > >diff --git a/Source/WebKit/Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.h b/Source/WebKit/Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.h >index 42c52f6be82..fc10cc588e7 100644 >--- a/Source/WebKit/Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.h >+++ b/Source/WebKit/Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.h >@@ -69,9 +69,18 @@ private: > PendingCompletion, > }; > >+ void startUpdateTimer(); >+ void stopUpdateTimer(); >+ > void updateTimerFired(); > >+#if USE(GLIB_EVENT_LOOP) || USE(GENERIC_EVENT_LOOP) > RunLoop::Timer<CompositingRunLoop> m_updateTimer; >+#elif USE(WINDOWS_EVENT_LOOP) >+ HANDLE m_timerQueue; >+ HANDLE m_updateTimer; >+ static VOID CALLBACK updateTimerCallback(PVOID lpParam, BOOLEAN TimerOrWaitFired); >+#endif > Function<void ()> m_updateFunction; > Lock m_dispatchSyncConditionMutex; > Condition m_dispatchSyncCondition; >diff --git a/Source/WebKit/Shared/WebPageCreationParameters.cpp b/Source/WebKit/Shared/WebPageCreationParameters.cpp >index a249a66821b..f9c516128b0 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; >@@ -283,6 +286,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 21cae2e4881..b6e7e213589 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 b08a1bf6669..02d666ad0d6 100644 >--- a/Source/WebKit/UIProcess/WebPageProxy.cpp >+++ b/Source/WebKit/UIProcess/WebPageProxy.cpp >@@ -6950,6 +6950,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/AcceleratedDrawingArea.h b/Source/WebKit/WebProcess/WebPage/AcceleratedDrawingArea.h >index 0927d44d004..4c3a297b524 100644 >--- a/Source/WebKit/WebProcess/WebPage/AcceleratedDrawingArea.h >+++ b/Source/WebKit/WebProcess/WebPage/AcceleratedDrawingArea.h >@@ -61,7 +61,7 @@ protected: > void scheduleCompositingLayerFlushImmediately() override; > > #if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR) >- virtual RefPtr<WebCore::DisplayRefreshMonitor> createDisplayRefreshMonitor(WebCore::PlatformDisplayID); >+ RefPtr<WebCore::DisplayRefreshMonitor> createDisplayRefreshMonitor(WebCore::PlatformDisplayID) override; > #endif > > #if USE(TEXTURE_MAPPER_GL) && PLATFORM(GTK) && PLATFORM(X11) && !USE(REDIRECTED_XCOMPOSITE_WINDOW) >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 085d82a8e64..83e9c6eabc4 100644 >--- a/Source/WebKit/WebProcess/WebPage/WebPage.cpp >+++ b/Source/WebKit/WebProcess/WebPage/WebPage.cpp >@@ -368,6 +368,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 1dd2bf7d4b5..467012c6c9d 100644 >--- a/Source/WebKit/WebProcess/WebPage/WebPage.h >+++ b/Source/WebKit/WebProcess/WebPage/WebPage.h >@@ -947,7 +947,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 > >@@ -1598,7 +1598,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 3ff81cf2089..87975c53a5f 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 >@@ -5480,7 +5480,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) >@@ -6487,7 +6487,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 > >@@ -7149,7 +7149,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() > if (!m_layerTreeHost) > 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 6847b484132..12b384f0203 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