Changeset 215088 in webkit
- Timestamp:
- Apr 7, 2017, 3:43:43 AM (9 years ago)
- Location:
- trunk/Source
- Files:
-
- 1 added
- 18 edited
-
JavaScriptCore/ChangeLog (modified) (1 diff)
-
JavaScriptCore/runtime/JSRunLoopTimer.cpp (modified) (2 diffs)
-
WTF/ChangeLog (modified) (1 diff)
-
WTF/wtf/glib/MainThreadGLib.cpp (modified) (2 diffs)
-
WTF/wtf/glib/RunLoopGLib.cpp (modified) (4 diffs)
-
WTF/wtf/glib/RunLoopSourcePriority.h (added)
-
WTF/wtf/linux/MemoryPressureHandlerLinux.cpp (modified) (2 diffs)
-
WebCore/ChangeLog (modified) (1 diff)
-
WebCore/platform/glib/MainThreadSharedTimerGLib.cpp (modified) (2 diffs)
-
WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp (modified) (3 diffs)
-
WebKit2/ChangeLog (modified) (1 diff)
-
WebKit2/Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp (modified) (2 diffs)
-
WebKit2/UIProcess/DrawingAreaProxyImpl.cpp (modified) (3 diffs)
-
WebKit2/UIProcess/gtk/WaylandCompositor.cpp (modified) (1 diff)
-
WebKit2/WebProcess/WebPage/AcceleratedDrawingArea.cpp (modified) (2 diffs)
-
WebKit2/WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp (modified) (2 diffs)
-
WebKit2/WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h (modified) (2 diffs)
-
WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp (modified) (2 diffs)
-
WebKit2/WebProcess/WebPage/DrawingAreaImpl.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r215073 r215088 1 2017-04-07 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 [GTK] Update the priorities used in glib main loop sources 4 https://bugs.webkit.org/show_bug.cgi?id=170457 5 6 Reviewed by Žan Doberšek. 7 8 * runtime/JSRunLoopTimer.cpp: 9 (JSC::JSRunLoopTimer::JSRunLoopTimer): 10 1 11 2017-04-06 Filip Pizlo <fpizlo@apple.com> 2 12 -
trunk/Source/JavaScriptCore/runtime/JSRunLoopTimer.cpp
r214732 r215088 38 38 #if USE(GLIB) 39 39 #include <glib.h> 40 #include <wtf/glib/RunLoopSourcePriority.h> 40 41 #endif 41 42 … … 134 135 , m_timer(adoptGRef(g_source_new(&JSRunLoopTimerSourceFunctions, sizeof(GSource)))) 135 136 { 137 g_source_set_priority(m_timer.get(), RunLoopSourcePriority::JavascriptTimer); 136 138 g_source_set_name(m_timer.get(), "[JavaScriptCore] JSRunLoopTimer"); 137 139 g_source_set_callback(m_timer.get(), [](gpointer userData) -> gboolean { -
trunk/Source/WTF/ChangeLog
r215071 r215088 1 2017-04-07 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 [GTK] Update the priorities used in glib main loop sources 4 https://bugs.webkit.org/show_bug.cgi?id=170457 5 6 Reviewed by Žan Doberšek. 7 8 Add an enum to define prirorities used in different GLib main sources. It allows to give them a better name 9 than high, low, medium, etc., but also to document them and other GLib based ports can define their own 10 values without changing all the places where they are used. The default values are based on the priorities 11 pre-defined by GLib. 12 13 * wtf/glib/MainThreadGLib.cpp: 14 (WTF::MainThreadDispatcher::MainThreadDispatcher): 15 * wtf/glib/RunLoopGLib.cpp: 16 (WTF::RunLoop::RunLoop): 17 (WTF::RunLoop::dispatchAfter): 18 (WTF::RunLoop::TimerBase::TimerBase): 19 * wtf/glib/RunLoopSourcePriority.h: Added. 20 * wtf/linux/MemoryPressureHandlerLinux.cpp: 21 (WTF::MemoryPressureHandler::EventFDPoller::EventFDPoller): 22 1 23 2017-04-06 Filip Pizlo <fpizlo@apple.com> 2 24 -
trunk/Source/WTF/wtf/glib/MainThreadGLib.cpp
r212878 r215088 31 31 #include "MainThread.h" 32 32 33 #include <glib.h>34 33 #include <wtf/RunLoop.h> 34 #include <wtf/glib/RunLoopSourcePriority.h> 35 35 36 36 static pthread_t mainThreadPthread; … … 43 43 : m_timer(RunLoop::main(), this, &MainThreadDispatcher::fired) 44 44 { 45 m_timer.setPriority( G_PRIORITY_HIGH_IDLE + 20);45 m_timer.setPriority(RunLoopSourcePriority::MainThreadDispatcherTimer); 46 46 } 47 47 -
trunk/Source/WTF/wtf/glib/RunLoopGLib.cpp
r213896 r215088 30 30 #include <glib.h> 31 31 #include <wtf/MainThread.h> 32 #include <wtf/glib/RunLoopSourcePriority.h> 32 33 33 34 namespace WTF { … … 61 62 62 63 m_source = adoptGRef(g_source_new(&runLoopSourceFunctions, sizeof(GSource))); 64 g_source_set_priority(m_source.get(), RunLoopSourcePriority::RunLoopDispatcher); 63 65 g_source_set_name(m_source.get(), "[WebKit] RunLoop work"); 64 66 g_source_set_can_recurse(m_source.get(), TRUE); … … 142 144 { 143 145 GRefPtr<GSource> source = adoptGRef(g_timeout_source_new(duration.millisecondsAs<guint>())); 146 g_source_set_priority(source.get(), RunLoopSourcePriority::RunLoopTimer); 144 147 g_source_set_name(source.get(), "[WebKit] RunLoop dispatchAfter"); 145 148 … … 157 160 , m_source(adoptGRef(g_source_new(&runLoopSourceFunctions, sizeof(GSource)))) 158 161 { 162 g_source_set_priority(m_source.get(), RunLoopSourcePriority::RunLoopTimer); 159 163 g_source_set_name(m_source.get(), "[WebKit] RunLoop::Timer work"); 160 164 g_source_set_callback(m_source.get(), [](gpointer userData) -> gboolean { -
trunk/Source/WTF/wtf/linux/MemoryPressureHandlerLinux.cpp
r213214 r215088 44 44 #if USE(GLIB) 45 45 #include <glib-unix.h> 46 #include <wtf/glib/RunLoopSourcePriority.h> 46 47 #endif 47 48 … … 104 105 #if USE(GLIB) 105 106 m_source = adoptGRef(g_source_new(&eventFDSourceFunctions, sizeof(EventFDSource))); 107 g_source_set_priority(m_source.get(), RunLoopSourcePriority::MemoryPressureHandlerTimer); 106 108 g_source_set_name(m_source.get(), "WTF: MemoryPressureHandler"); 107 109 if (!g_unix_set_fd_nonblocking(m_fd.value(), TRUE, nullptr)) { -
trunk/Source/WebCore/ChangeLog
r215087 r215088 1 2017-04-07 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 [GTK] Update the priorities used in glib main loop sources 4 https://bugs.webkit.org/show_bug.cgi?id=170457 5 6 Reviewed by Žan Doberšek. 7 8 * platform/glib/MainThreadSharedTimerGLib.cpp: 9 (WebCore::MainThreadSharedTimer::MainThreadSharedTimer): 10 * platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp: 11 (WebCore::TextureMapperPlatformLayerProxy::TextureMapperPlatformLayerProxy): 12 (WebCore::TextureMapperPlatformLayerProxy::activateOnCompositingThread): 13 1 14 2017-04-07 Zan Dobersek <zdobersek@igalia.com> 2 15 -
trunk/Source/WebCore/platform/glib/MainThreadSharedTimerGLib.cpp
r208415 r215088 29 29 #include "MainThreadSharedTimer.h" 30 30 31 #include < glib.h>31 #include <wtf/glib/RunLoopSourcePriority.h> 32 32 33 33 namespace WebCore { … … 36 36 : m_timer(RunLoop::main(), this, &MainThreadSharedTimer::fired) 37 37 { 38 // This is GDK_PRIORITY_REDRAW, but we don't want to depend on GDK here just to use a constant. 39 m_timer.setPriority(G_PRIORITY_HIGH_IDLE + 20); 38 m_timer.setPriority(RunLoopSourcePriority::MainThreadDispatcherTimer); 40 39 } 41 40 -
trunk/Source/WebCore/platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp
r211358 r215088 34 34 #include "TextureMapperPlatformLayerBuffer.h" 35 35 36 #if USE(GLIB_EVENT_LOOP) 37 #include <wtf/glib/RunLoopSourcePriority.h> 38 #endif 39 36 40 const double s_releaseUnusedSecondsTolerance = 1; 37 41 const double s_releaseUnusedBuffersTimerInterval = 0.5; … … 44 48 , m_releaseUnusedBuffersTimer(RunLoop::current(), this, &TextureMapperPlatformLayerProxy::releaseUnusedBuffersTimerFired) 45 49 { 50 #if USE(GLIB_EVENT_LOOP) 51 m_releaseUnusedBuffersTimer.setPriority(RunLoopSourcePriority::ReleaseUnusedResourcesTimer); 52 #endif 46 53 } 47 54 … … 68 75 69 76 m_compositorThreadUpdateTimer = std::make_unique<RunLoop::Timer<TextureMapperPlatformLayerProxy>>(RunLoop::current(), this, &TextureMapperPlatformLayerProxy::compositorThreadUpdateTimerFired); 77 #if USE(GLIB_EVENT_LOOP) 78 m_compositorThreadUpdateTimer->setPriority(RunLoopSourcePriority::CompositingThreadUpdateTimer); 79 #endif 70 80 } 71 81 -
trunk/Source/WebKit2/ChangeLog
r215084 r215088 1 2017-04-07 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 [GTK] Update the priorities used in glib main loop sources 4 https://bugs.webkit.org/show_bug.cgi?id=170457 5 6 Reviewed by Žan Doberšek. 7 8 * Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp: 9 (WebKit::CompositingRunLoop::CompositingRunLoop): 10 * UIProcess/DrawingAreaProxyImpl.cpp: 11 (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl): 12 (WebKit::DrawingAreaProxyImpl::DrawingMonitor::DrawingMonitor): 13 * UIProcess/gtk/WaylandCompositor.cpp: 14 (WebKit::createWaylandLoopSource): 15 * WebProcess/WebPage/AcceleratedDrawingArea.cpp: 16 (WebKit::AcceleratedDrawingArea::AcceleratedDrawingArea): 17 * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp: 18 (WebKit::CompositingCoordinator::CompositingCoordinator): 19 * WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h: 20 * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: 21 (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost): 22 * WebProcess/WebPage/DrawingAreaImpl.cpp: 23 (WebKit::DrawingAreaImpl::DrawingAreaImpl): 24 1 25 2017-04-06 Alex Christensen <achristensen@webkit.org> 2 26 -
trunk/Source/WebKit2/Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp
r211347 r215088 35 35 36 36 #if USE(GLIB_EVENT_LOOP) 37 #include < glib.h>37 #include <wtf/glib/RunLoopSourcePriority.h> 38 38 #endif 39 39 … … 114 114 { 115 115 #if USE(GLIB_EVENT_LOOP) 116 m_updateTimer.setPriority( G_PRIORITY_HIGH_IDLE);116 m_updateTimer.setPriority(RunLoopSourcePriority::CompositingThreadUpdateTimer); 117 117 #endif 118 118 } -
trunk/Source/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp
r210920 r215088 41 41 #endif 42 42 43 #if USE(GLIB_EVENT_LOOP) 44 #include <wtf/glib/RunLoopSourcePriority.h> 45 #endif 46 43 47 using namespace WebCore; 44 48 … … 49 53 , m_discardBackingStoreTimer(RunLoop::current(), this, &DrawingAreaProxyImpl::discardBackingStore) 50 54 { 55 #if USE(GLIB_EVENT_LOOP) 56 m_discardBackingStoreTimer.setPriority(RunLoopSourcePriority::ReleaseUnusedResourcesTimer); 57 #endif 51 58 } 52 59 … … 198 205 , m_timer(RunLoop::main(), this, &DrawingMonitor::stop) 199 206 { 207 #if USE(GLIB_EVENT_LOOP) 208 // Give redraws more priority. 209 m_timer.setPriority(GDK_PRIORITY_REDRAW - 10); 210 #endif 200 211 } 201 212 -
trunk/Source/WebKit2/UIProcess/gtk/WaylandCompositor.cpp
r209177 r215088 418 418 GRefPtr<GSource> source = adoptGRef(g_source_new(&waylandLoopSourceFunctions, sizeof(WaylandLoopSource))); 419 419 g_source_set_name(source.get(), "Nested Wayland compositor display event source"); 420 g_source_set_priority(source.get(), G_PRIORITY_DEFAULT + 1);421 420 422 421 auto* wlLoopSource = reinterpret_cast<WaylandLoopSource*>(source.get()); -
trunk/Source/WebKit2/WebProcess/WebPage/AcceleratedDrawingArea.cpp
r212608 r215088 39 39 #include <WebCore/Settings.h> 40 40 41 #if USE(GLIB_EVENT_LOOP) 42 #include <wtf/glib/RunLoopSourcePriority.h> 43 #endif 44 41 45 using namespace WebCore; 42 46 … … 55 59 , m_discardPreviousLayerTreeHostTimer(RunLoop::main(), this, &AcceleratedDrawingArea::discardPreviousLayerTreeHost) 56 60 { 61 #if USE(GLIB_EVENT_LOOP) 62 m_discardPreviousLayerTreeHostTimer.setPriority(RunLoopSourcePriority::ReleaseUnusedResourcesTimer); 63 #endif 57 64 if (!m_webPage.isVisible()) 58 65 suspendPainting(); -
trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp
r213214 r215088 40 40 #include <wtf/SetForScope.h> 41 41 42 #if USE(GLIB_EVENT_LOOP) 43 #include <wtf/glib/RunLoopSourcePriority.h> 44 #endif 45 42 46 using namespace WebCore; 43 47 … … 47 51 : m_page(page) 48 52 , m_client(client) 49 , m_releaseInactiveAtlasesTimer(*this, &CompositingCoordinator::releaseInactiveAtlasesTimerFired) 50 { 53 , m_releaseInactiveAtlasesTimer(RunLoop::main(), this, &CompositingCoordinator::releaseInactiveAtlasesTimerFired) 54 { 55 #if USE(GLIB_EVENT_LOOP) 56 m_releaseInactiveAtlasesTimer.setPriority(RunLoopSourcePriority::ReleaseUnusedResourcesTimer); 57 #endif 51 58 } 52 59 -
trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h
r213060 r215088 38 38 #include <WebCore/GraphicsLayerFactory.h> 39 39 #include <WebCore/IntRect.h> 40 #include <WebCore/Timer.h>41 40 42 41 namespace WebCore { … … 159 158 160 159 WebCore::FloatRect m_visibleContentsRect; 161 WebCore::Timerm_releaseInactiveAtlasesTimer;160 RunLoop::Timer<CompositingCoordinator> m_releaseInactiveAtlasesTimer; 162 161 163 162 double m_lastAnimationServiceTime { 0 }; -
trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp
r213060 r215088 43 43 #endif 44 44 45 #if USE(GLIB_EVENT_LOOP) 46 #include <wtf/glib/RunLoopSourcePriority.h> 47 #endif 48 45 49 using namespace WebCore; 46 50 … … 61 65 , m_layerFlushTimer(RunLoop::main(), this, &CoordinatedLayerTreeHost::layerFlushTimerFired) 62 66 { 67 #if USE(GLIB_EVENT_LOOP) 68 m_layerFlushTimer.setPriority(RunLoopSourcePriority::LayerFlushTimer); 69 #endif 63 70 m_coordinator.createRootLayer(m_webPage.size()); 64 71 -
trunk/Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.cpp
r213566 r215088 38 38 #include <WebCore/Settings.h> 39 39 40 #if USE(GLIB_EVENT_LOOP) 41 #include <wtf/glib/RunLoopSourcePriority.h> 42 #endif 43 40 44 using namespace WebCore; 41 45 … … 50 54 , m_displayTimer(RunLoop::main(), this, &DrawingAreaImpl::displayTimerFired) 51 55 { 56 #if USE(GLIB_EVENT_LOOP) 57 m_displayTimer.setPriority(RunLoopSourcePriority::NonAcceleratedDrawingTimer); 58 #endif 52 59 } 53 60
Note:
See TracChangeset
for help on using the changeset viewer.