Expose feature status block reason so that it can be used by about:support

RESOLVED FIXED in mozilla2.0b7

Status

()

Core
Graphics
RESOLVED FIXED
7 years ago
6 years ago

People

(Reporter: jrmuizel, Assigned: bjacob)

Tracking

(Blocks: 1 bug)

Trunk
mozilla2.0b7
x86
Windows 7
Points:
---

Firefox Tracking Flags

(blocking2.0 beta7+)

Details

(Whiteboard: [strings])

Attachments

(8 attachments, 5 obsolete attachments)

14.07 KB, patch
vlad
: review+
Details | Diff | Splinter Review
3.01 KB, patch
jrmuizel
: review+
Details | Diff | Splinter Review
14.54 KB, patch
bjacob
: review+
Details | Diff | Splinter Review
4.28 KB, patch
bjacob
: review+
Details | Diff | Splinter Review
47.32 KB, image/jpeg
Details
3.30 KB, patch
jrmuizel
: review+
Details | Diff | Splinter Review
3.43 KB, patch
bjacob
: review+
Details | Diff | Splinter Review
38.81 KB, image/jpeg
Details
Comment hidden (empty)
(Reporter)

Updated

7 years ago
Assignee: nobody → bjacob
(Reporter)

Updated

7 years ago
Blocks: 594045
(Assignee)

Comment 1

7 years ago
Created attachment 479904 [details] [diff] [review]
part 1: rework gfxinfo

This patch changes the different possible feature statuses, and adds API to know when updating graphics driver to a particular version might help.

FEATURE_AVAILABLE is removed because GetFeatureStatus can't know about that.
So FEATURE_AVAILABLE and FEATURE_STATUS_UNKNOWN are replaced by FEATURE_NO_INFO because that's really what it means. "no info" is the good case since GfxInfo records negative info about graphics cards.

FEATURE_BLOCKED is split in two cases: BLOCKED_DEVICE and BLOCKED_DRIVER_VERSION.

FEATURE_NOT_SUGGESTED is renamed to FEATURE_DISCOURAGED because that made it easier for me to write comments in english without double negations.

The other part of the changes is the new GetFeatureSuggestedDriverVersion().

The implementation is shared in the -Impl function.
Attachment #479904 - Flags: review?(vladimir)
(Assignee)

Comment 2

7 years ago
Created attachment 479905 [details] [diff] [review]
part 2: improve about:support

This patch uses the new feature statuses and GetFeatureSuggestedDriverVersion() to give useful info in about:support, for Direct2D.

It would be nice to do the same for other features now, if you agree.
Attachment #479905 - Flags: review?(jmuizelaar)
Attachment #479904 - Flags: review?(vladimir) → review+
(Assignee)

Comment 3

7 years ago
Created attachment 479936 [details] [diff] [review]
part 2: improve about:support

reworked to be localizable.

i hope you appreciate every byte of it --- having forgotten double quotes in GetStringFromName took me 1 hour to debug X-(
Attachment #479905 - Attachment is obsolete: true
Attachment #479936 - Flags: review?(jmuizelaar)
Attachment #479905 - Flags: review?(jmuizelaar)
(Assignee)

Updated

7 years ago
Duplicate of this bug: 594045

Comment 5

7 years ago
Good job !
Is it possible to add in the patch the enhancement of bug 591627 about WebGL status or do you prefer to keep it separate ?
Blocks: 594464
No longer blocks: 594045
Version: unspecified → Trunk
(Assignee)

Comment 6

7 years ago
Well, let's keep it separate, but thanks for reminding me of it.

I'm wondering whether to try to push this into b7... on the one hand it's useful for users. on the other hand it touches intel-specific code that I have a hard time testing (everytime I need to edit the code to make it believe I have a intel card...) so I'm afraid of regressions. Perhaps push right after b7.

Comment 7

7 years ago
Provide a link to your try server build if you want somebody to test things.
(Assignee)

Comment 8

7 years ago
True! Will do ASAP.
(Reporter)

Comment 9

7 years ago
Comment on attachment 479936 [details] [diff] [review]
part 2: improve about:support

># HG changeset patch
># Parent 639883d9cc6141901e25c86bd8e398f8f2191f34
>
>diff --git a/toolkit/content/aboutSupport.js b/toolkit/content/aboutSupport.js
>--- a/toolkit/content/aboutSupport.js
>+++ b/toolkit/content/aboutSupport.js
>@@ -182,20 +182,39 @@ function populateGraphicsSection() {
>     trGraphics.push(createParentElement("tr", [
>       createHeader(bundle.GetStringFromName("driverVersion")),
>       createElement("td", gfxInfo.adapterDriverVersion),
>     ]));
>     trGraphics.push(createParentElement("tr", [
>       createHeader(bundle.GetStringFromName("driverDate")),
>       createElement("td", gfxInfo.adapterDriverDate),
>     ]));
>+
>+    var d2dEnabled = gfxInfo.D2DEnabled;
>+    var d2dMessage = d2dEnabled;

A blank line here would be nice.
Attachment #479936 - Flags: review?(jmuizelaar) → review+
We need to get this in for b7, cause it contains strings.
blocking2.0: --- → beta7+
Whiteboard: [strings]
http://hg.mozilla.org/mozilla-central/rev/638ce363a9b1
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
http://hg.mozilla.org/mozilla-central/rev/f9ef76b7dbc2
Created attachment 481349 [details] [diff] [review]
part 1 -- LAND ME!

land this new version of the patch. carried forward r+.
Attachment #481349 - Flags: review+
Created attachment 481350 [details] [diff] [review]
part 2 -- LAND ME!

land this new version of the patch. carried forward r+.
Attachment #481350 - Flags: review+
Created attachment 481352 [details] [diff] [review]
part 1 -- LAND ME!

grrr, this one should be good.
Attachment #481349 - Attachment is obsolete: true
Attachment #481352 - Flags: review+
Created attachment 481353 [details] [diff] [review]
part 2 -- LAND ME!

grr.
Attachment #481350 - Attachment is obsolete: true
Attachment #481353 - Flags: review+
(Assignee)

Updated

7 years ago
Status: RESOLVED → REOPENED
Keywords: checkin-needed
Resolution: FIXED → ---
I landed this on mozilla-central:

http://hg.mozilla.org/mozilla-central/rev/999e367a2e1d
http://hg.mozilla.org/mozilla-central/rev/c592fd144de0

and on the 4.0b7 relbranch:
http://hg.mozilla.org/mozilla-central/rev/9c335c3700f8
http://hg.mozilla.org/mozilla-central/rev/bab601c0c084
Status: REOPENED → RESOLVED
Last Resolved: 7 years ago7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b7
Keywords: checkin-needed

Comment 18

7 years ago
Created attachment 481442 [details]
screenshot

no graphics information.
intended ?
Could you explain where these two strings should be displayed? A screenshot would be really helpful.

Comment 20

7 years ago
(In reply to comment #19)
> Could you explain where these two strings should be displayed? A screenshot
> would be really helpful.

in about:support, at the bottom

(In reply to comment #18)
> Created attachment 481442 [details]
> screenshot
> 
> no graphics information.
> intended ?

Same for me. I lost all details about my graphics card (the same one, no Direct2D or DirectWrite).
Sorry guys, this would be my fault. I'm trying to fix this now.

(What happens is that somehow JS exceptions in this page are silent, don't give nice error messages in the console... making it tricky to debug)
(In reply to comment #21)
> Sorry guys, this would be my fault. I'm trying to fix this now.
> 
> (What happens is that somehow JS exceptions in this page are silent, don't give
> nice error messages in the console... making it tricky to debug)

You have to use the error console for chrome pages, not the web console...
Created attachment 481537 [details] [diff] [review]
fix about:support

Here's the fix, I had gfxgfxInfoInfo instead of gfxInfo, and Firefox was not able to give me any syntax error about that.
Attachment #481537 - Flags: review?
(Assignee)

Updated

7 years ago
Attachment #481537 - Flags: review? → review?(jmuizelaar)
(In reply to comment #22)
> (In reply to comment #21)
> > Sorry guys, this would be my fault. I'm trying to fix this now.
> > 
> > (What happens is that somehow JS exceptions in this page are silent, don't give
> > nice error messages in the console... making it tricky to debug)
> 
> You have to use the error console for chrome pages, not the web console...

I am using the error console!
(In reply to comment #19)
> Could you explain where these two strings should be displayed? A screenshot
> would be really helpful.

I believe that the reason why you were confused was the bug that was discussed above, making the graphics section not show up, sorry. This is fixed by the patch I just attached. Once this patch is pushed, the information should show up currently in the 'Direct2D' line of the graphics section of about:support; eventually, these strings could get used for other graphics features than Direct2D.
That's buggy. :)
(In reply to comment #25)
> I believe that the reason why you were confused was the bug that was discussed
> above, making the graphics section not show up, sorry.

Not really. I still need to know if these labels will be displayed on the same row of Direct2D or somewhere else. Unlike English I need to know what these strings are referring to in order to match the gender, that's why I was asking for a screenshot ;-)

Comment 28

7 years ago
The new patch needs to be pushed in 4.0b8pre and 4.0b7 builds.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(In reply to comment #27)
> (In reply to comment #25)
> > I believe that the reason why you were confused was the bug that was discussed
> > above, making the graphics section not show up, sorry.
> 
> Not really. I still need to know if these labels will be displayed on the same
> row of Direct2D or somewhere else. Unlike English I need to know what these
> strings are referring to in order to match the gender, that's why I was asking
> for a screenshot ;-)

I have put LOCALIZATION NOTE comments in aboutSupport.properties. I am totally ignorant about i18n but I thought that these notes would show up in your localization tool?

Let me paste it:
# 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.

So the gender is that of Direct2D which is just a Microsoft technology.

In the screenshot that was already attached to this bug, this is on the "Direct2D Enabled" line. I can't easily give you a better screenshot than that because I don't have a system where the message shows up.
(In reply to comment #29)
> I have put LOCALIZATION NOTE comments in aboutSupport.properties. I am totally
> ignorant about i18n but I thought that these notes would show up in your
> localization tool?

I don't see them in my localization tool, but I search for them on the original en-US files when a string is unclear. Somehow I managed to miss them in this case. Sorry for the bugspam and thanks for the explanation (no need for a screenshot at this point) ;-)
Created attachment 481627 [details] [diff] [review]
fix about:support

regenerated post-discussion...
Attachment #481537 - Attachment is obsolete: true
Attachment #481627 - Flags: review?(jmuizelaar)
Attachment #481537 - Flags: review?(jmuizelaar)
Created attachment 481630 [details] [diff] [review]
fix about:support

forgot hg qref...
Attachment #481630 - Flags: review?(jmuizelaar)
(Assignee)

Updated

7 years ago
Attachment #481627 - Attachment is obsolete: true
Attachment #481627 - Flags: review?(jmuizelaar)
(Reporter)

Updated

7 years ago
Attachment #481630 - Flags: review?(jmuizelaar) → review+
Created attachment 481637 [details] [diff] [review]
LAND ME! on m-c and on beta7 branch!
Attachment #481637 - Flags: review+
(Assignee)

Updated

7 years ago
Keywords: checkin-needed
Beta7 relbranch is mozilla-central GECKO20b7pre_20101006_RELBRANCH
Pushed to default and beta7 branches.
http://hg.mozilla.org/mozilla-central/rev/c7a1a78cfa72
http://hg.mozilla.org/mozilla-central/rev/d0b8dbaced2c
Status: REOPENED → RESOLVED
Last Resolved: 7 years ago7 years ago
Resolution: --- → FIXED

Comment 36

7 years ago
Created attachment 481730 [details]
screenshot

http://ftp.mozilla.org/pub/mozilla.org/firefox/tinderbox-builds/mozilla-central-win32/1286493779/

Graphics information is back, but no messages.
(In reply to comment #36)
> Created attachment 481730 [details]
> screenshot
> 
> http://ftp.mozilla.org/pub/mozilla.org/firefox/tinderbox-builds/mozilla-central-win32/1286493779/
> 
> Graphics information is back, but no messages.

"no news is good news".
These messages are only printed when your driver has been blacklisted, to explain you why. You don't want to see them ;-)

Comment 38

7 years ago
(In reply to comment #37)
> These messages are only printed when your driver has been blacklisted, 

now D2D/DW,D3D are enabled by default, but not enabled on my PC. poor Graphics.
in these case, should print "Graphics is not enough to use D2D/DW/D3D" or something like this ?

if no message, many users think "all pref/config is ON, but D2D/DW/D3D are not enabled. why ?"
http://hg.mozilla.org/mozilla-central/rev/c7a1a78cfa72
(In reply to comment #38)
> (In reply to comment #37)
> > These messages are only printed when your driver has been blacklisted, 
> 
> now D2D/DW,D3D are enabled by default, but not enabled on my PC. poor Graphics.
> in these case, should print "Graphics is not enough to use D2D/DW/D3D" or
> something like this ?
> 
> if no message, many users think "all pref/config is ON, but D2D/DW/D3D are not
> enabled. why ?"

It's true that it would be nice to print a special message when the reason why something is not enabled is that we tried and it failed (typically meaning too old hardware). What's your vendor and device IDs ?

Comment 41

7 years ago
(In reply to comment #40)
> What's your vendor and device IDs ?

see
(In reply to comment #36)
> Created attachment 481730 [details]
> screenshot

and
https://bugzilla.mozilla.org/show_bug.cgi?id=593738#c0


OS is Windows XP

for D2D(DW), "D2D(DW) cannot be used on Windows XP" or something like this would be better.
Yes, indeed D2D doesn't exist on XP, an error message saying so would be useful.

Updated

7 years ago
Keywords: checkin-needed

Comment 43

6 years ago
Comment on attachment 479904 [details] [diff] [review]
part 1: rework gfxinfo

># HG changeset patch
># Parent b07c0925efe5c51d3d8b7fb3211be2b0693176d1
>
>diff --git a/content/canvas/src/WebGLContext.cpp b/content/canvas/src/WebGLContext.cpp
>--- a/content/canvas/src/WebGLContext.cpp
>+++ b/content/canvas/src/WebGLContext.cpp
>@@ -317,25 +317,25 @@ WebGLContext::SetDimensions(PRInt32 widt
> 
>     PRBool useOpenGL = PR_TRUE;
>     PRBool useANGLE = PR_TRUE;
> 
>     nsCOMPtr<nsIGfxInfo> gfxInfo = do_GetService("@mozilla.org/gfx/info;1");
>     if (gfxInfo) {
>         PRInt32 status;
>         if (NS_SUCCEEDED(gfxInfo->GetFeatureStatus(nsIGfxInfo::FEATURE_WEBGL_OPENGL, &status))) {
>-            if (status == nsIGfxInfo::FEATURE_BLOCKED ||
>-                status == nsIGfxInfo::FEATURE_NOT_AVAILABLE)
>+            if (status == nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION ||
>+                status == nsIGfxInfo::FEATURE_BLOCKED_DEVICE)
>             {
>                 useOpenGL = PR_FALSE;
>             }
>         }
>         if (NS_SUCCEEDED(gfxInfo->GetFeatureStatus(nsIGfxInfo::FEATURE_WEBGL_ANGLE, &status))) {
>-            if (status == nsIGfxInfo::FEATURE_BLOCKED ||
>-                status == nsIGfxInfo::FEATURE_NOT_AVAILABLE)
>+            if (status == nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION ||
>+                status == nsIGfxInfo::FEATURE_BLOCKED_DEVICE)
>             {
>                 useANGLE = PR_FALSE;
>             }
>         }
>     }
> 
>     #ifdef XP_WIN
>         // On Windows, we may have a choice of backends, including straight
>diff --git a/gfx/layers/d3d9/LayerManagerD3D9.cpp b/gfx/layers/d3d9/LayerManagerD3D9.cpp
>--- a/gfx/layers/d3d9/LayerManagerD3D9.cpp
>+++ b/gfx/layers/d3d9/LayerManagerD3D9.cpp
>@@ -75,18 +75,17 @@ LayerManagerD3D9::Initialize()
>   /* Check the user preference for whether 3d video is enabled or not */ 
>   nsCOMPtr<nsIPrefBranch> prefs = do_GetService(NS_PREFSERVICE_CONTRACTID); 
>   prefs->GetBoolPref("gfx.3d_video.enabled", &mIs3DEnabled);
> 
>   nsCOMPtr<nsIGfxInfo> gfxInfo = do_GetService("@mozilla.org/gfx/info;1");
>   if (gfxInfo) {
>     PRInt32 status;
>     if (NS_SUCCEEDED(gfxInfo->GetFeatureStatus(nsIGfxInfo::FEATURE_DIRECT3D_9_LAYERS, &status))) {
>-      if (status != nsIGfxInfo::FEATURE_STATUS_UNKNOWN &&
>-          status != nsIGfxInfo::FEATURE_AVAILABLE)
>+      if (status != nsIGfxInfo::FEATURE_NO_INFO)
>       {
>         NS_WARNING("Direct3D 9-accelerated layers are not supported on this system.");
>         return PR_FALSE;
>       }
>     }
>   }
> 
>   if (!mDefaultDeviceManager) {
>diff --git a/gfx/layers/opengl/LayerManagerOGL.cpp b/gfx/layers/opengl/LayerManagerOGL.cpp
>--- a/gfx/layers/opengl/LayerManagerOGL.cpp
>+++ b/gfx/layers/opengl/LayerManagerOGL.cpp
>@@ -149,18 +149,17 @@ LayerManagerOGL::Initialize(GLContext *a
>   } else {
>     if (mGLContext)
>       CleanupResources();
> 
>     nsCOMPtr<nsIGfxInfo> gfxInfo = do_GetService("@mozilla.org/gfx/info;1");
>     if (gfxInfo) {
>       PRInt32 status;
>       if (NS_SUCCEEDED(gfxInfo->GetFeatureStatus(nsIGfxInfo::FEATURE_OPENGL_LAYERS, &status))) {
>-        if (status != nsIGfxInfo::FEATURE_STATUS_UNKNOWN &&
>-            status != nsIGfxInfo::FEATURE_AVAILABLE) {
>+        if (status != nsIGfxInfo::FEATURE_NO_INFO) {
>           NS_WARNING("OpenGL-accelerated layers are not supported on this system.");
>           return PR_FALSE;
>         }
>       }
>     }
> 
>     mGLContext = nsnull;
> 
>diff --git a/gfx/thebes/gfxWindowsPlatform.cpp b/gfx/thebes/gfxWindowsPlatform.cpp
>--- a/gfx/thebes/gfxWindowsPlatform.cpp
>+++ b/gfx/thebes/gfxWindowsPlatform.cpp
>@@ -280,21 +280,21 @@ gfxWindowsPlatform::UpdateRenderMode()
>     PRBool d2dDisabled = PR_FALSE;
>     PRBool d2dForceEnabled = PR_FALSE;
>     PRBool d2dBlocked = PR_FALSE;
> 
>     nsCOMPtr<nsIGfxInfo> gfxInfo = do_GetService("@mozilla.org/gfx/info;1");
>     if (gfxInfo) {
>         PRInt32 status;
>         if (NS_SUCCEEDED(gfxInfo->GetFeatureStatus(nsIGfxInfo::FEATURE_DIRECT2D, &status))) {
>-            if (status != nsIGfxInfo::FEATURE_STATUS_UNKNOWN &&
>-                status != nsIGfxInfo::FEATURE_AVAILABLE)
>-            {
>+            if (status != nsIGfxInfo::FEATURE_NO_INFO) {
>                 d2dDisabled = PR_TRUE;
>-                if (status == nsIGfxInfo::FEATURE_BLOCKED) {
>+                if (status == nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION ||
>+                    status == nsIGfxInfo::FEATURE_BLOCKED_DEVICE)
>+                {
>                     d2dBlocked = PR_TRUE;
>                 }
>             }
>         }
>     }
> 
>     rv = pref->GetBoolPref("gfx.direct2d.disabled", &d2dDisabled);
>     if (NS_FAILED(rv))
>diff --git a/widget/public/nsIGfxInfo.idl b/widget/public/nsIGfxInfo.idl
>--- a/widget/public/nsIGfxInfo.idl
>+++ b/widget/public/nsIGfxInfo.idl
>@@ -85,25 +85,32 @@ interface nsIGfxInfo : nsISupports
>   /* Whether WebGL is supported via OpenGL. */
>   const long FEATURE_WEBGL_OPENGL = 6;
>   /* Whether WebGL is supported via ANGLE (D3D9 -- does not check for the presence of ANGLE libs). */
>   const long FEATURE_WEBGL_ANGLE = 7;
> 
>   /*
>    * A set of return values from GetFeatureStatus
>    */
>-  /* We don't have any information about this feature on this hardware */
>-  const long FEATURE_STATUS_UNKNOWN = 0;
>-  /* This feature is available and can be used */
>-  const long FEATURE_AVAILABLE = 1;
>-  /* This feature is not available */
>-  const long FEATURE_NOT_AVAILABLE = 2;
>-  /* This feature is available, but is blocked due to a blocklist entry */
>-  const long FEATURE_BLOCKED = 3;
>+  /* We don't explicitly block or discourage the feature. Which means we'll try getting it from the
>+   * hardware, and see what happens. */
>+  const long FEATURE_NO_INFO = 1;
>+  /* This feature is blocked on this driver version. Updating driver will typically unblock it. */
>+  const long FEATURE_BLOCKED_DRIVER_VERSION = 2;
>+  /* This feature is blocked on this device, regardless of driver version.
>+   * Typically means we hit too many driver crashes without a good reason to hope for them to
>+   * get fixed soon. */
>+  const long FEATURE_BLOCKED_DEVICE = 3;
>   /* This feature is available and can be used, but is not suggested (e.g. shouldn't be used by default */
>-  const long FEATURE_NOT_SUGGESTED = 4;
>+  const long FEATURE_DISCOURAGED = 4;
> 
>   /**
>    * Ask about a feature, and return the status of that feature
>    */
>   long getFeatureStatus(in long aFeature);
>+
>+  /*
>+   * Ask about a feature, return the minimum driver version required for it if its status is
>+   * FEATURE_BLOCKED_DRIVER_VERSION, otherwise return an empty string. 
>+   */
>+  DOMString getFeatureSuggestedDriverVersion(in long aFeature);
> };
> 
>diff --git a/widget/src/windows/GfxInfo.cpp b/widget/src/windows/GfxInfo.cpp
>--- a/widget/src/windows/GfxInfo.cpp
>+++ b/widget/src/windows/GfxInfo.cpp
>@@ -35,16 +35,17 @@
>  * the terms of any one of the MPL, the GPL or the LGPL.
>  *
>  * ***** END LICENSE BLOCK ***** */
> 
> #include <windows.h>
> #include "gfxWindowsPlatform.h"
> #include "GfxInfo.h"
> #include "nsUnicharUtils.h"
>+#include "nsPrintfCString.h"
> #include "mozilla/FunctionTimer.h"
> 
> #if defined(MOZ_CRASHREPORTER) && defined(MOZ_ENABLE_LIBXUL)
> #include "nsExceptionHandler.h"
> #include "nsICrashReporter.h"
> #define NS_CRASHREPORTER_CONTRACTID "@mozilla.org/toolkit/crash-reporter;1"
> #include "nsIPrefService.h"
> #endif
>@@ -309,16 +310,17 @@ GfxInfo::GetAdapterDeviceID(PRUint32 *aA
>   ToUpperCase(device);
>   PRInt32 start = device.Find(NS_LITERAL_CSTRING("&DEV_"));
>   if (start != -1) {
>     device.Cut(0, start + strlen("&DEV_"));
>     device.Truncate(4);
>   }
>   nsresult err;
>   *aAdapterDeviceID = device.ToInteger(&err, 16);
>+
>   return NS_OK;
> }
> 
> void
> GfxInfo::AddCrashReportAnnotations()
> {
> #if defined(MOZ_CRASHREPORTER) && defined(MOZ_ENABLE_LIBXUL)
>   nsCAutoString deviceIDString, vendorIDString;
>@@ -490,27 +492,27 @@ static const GfxDriverInfo driverInfo[] 
>    * Intel entries
>    */
> 
>   /*
>    * Implement special Direct2D blocklist from bug 595364
>    */
>   { allWindowsVersions,
>     vendorIntel, deviceFamilyIntelBlockDirect2D,
>-    nsIGfxInfo::FEATURE_DIRECT2D, nsIGfxInfo::FEATURE_BLOCKED,
>+    nsIGfxInfo::FEATURE_DIRECT2D, nsIGfxInfo::FEATURE_BLOCKED_DEVICE,
>     DRIVER_LESS_THAN, allDriverVersions },
> 
>   /* implement the blocklist from bug 594877
>    * Block all features on any drivers before this, as there's a crash when a MS Hotfix is installed.
>    * The crash itself is Direct2D-related, but for safety we block all features.
>    */
> #define IMPLEMENT_INTEL_DRIVER_BLOCKLIST(winVer, devFamily, driverVer) \
>   { winVer,                                                            \
>     vendorIntel, devFamily,                                            \
>-    allFeatures, nsIGfxInfo::FEATURE_BLOCKED,                          \
>+    allFeatures, nsIGfxInfo::FEATURE_BLOCKED_DRIVER_VERSION,           \
>     DRIVER_LESS_THAN, driverVer },
> 
>   IMPLEMENT_INTEL_DRIVER_BLOCKLIST(gfxWindowsPlatform::kWindowsXP, deviceFamilyIntelGMA500,   V(6,14,11,1018))
>   IMPLEMENT_INTEL_DRIVER_BLOCKLIST(gfxWindowsPlatform::kWindowsXP, deviceFamilyIntelGMA900,   V(6,14,10,4764))
>   IMPLEMENT_INTEL_DRIVER_BLOCKLIST(gfxWindowsPlatform::kWindowsXP, deviceFamilyIntelGMA950,   V(6,14,10,4926))
>   IMPLEMENT_INTEL_DRIVER_BLOCKLIST(gfxWindowsPlatform::kWindowsXP, deviceFamilyIntelGMA3150,  V(6,14,10,5260))
>   IMPLEMENT_INTEL_DRIVER_BLOCKLIST(gfxWindowsPlatform::kWindowsXP, deviceFamilyIntelGMAX3000, V(6,14,10,5218))
>   IMPLEMENT_INTEL_DRIVER_BLOCKLIST(gfxWindowsPlatform::kWindowsXP, deviceFamilyIntelGMAX4500HD, V(6,14,10,5284))
>@@ -524,24 +526,24 @@ static const GfxDriverInfo driverInfo[] 
> 
>   IMPLEMENT_INTEL_DRIVER_BLOCKLIST(gfxWindowsPlatform::kWindows7, deviceFamilyIntelGMA500,   V(5,0,0,2026))
>   IMPLEMENT_INTEL_DRIVER_BLOCKLIST(gfxWindowsPlatform::kWindows7, deviceFamilyIntelGMA900,   allDriverVersions)
>   IMPLEMENT_INTEL_DRIVER_BLOCKLIST(gfxWindowsPlatform::kWindows7, deviceFamilyIntelGMA950,   V(8,15,10,1930))
>   IMPLEMENT_INTEL_DRIVER_BLOCKLIST(gfxWindowsPlatform::kWindows7, deviceFamilyIntelGMA3150,  V(8,14,10,2117))
>   IMPLEMENT_INTEL_DRIVER_BLOCKLIST(gfxWindowsPlatform::kWindows7, deviceFamilyIntelGMAX3000, V(8,15,10,1930))
>   IMPLEMENT_INTEL_DRIVER_BLOCKLIST(gfxWindowsPlatform::kWindows7, deviceFamilyIntelGMAX4500HD, V(8,15,10,2202))
> 
>-  /* OpenGL on any Intel hardware is not suggested */
>+  /* OpenGL on any Intel hardware is discouraged */
>   { allWindowsVersions,
>     vendorIntel, allDevices,
>-    nsIGfxInfo::FEATURE_OPENGL_LAYERS, nsIGfxInfo::FEATURE_NOT_SUGGESTED,
>+    nsIGfxInfo::FEATURE_OPENGL_LAYERS, nsIGfxInfo::FEATURE_DISCOURAGED,
>     DRIVER_LESS_THAN, allDriverVersions },
>   { allWindowsVersions,
>     vendorIntel, allDevices,
>-    nsIGfxInfo::FEATURE_WEBGL_OPENGL, nsIGfxInfo::FEATURE_NOT_SUGGESTED,
>+    nsIGfxInfo::FEATURE_WEBGL_OPENGL, nsIGfxInfo::FEATURE_DISCOURAGED,
>     DRIVER_LESS_THAN, allDriverVersions },
> 
>   /*
>    * NVIDIA entries
>    */
> 
>   /*
>    * AMD entries
>@@ -562,36 +564,41 @@ ParseDriverVersion(nsAString& aVersion, 
>   if (b < 0 || b > 0xffff) return false;
>   if (c < 0 || c > 0xffff) return false;
>   if (d < 0 || d > 0xffff) return false;
> 
>   *aNumericVersion = V(a, b, c, d);
>   return true;
> }
> 
>-NS_IMETHODIMP
>-GfxInfo::GetFeatureStatus(PRInt32 aFeature, PRInt32 *aStatus)
>+nsresult
>+GfxInfo::GetFeatureStatusImpl(PRInt32 aFeature, PRInt32 *aStatus, nsAString & aSuggestedDriverVersion)
> {
>-  PRInt32 status = nsIGfxInfo::FEATURE_STATUS_UNKNOWN;
>+  *aStatus = nsIGfxInfo::FEATURE_NO_INFO;
>+  aSuggestedDriverVersion.SetIsVoid(PR_TRUE);
>+
>+  PRInt32 status = nsIGfxInfo::FEATURE_NO_INFO;
> 
>   PRUint32 adapterVendor = 0;
>   PRUint32 adapterDeviceID = 0;
>   nsAutoString adapterDriverVersionString;
>   if (NS_FAILED(GetAdapterVendorID(&adapterVendor)) ||
>       NS_FAILED(GetAdapterDeviceID(&adapterDeviceID)) ||
>       NS_FAILED(GetAdapterDriverVersion(adapterDriverVersionString)))
>   {
>     return NS_ERROR_FAILURE;
>   }
> 
>   PRUint64 driverVersion;
>   if (!ParseDriverVersion(adapterDriverVersionString, &driverVersion)) {
>     return NS_ERROR_FAILURE;
>   }
> 
>+  PRUint64 suggestedDriverVersion = 0;
>+
>   const GfxDriverInfo *info = &driverInfo[0];
>   while (info->windowsVersion) {
> 
>     if (info->windowsVersion != allWindowsVersions &&
>         info->windowsVersion != gfxWindowsPlatform::WindowsOSVersion())
>     {
>       info++;
>       continue;
>@@ -617,16 +624,17 @@ GfxInfo::GetFeatureStatus(PRInt32 aFeatu
>         }
>     }
> 
>     bool match = false;
> 
>     switch (info->op) {
>     case DRIVER_LESS_THAN:
>       match = driverVersion < info->version;
>+      suggestedDriverVersion = info->version;
>       break;
>     case DRIVER_LESS_THAN_OR_EQUAL:
>       match = driverVersion <= info->version;
>       break;
>     case DRIVER_GREATER_THAN:
>       match = driverVersion > info->version;
>       break;
>     case DRIVER_GREATER_THAN_OR_EQUAL:
>@@ -660,11 +668,33 @@ GfxInfo::GetFeatureStatus(PRInt32 aFeatu
>         break;
>       }
>     }
> 
>     info++;
>   }
> 
>   *aStatus = status;
>+
>+  if (status == FEATURE_BLOCKED_DRIVER_VERSION && suggestedDriverVersion) {
>+      aSuggestedDriverVersion.AppendPrintf("%lld.%lld.%lld.%lld",
>+                                           (suggestedDriverVersion & 0xffff000000000000) >> 48,
>+                                           (suggestedDriverVersion & 0x0000ffff00000000) >> 32,
>+                                           (suggestedDriverVersion & 0x00000000ffff0000) >> 16,
>+                                           (suggestedDriverVersion & 0x000000000000ffff));
>+  }
>+  
>   return NS_OK;
> }
> 
>+NS_IMETHODIMP
>+GfxInfo::GetFeatureStatus(PRInt32 aFeature, PRInt32 *aStatus)
>+{
>+  nsString s;
>+  return GetFeatureStatusImpl(aFeature, aStatus, s);
>+}
>+
>+NS_IMETHODIMP
>+GfxInfo::GetFeatureSuggestedDriverVersion(PRInt32 aFeature, nsAString& aSuggestedDriverVersion)
>+{
>+  PRInt32 i;
>+  return GetFeatureStatusImpl(aFeature, &i, aSuggestedDriverVersion);
>+}
>diff --git a/widget/src/windows/GfxInfo.h b/widget/src/windows/GfxInfo.h
>--- a/widget/src/windows/GfxInfo.h
>+++ b/widget/src/windows/GfxInfo.h
>@@ -57,14 +57,16 @@ private:
> 
>   void Init();
>   void AddCrashReportAnnotations();
>   nsString mDeviceString;
>   nsString mDeviceID;
>   nsString mDriverVersion;
>   nsString mDriverDate;
>   nsString mDeviceKey;
>+
>+  nsresult GetFeatureStatusImpl(PRInt32 aFeature, PRInt32 *aStatus, nsAString & aSuggestedDriverVersion);
> };
> 
> } // namespace widget
> } // namespace mozilla
> 
> #endif /* __mozilla_widget_GfxInfo_h__ */
You need to log in before you can comment on or make changes to this bug.