Skip to content

Commit 5b1595a

Browse files
committed
Use CPU rendering by default and rename env var with the number of threads
1 parent 7a0c9c9 commit 5b1595a

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

Source/WebCore/platform/graphics/skia/SkiaPaintingEngine.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ unsigned SkiaPaintingEngine::numberOfCPUPaintingThreads()
307307
std::call_once(onceFlag, [] {
308308
numberOfThreads = std::max(1, std::min(8, WTF::numberOfProcessorCores() / 2)); // By default, use half the CPU cores, capped at 8.
309309

310-
if (const char* envString = getenv("WEBKIT_SKIA_CPU_PAINTING_THREADS")) {
310+
if (const char* envString = getenv("WEBKIT_NICOSIA_PAINTING_THREADS")) {
311311
auto newValue = parseInteger<unsigned>(StringView::fromLatin1(envString));
312312
if (newValue && *newValue <= 8)
313313
numberOfThreads = *newValue;

Source/WebKit/WebProcess/glib/WebProcessGLib.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,9 @@ void WebProcess::platformInitializeWebProcess(WebProcessCreationParameters& para
173173
{
174174
#if USE(SKIA)
175175
const char* enableCPURendering = getenv("WEBKIT_SKIA_ENABLE_CPU_RENDERING");
176-
if (enableCPURendering && strcmp(enableCPURendering, "0"))
176+
if (enableCPURendering && !strcmp(enableCPURendering, "0"))
177+
ProcessCapabilities::setCanUseAcceleratedBuffers(true);
178+
else
177179
ProcessCapabilities::setCanUseAcceleratedBuffers(false);
178180
#endif
179181

0 commit comments

Comments
 (0)