Bug 1342488 - Allow enabling webrender with an environment variable. r=rhunt

This simplifies plumbing it through mozharness for automated testing, because
mozharness doesn't already have the ability to set prefs for all the different
kinds of test suites. It can set environment variables though.

MozReview-Commit-ID: BdsH09WTqO4
This commit is contained in:
Kartikaya Gupta 2017-05-13 07:47:40 -04:00
Родитель 89d7ae886a
Коммит 06d6b428cc
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -2340,6 +2340,11 @@ gfxPlatform::InitWebRenderConfig()
if (prefEnabled) {
featureWebRender.UserEnable("Enabled by pref");
} else {
const char* env = PR_GetEnv("MOZ_WEBRENDER");
if (env && *env == '1') {
featureWebRender.UserEnable("Enabled by envvar");
}
}
// WebRender relies on the GPU process when on Windows