зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1359061 - Report WR state via ScopedGfxFeatureReporter in all processes. r=dvander
We were only reporting the WR feature state in crash reports from the parent process. However, it would be useful to have in GPU and content process crash reports as well, so use the ScopedGfxFeatureReporter in those processes as well. MozReview-Commit-ID: Em37uLVPboK --HG-- extra : rebase_source : c5bae376d084b7579308dcf1f5fb6186a231a868
This commit is contained in:
Родитель
c698fcb0ec
Коммит
c9e542c4d7
|
@ -710,9 +710,7 @@ gfxPlatform::Init()
|
|||
#error "No gfxPlatform implementation available"
|
||||
#endif
|
||||
gPlatform->InitAcceleration();
|
||||
if (XRE_IsParentProcess()) {
|
||||
gPlatform->InitWebRenderConfig();
|
||||
}
|
||||
gPlatform->InitWebRenderConfig();
|
||||
|
||||
if (gfxConfig::IsEnabled(Feature::GPU_PROCESS)) {
|
||||
GPUProcessManager* gpu = GPUProcessManager::Get();
|
||||
|
@ -2337,6 +2335,19 @@ gfxPlatform::InitCompositorAccelerationPrefs()
|
|||
void
|
||||
gfxPlatform::InitWebRenderConfig()
|
||||
{
|
||||
bool prefEnabled = Preferences::GetBool("gfx.webrender.enabled", false);
|
||||
|
||||
ScopedGfxFeatureReporter reporter("WR", prefEnabled);
|
||||
if (!XRE_IsParentProcess()) {
|
||||
// The parent process runs through all the real decision-making code
|
||||
// later in this function. For other processes we still want to report
|
||||
// the state of the feature for crash reports.
|
||||
if (gfxVars::UseWebRender()) {
|
||||
reporter.SetSuccessful();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
FeatureState& featureWebRender = gfxConfig::GetFeature(Feature::WEBRENDER);
|
||||
|
||||
featureWebRender.DisableByDefault(
|
||||
|
@ -2344,13 +2355,10 @@ gfxPlatform::InitWebRenderConfig()
|
|||
"WebRender is an opt-in feature",
|
||||
NS_LITERAL_CSTRING("FEATURE_FAILURE_DEFAULT_OFF"));
|
||||
|
||||
bool prefEnabled = Preferences::GetBool("gfx.webrender.enabled", false);
|
||||
if (prefEnabled) {
|
||||
featureWebRender.UserEnable("Enabled by pref");
|
||||
}
|
||||
|
||||
ScopedGfxFeatureReporter reporter("WR", prefEnabled);
|
||||
|
||||
// WebRender relies on the GPU process when on Windows
|
||||
#ifdef XP_WIN
|
||||
if (!gfxConfig::IsEnabled(Feature::GPU_PROCESS)) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче