Skip to content

Commit

Permalink
Bug 600620 - 2/2 - Expose feature status block reason in about:suppor…
Browse files Browse the repository at this point in the history
…t - r=jmuizelaar, a=blocking2.0-b7

--HG--
branch : GECKO20b7pre_20101006_RELBRANCH
  • Loading branch information
Benoit Jacob committed Oct 7, 2010
1 parent d8cdc91 commit d5c106c
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 3 deletions.
21 changes: 20 additions & 1 deletion toolkit/content/aboutSupport.js
Expand Up @@ -187,10 +187,29 @@ function populateGraphicsSection() {
createHeader(bundle.GetStringFromName("driverDate")),
createElement("td", gfxInfo.adapterDriverDate),
]));

var d2dEnabled = gfxInfo.D2DEnabled;
var d2dMessage = d2dEnabled;
if (!d2dEnabled) {
var d2dStatus = gfxInfo.getFeatureStatus(gfxgfxInfoInfo.FEATURE_DIRECT2D);
if (d2dStatus == gfxInfo.FEATURE_BLOCKED_DEVICE ||
d2dStatus == gfxInfo.FEATURE_DISCOURAGED)
{
d2dMessage = bundle.GetStringFromName("blockedGraphicsCard");
}
else if (d2dStatus == gfxInfo.FEATURE_BLOCKED_DRIVER_VERSION)
{
var d2dSuggestedDriverVersion = gfxInfo.getFeatureSuggestedDriverVersion(gfxInfo.FEATURE_DIRECT2D);
if (d2dSuggestedDriverVersion) {
d2dMessage += bundle.GetStringFromName("tryNewerDriverVersion").replace("%1", d2dSuggestedDriverVersion);
}
}
}
trGraphics.push(createParentElement("tr", [
createHeader(bundle.GetStringFromName("direct2DEnabled")),
createElement("td", gfxInfo.D2DEnabled),
createElement("td", d2dMessage),
]));

trGraphics.push(createParentElement("tr", [
createHeader(bundle.GetStringFromName("directWriteEnabled")),
createElement("td", gfxInfo.DWriteEnabled),
Expand Down
7 changes: 7 additions & 0 deletions toolkit/locales/en-US/chrome/global/aboutSupport.properties
Expand Up @@ -7,6 +7,13 @@
# "GPU Accelerated Windows: 0/2"
acceleratedWindows = GPU Accelerated Windows

# LOCALIZATION NOTE The verb "blocked" here refers to a graphics feature such as "Direct2D" or "OpenGL layers".
# The %1 here is a placeholder, leave unchanged, it will get replaced by the driver version string.
tryNewerDriverVersion = Blocked on your graphics driver. Try updating your graphics driver to version %1 or newer.

# LOCALIZATION NOTE The verb "blocked" here refers to a graphics feature such as "Direct2D" or "OpenGL layers".
blockedGraphicsCard = Blocked on your graphics card because of unresolved driver issues.

direct2DEnabled = Direct2D Enabled
directWriteEnabled = DirectWrite Enabled
adapterDescription = Adapter Description
Expand Down
4 changes: 2 additions & 2 deletions widget/src/cocoa/GfxInfo.mm
Expand Up @@ -182,14 +182,14 @@
NS_IMETHODIMP
GfxInfo::GetFeatureStatus(PRInt32 aFeature, PRInt32 *aStatus)
{
PRInt32 status = nsIGfxInfo::FEATURE_STATUS_UNKNOWN;
PRInt32 status = nsIGfxInfo::FEATURE_NO_INFO;

for (PRUint32 i = 0; i < NS_ARRAY_LENGTH(mRendererIDs); ++i) {
PRUint32 r = mRendererIDs[i];

if (aFeature == nsIGfxInfo::FEATURE_OPENGL_LAYERS) {
if (r == kCGLRendererATIRadeonX1000ID)
status = nsIGfxInfo::FEATURE_BLOCKED;
status = nsIGfxInfo::FEATURE_BLOCKED_DEVICE;
}
}

Expand Down

0 comments on commit d5c106c

Please sign in to comment.