pkgsrc/www/firefox68/patches/patch-gfx_thebes_gfxPlatform.cpp
nia 75e021a025 firefox68: Remove hack to disable multiprocess mode
This was working around the lack of pshared semaphores on older NetBSD
releases, and restrictions on which process can destroy semaphores
on newer NetBSD releases.

However, we've switched to a new NetBSD-exclusive hack in www/firefox
where we force the use of the tiled rendering mode. This copies what
Firefox does on macOS, which has similar limitations on cross-process
semaphores. The discovery of this was a joint effort between maya
and me.

This avoids several bugs:

1) Multiprocess mode being outright broken on older NetBSD releases
2) Multiprocess mode leaking semaphores and eventually hitting open
   file limits on newer NetBSD releases

Bump PKGREVISION
2020-06-15 10:04:03 +00:00

28 lines
977 B
C++

$NetBSD: patch-gfx_thebes_gfxPlatform.cpp,v 1.1 2020/06/15 10:04:04 nia Exp $
Don't rely on CrossProcessSemaphore on NetBSD. It has some implementation
issues that cause issues (kern/55386, not available on NetBSD<9)
This idea is borrowed from macOS which has the same limitation.
--- gfx/thebes/gfxPlatform.cpp.orig 2020-05-28 00:01:45.000000000 +0000
+++ gfx/thebes/gfxPlatform.cpp
@@ -2991,6 +2991,10 @@ bool gfxPlatform::UsesOffMainThreadCompo
}
bool gfxPlatform::UsesTiling() const {
+#ifdef __NetBSD__
+ // Avoid relying on CrossProcessSemaphore
+ return true;
+#else
bool usesSkia = GetDefaultContentBackend() == BackendType::SKIA;
// We can't just test whether the PaintThread is initialized here because
@@ -3002,6 +3006,7 @@ bool gfxPlatform::UsesTiling() const {
return gfxPrefs::LayersTilesEnabled() ||
(gfxPrefs::LayersTilesEnabledIfSkiaPOMTP() && usesSkia && usesPOMTP);
+#endif
}
bool gfxPlatform::ContentUsesTiling() const {