⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 263888 in webkit


Ignore:
Timestamp:
Jul 3, 2020, 2:06:00 AM (6 years ago)
Author:
commit-queue@webkit.org
Message:

[GTK4] Enable threaded rendering by default
​https://bugs.webkit.org/show_bug.cgi?id=213883

Patch by Carlos Garcia Campos <​cgarcia@igalia.com> on 2020-07-03
Reviewed by Adrian Perez de Castro.

When building with GTK4 we no longer use the cairo context to render directly, so we can always enable the
threaded rendering. In WPE port threaded rendering is only enabled when env var WEBKIT_NICOSIA_PAINTING_THREADS
is present. This patch changes a bit the meaning of the env var, so that when 0 is passed the feature is
disabled too, instead of setting the number of threads to 4.

  • platform/graphics/nicosia/NicosiaPaintingEngine.cpp:

(Nicosia::PaintingEngine::create):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r263883 r263888  
     12020-07-03  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        [GTK4] Enable threaded rendering by default
     4        https://bugs.webkit.org/show_bug.cgi?id=213883
     5
     6        Reviewed by Adrian Perez de Castro.
     7
     8        When building with GTK4 we no longer use the cairo context to render directly, so we can always enable the
     9        threaded rendering. In WPE port threaded rendering is only enabled when env var WEBKIT_NICOSIA_PAINTING_THREADS
     10        is present. This patch changes a bit the meaning of the env var, so that when 0 is passed the feature is
     11        disabled too, instead of setting the number of threads to 4.
     12
     13        * platform/graphics/nicosia/NicosiaPaintingEngine.cpp:
     14        (Nicosia::PaintingEngine::create):
     15
    1162020-07-02  Mark Lam  <mark.lam@apple.com>
    217
  • trunk/Source/WebCore/platform/graphics/nicosia/NicosiaPaintingEngine.cpp

    r241654 r263888  
    3737std::unique_ptr<PaintingEngine> PaintingEngine::create()
    3838{
    39 #if ENABLE(DEVELOPER_MODE) && PLATFORM(WPE)
     39#if (ENABLE(DEVELOPER_MODE) && PLATFORM(WPE)) || USE(GTK4)
     40#if USE(GTK4)
     41    unsigned numThreads = 4;
     42#else
     43    unsigned numThreads = 0;
     44#endif
    4045    if (const char* numThreadsEnv = getenv("WEBKIT_NICOSIA_PAINTING_THREADS")) {
    41         unsigned numThreads = 0;
    4246        if (sscanf(numThreadsEnv, "%u", &numThreads) == 1) {
    43             if (numThreads < 1 || numThreads > 8) {
     47            if (numThreads > 8) {
    4448                WTFLogAlways("The number of Nicosia painting threads is not between 1 and 8. Using the default value 4\n");
    4549                numThreads = 4;
    4650            }
    47 
    48             return std::unique_ptr<PaintingEngine>(new PaintingEngineThreaded(numThreads));
    4951        }
    5052    }
     53
     54    if (numThreads)
     55        return std::unique_ptr<PaintingEngine>(new PaintingEngineThreaded(numThreads));
    5156#endif
    5257
Note: See TracChangeset for help on using the changeset viewer.