Ignore:
Timestamp:
Apr 7, 2017, 3:43:43 AM (8 years ago)
Author:
Carlos Garcia Campos
Message:

[GTK] Update the priorities used in glib main loop sources
https://bugs.webkit.org/show_bug.cgi?id=170457

Reviewed by Žan Doberšek.

Source/JavaScriptCore:

  • runtime/JSRunLoopTimer.cpp:

(JSC::JSRunLoopTimer::JSRunLoopTimer):

Source/WebCore:

  • platform/glib/MainThreadSharedTimerGLib.cpp:

(WebCore::MainThreadSharedTimer::MainThreadSharedTimer):

  • platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp:

(WebCore::TextureMapperPlatformLayerProxy::TextureMapperPlatformLayerProxy):
(WebCore::TextureMapperPlatformLayerProxy::activateOnCompositingThread):

Source/WebKit2:

  • Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp:

(WebKit::CompositingRunLoop::CompositingRunLoop):

  • UIProcess/DrawingAreaProxyImpl.cpp:

(WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
(WebKit::DrawingAreaProxyImpl::DrawingMonitor::DrawingMonitor):

  • UIProcess/gtk/WaylandCompositor.cpp:

(WebKit::createWaylandLoopSource):

  • WebProcess/WebPage/AcceleratedDrawingArea.cpp:

(WebKit::AcceleratedDrawingArea::AcceleratedDrawingArea):

  • WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:

(WebKit::CompositingCoordinator::CompositingCoordinator):

  • WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.h:
  • WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:

(WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):

  • WebProcess/WebPage/DrawingAreaImpl.cpp:

(WebKit::DrawingAreaImpl::DrawingAreaImpl):

Source/WTF:

Add an enum to define prirorities used in different GLib main sources. It allows to give them a better name
than high, low, medium, etc., but also to document them and other GLib based ports can define their own
values without changing all the places where they are used. The default values are based on the priorities
pre-defined by GLib.

  • wtf/glib/MainThreadGLib.cpp:

(WTF::MainThreadDispatcher::MainThreadDispatcher):

  • wtf/glib/RunLoopGLib.cpp:

(WTF::RunLoop::RunLoop):
(WTF::RunLoop::dispatchAfter):
(WTF::RunLoop::TimerBase::TimerBase):

  • wtf/glib/RunLoopSourcePriority.h: Added.
  • wtf/linux/MemoryPressureHandlerLinux.cpp:

(WTF::MemoryPressureHandler::EventFDPoller::EventFDPoller):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/runtime/JSRunLoopTimer.cpp

    r214732 r215088  
    3838#if USE(GLIB)
    3939#include <glib.h>
     40#include <wtf/glib/RunLoopSourcePriority.h>
    4041#endif
    4142
     
    134135    , m_timer(adoptGRef(g_source_new(&JSRunLoopTimerSourceFunctions, sizeof(GSource))))
    135136{
     137    g_source_set_priority(m_timer.get(), RunLoopSourcePriority::JavascriptTimer);
    136138    g_source_set_name(m_timer.get(), "[JavaScriptCore] JSRunLoopTimer");
    137139    g_source_set_callback(m_timer.get(), [](gpointer userData) -> gboolean {
Note: See TracChangeset for help on using the changeset viewer.