Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GTK] Switch back to 0 painting threads #10830

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,25 +36,21 @@ namespace Nicosia {

std::unique_ptr<PaintingEngine> PaintingEngine::create()
{
#if (ENABLE(DEVELOPER_MODE) && PLATFORM(WPE)) || USE(GTK4)
#if USE(GTK4)
unsigned numThreads = 1;
#else
// numThreads defaults to 0 because neither the WPE nor the GTK painting
// code is thread safe.
// https://bugs.webkit.org/show_bug.cgi?id=251977#c8
unsigned numThreads = 0;
#endif
if (const char* numThreadsEnv = getenv("WEBKIT_NICOSIA_PAINTING_THREADS")) {
if (sscanf(numThreadsEnv, "%u", &numThreads) == 1) {
if (numThreads > 8) {
WTFLogAlways("The number of Nicosia painting threads is not between 1 and 8. Using the default value 4\n");
numThreads = 4;
WTFLogAlways("The number of Nicosia painting threads is not between 0 and 8. Using the default value 0\n");
numThreads = 0;
}
}
}

if (numThreads)
return std::unique_ptr<PaintingEngine>(new PaintingEngineThreaded(numThreads));
#endif

return std::unique_ptr<PaintingEngine>(new PaintingEngineBasic);
}

Expand Down