зеркало из https://github.com/mozilla/gecko-dev.git
Enable parallel painting on OSX and cap the amount of paint workers to 4. (bug 1430793, r=milan)
--HG-- extra : rebase_source : 9d5c853f84b160819540cc062fb84f4bea8fcb02
This commit is contained in:
Родитель
a87c1eea8d
Коммит
43118373ed
|
@ -137,13 +137,10 @@ PaintThread::CalculatePaintWorkerCount()
|
||||||
|
|
||||||
int32_t workerCount = gfxPrefs::LayersOMTPPaintWorkers();
|
int32_t workerCount = gfxPrefs::LayersOMTPPaintWorkers();
|
||||||
|
|
||||||
// If not manually specified, default to (cpuCores * 3) / 4
|
// If not manually specified, default to (cpuCores * 3) / 4, and clamp
|
||||||
|
// between 1 and 4. If a user wants more, they can manually specify it
|
||||||
if (workerCount < 1) {
|
if (workerCount < 1) {
|
||||||
workerCount = std::max((cpuCores * 3) / 4, 1);
|
workerCount = std::min(std::max((cpuCores * 3) / 4, 1), 4);
|
||||||
|
|
||||||
if (workerCount > 32) {
|
|
||||||
workerCount = 32;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return workerCount;
|
return workerCount;
|
||||||
|
|
|
@ -5935,5 +5935,9 @@ pref("layers.omtp.enabled", true);
|
||||||
#else
|
#else
|
||||||
pref("layers.omtp.enabled", false);
|
pref("layers.omtp.enabled", false);
|
||||||
#endif
|
#endif
|
||||||
pref("layers.omtp.release-capture-on-main-thread", false);
|
#if defined(XP_MACOSX)
|
||||||
|
pref("layers.omtp.paint-workers", -1);
|
||||||
|
#else
|
||||||
pref("layers.omtp.paint-workers", 1);
|
pref("layers.omtp.paint-workers", 1);
|
||||||
|
#endif
|
||||||
|
pref("layers.omtp.release-capture-on-main-thread", false);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче