mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 10:44:56 +00:00
Bug 1302240 - Report content backend to telemetry. r=dvander
This commit is contained in:
parent
05a47f9aef
commit
200e76f295
@ -1316,6 +1316,7 @@ EnvironmentCache.prototype = {
|
||||
let gfxData = {
|
||||
D2DEnabled: getGfxField("D2DEnabled", null),
|
||||
DWriteEnabled: getGfxField("DWriteEnabled", null),
|
||||
ContentBackend: getGfxField("ContentBackend", null),
|
||||
// The following line is disabled due to main thread jank and will be enabled
|
||||
// again as part of bug 1154500.
|
||||
//DWriteVersion: getGfxField("DWriteVersion", null),
|
||||
|
@ -1400,6 +1400,33 @@ GfxInfoBase::GetActiveCrashGuards(JSContext* aCx, JS::MutableHandle<JS::Value> a
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
GfxInfoBase::GetContentBackend(nsAString & aContentBackend)
|
||||
{
|
||||
BackendType backend = gfxPlatform::GetPlatform()->GetDefaultContentBackend();
|
||||
nsString outStr;
|
||||
|
||||
switch (backend) {
|
||||
case BackendType::DIRECT2D1_1: {
|
||||
outStr.AppendPrintf("Direct2D 1.1");
|
||||
break;
|
||||
}
|
||||
case BackendType::SKIA: {
|
||||
outStr.AppendPrintf("Skia");
|
||||
break;
|
||||
}
|
||||
case BackendType::CAIRO: {
|
||||
outStr.AppendPrintf("Cairo");
|
||||
break;
|
||||
}
|
||||
default:
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
aContentBackend.Assign(outStr);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
GfxInfoCollectorBase::GfxInfoCollectorBase()
|
||||
{
|
||||
GfxInfoBase::AddCollector(this);
|
||||
|
@ -58,6 +58,7 @@ public:
|
||||
NS_IMETHOD GetFeatures(JSContext*, JS::MutableHandle<JS::Value>) override;
|
||||
NS_IMETHOD GetFeatureLog(JSContext*, JS::MutableHandle<JS::Value>) override;
|
||||
NS_IMETHOD GetActiveCrashGuards(JSContext*, JS::MutableHandle<JS::Value>) override;
|
||||
NS_IMETHOD GetContentBackend(nsAString & aContentBackend) override;
|
||||
|
||||
// Initialization function. If you override this, you must call this class's
|
||||
// version of Init first.
|
||||
|
@ -18,6 +18,11 @@ interface nsIGfxInfo : nsISupports
|
||||
readonly attribute DOMString DWriteVersion;
|
||||
readonly attribute DOMString cleartypeParameters;
|
||||
|
||||
/*
|
||||
* These are valid across all platforms.
|
||||
*/
|
||||
readonly attribute DOMString ContentBackend;
|
||||
|
||||
// XXX: Switch to a list of devices, rather than explicitly numbering them.
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user