Bug 1448993 - Ensure the GPU process reports WR enabled-ness in crash reports. r=jrmuizel

MozReview-Commit-ID: KOMAm8YH3RV

--HG--
extra : rebase_source : a650bda0e51b64bdaa2032cab3707b6ef9587f72
This commit is contained in:
Kartikaya Gupta 2018-03-26 18:44:04 -04:00
parent 4187126920
commit 79451cb5d2

View File

@ -8,6 +8,7 @@
#endif
#include "GPUParent.h"
#include "gfxConfig.h"
#include "gfxCrashReporterUtils.h"
#include "gfxPlatform.h"
#include "gfxPrefs.h"
#include "GPUProcessHost.h"
@ -201,6 +202,14 @@ GPUParent::RecvInit(nsTArray<GfxPrefSetting>&& prefs,
gfxConfig::Inherit(Feature::ADVANCED_LAYERS, devicePrefs.advancedLayers());
gfxConfig::Inherit(Feature::DIRECT2D, devicePrefs.useD2D1());
{ // Let the crash reporter know if we've got WR enabled or not. For other
// processes this happens in gfxPlatform::InitWebRenderConfig.
ScopedGfxFeatureReporter reporter("WR", gfxPlatform::WebRenderPrefEnabled());
if (gfxVars::UseWebRender()) {
reporter.SetSuccessful();
}
}
for (const LayerTreeIdMapping& map : aMappings) {
LayerTreeOwnerTracker::Get()->Map(map.layersId(), map.ownerId());
}