Title: [263888] trunk/Source/WebCore
- Revision
- 263888
- Author
- [email protected]
- Date
- 2020-07-03 02:06:00 -0700 (Fri, 03 Jul 2020)
Log Message
[GTK4] Enable threaded rendering by default
https://bugs.webkit.org/show_bug.cgi?id=213883
Patch by Carlos Garcia Campos <[email protected]> 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):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (263887 => 263888)
--- trunk/Source/WebCore/ChangeLog 2020-07-03 08:37:56 UTC (rev 263887)
+++ trunk/Source/WebCore/ChangeLog 2020-07-03 09:06:00 UTC (rev 263888)
@@ -1,3 +1,18 @@
+2020-07-03 Carlos Garcia Campos <[email protected]>
+
+ [GTK4] Enable threaded rendering by default
+ https://bugs.webkit.org/show_bug.cgi?id=213883
+
+ 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):
+
2020-07-02 Mark Lam <[email protected]>
ReadableStream::create() should handle any exceptions that may be thrown during construction.
Modified: trunk/Source/WebCore/platform/graphics/nicosia/NicosiaPaintingEngine.cpp (263887 => 263888)
--- trunk/Source/WebCore/platform/graphics/nicosia/NicosiaPaintingEngine.cpp 2020-07-03 08:37:56 UTC (rev 263887)
+++ trunk/Source/WebCore/platform/graphics/nicosia/NicosiaPaintingEngine.cpp 2020-07-03 09:06:00 UTC (rev 263888)
@@ -36,18 +36,23 @@
std::unique_ptr<PaintingEngine> PaintingEngine::create()
{
-#if ENABLE(DEVELOPER_MODE) && PLATFORM(WPE)
+#if (ENABLE(DEVELOPER_MODE) && PLATFORM(WPE)) || USE(GTK4)
+#if USE(GTK4)
+ unsigned numThreads = 4;
+#else
+ unsigned numThreads = 0;
+#endif
if (const char* numThreadsEnv = getenv("WEBKIT_NICOSIA_PAINTING_THREADS")) {
- unsigned numThreads = 0;
if (sscanf(numThreadsEnv, "%u", &numThreads) == 1) {
- if (numThreads < 1 || numThreads > 8) {
+ if (numThreads > 8) {
WTFLogAlways("The number of Nicosia painting threads is not between 1 and 8. Using the default value 4\n");
numThreads = 4;
}
-
- return std::unique_ptr<PaintingEngine>(new PaintingEngineThreaded(numThreads));
}
}
+
+ if (numThreads)
+ return std::unique_ptr<PaintingEngine>(new PaintingEngineThreaded(numThreads));
#endif
return std::unique_ptr<PaintingEngine>(new PaintingEngineBasic);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes