Closed Bug 594173 Opened 12 years ago Closed 12 years ago

"Advanced > Use hardware acceleration when available" needs to control layers.accelerate-none pref

Categories

(Firefox :: Preferences, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 4.0b7
Tracking Status
blocking2.0 --- beta7+

People

(Reporter: joe, Assigned: Felipe)

References

Details

Attachments

(1 file)

Right now the hardware acceleration pref is available only on Windows, and only controls the D2D status. We need to make it control the pref "layers.accelerate-none" as well, and have it apply to all platforms (but control the d2d pref only on Windows).
blocking2.0: --- → beta6+
If the same checkbox controls two prefs on Windows, what would the Options dialog show if someone manually modifies only one of the prefs?

Does layers acceleration depend on d2d being enabled (or any other kind of combination)? Or all of the related prefs independent?
They're independent.
So what about this:

the checkbox controls and reflects layers.accelerate-none on all platforms. In addition to that, on Windows, whenever the checkbox is ticked/unticked the value is synced to gfx.direct2d.disabled too.

So for most users it will always disabled hw layers and direct2d, and an advanced user can enable direct2d on about:config while keeping hw layers disabled through the options dialog
sounds great.
Assignee: nobody → felipc
Status: NEW → ASSIGNED
Attached patch Patch v1Splinter Review
Implemented as described on comment #3.

Picking Mano for review.
Attachment #473746 - Flags: review?(mano)
Whiteboard: [has patch][needs review mano]
Comment on attachment 473746 [details] [diff] [review]
Patch v1

>+  updateHardwareAcceleration: function()
>+  {
>+#ifdef XP_WIN
>+    var pref = document.getElementById("layers.accelerate-none");
>+    try {
>+      var prefsvc = Components.classes["@mozilla.org/preferences-service;1"].
>+                    getService(Components.interfaces.nsIPrefService).
>+                    QueryInterface(Components.interfaces.nsIPrefBranch2);

Use Services.prefs. Also, you don't need to wrap set*Pref calls in try blocks.

r=mano.
Attachment #473746 - Flags: review?(mano) → review+
http://hg.mozilla.org/mozilla-central/rev/094ae81d7f88
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Whiteboard: [has patch][needs review mano]
Target Milestone: --- → Firefox 4.0b6
Blocks: 666574
You need to log in before you can comment on or make changes to this bug.