Status

()

Core
Graphics
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: Joe Drew (not getting mail), Assigned: Joe Drew (not getting mail))

Tracking

unspecified
x86
Windows 7
Points:
---

Firefox Tracking Flags

(blocking2.0 beta5+)

Details

Attachments

(1 attachment)

(Assignee)

Description

7 years ago
We need a new about:config pref that makes it a lot easier to force off Direct2D.
(Assignee)

Comment 1

7 years ago
Created attachment 469117 [details] [diff] [review]
add gfx.direct2d.disabled pref

This patch adds the pref gfx.direct2d.disabled, which is set to false by default, but can be toggled to true to disable the automatic use of d2d. Users can still use mozilla.widget.render-mode to select a rendering mode manually.
Attachment #469117 - Flags: review?(bas.schouten)
Comment on attachment 469117 [details] [diff] [review]
add gfx.direct2d.disabled pref

># HG changeset patch
># Parent cca13a1397f8d70257b151ac5cf5dfb0dbcac1ba
>diff --git a/gfx/thebes/gfxWindowsPlatform.cpp b/gfx/thebes/gfxWindowsPlatform.cpp
>--- a/gfx/thebes/gfxWindowsPlatform.cpp
>+++ b/gfx/thebes/gfxWindowsPlatform.cpp
>@@ -222,17 +222,22 @@ gfxWindowsPlatform::gfxWindowsPlatform()
>     ::GetVersionExA(&versionInfo);
>     bool isVistaOrHigher = versionInfo.dwMajorVersion >= 6;
> 
> #ifdef CAIRO_HAS_D2D_SURFACE
>     NS_RegisterMemoryReporter(new D2DCacheReporter());
>     NS_RegisterMemoryReporter(new D2DVRAMReporter());
>     mD2DDevice = NULL;
> 
>-    if (isVistaOrHigher) {
>+    PRBool d2dDisabled = PR_FALSE;
>+    nsresult rv = pref->GetBoolPref("gfx.direct2d.disabled", &d2dDisabled);
>+    if (NS_FAILED(rv))
>+        d2dDisabled = PR_FALSE;
I wonder if we really need this, logic would dictate GetBoolPref doesn't touch d2dDisabled if it fails.
Attachment #469117 - Flags: review?(bas.schouten) → review+
(Assignee)

Updated

7 years ago
blocking2.0: --- → beta5+
(Assignee)

Updated

7 years ago
Blocks: 587857
(Assignee)

Comment 3

7 years ago
http://hg.mozilla.org/mozilla-central/rev/5d174cb918fe
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.