layers.acceleration.force-enabled crashes with blacklisted devices in debug builds

RESOLVED FIXED in Firefox 51

Status

()

RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: roc, Assigned: roc)

Tracking

unspecified
mozilla51
Points:
---

Firefox Tracking Flags

(firefox51 fixed)

Details

Attachments

(1 attachment)

The gfxPlatform code looks like this:

  if (!IsGfxInfoStatusOkay(nsIGfxInfo::FEATURE_OPENGL_LAYERS, &message, failureId)) {
    openGLFeature.Disable(FeatureStatus::Blacklisted, message.get(), failureId);
  }
...
  if (gfxPrefs::LayersAccelerationForceEnabledDoNotUseDirectly()) {
    openGLFeature.UserForceEnable("Force-enabled by pref");
  }

On debug builds, if both "if" conditions are true

andrew@comminos.com
Gah! Sorry about the premature submission.

... if both "if" conditions are true, then in debug builds we get an assertion in gfxFeature because it's been initialized twice. In opt builds there's no assertion so we go ahead and use accelerated layers with the blacklisted device.

I think debug builds should behave like opt builds and layers.acceleration.force-enabled should work even with blacklisted devices.
Created attachment 8788008 [details] [diff] [review]
patch

Make layers.acceleration.force-enabled override blacklisted devices in debug builds.

Opt builds already have this behavior.
Attachment #8788008 - Flags: review?(andrew)
Note that this bug breaks layers.acceleration.force-enabled under rr: https://github.com/mozilla/rr/issues/1785.
Comment on attachment 8788008 [details] [diff] [review]
patch

Review of attachment 8788008 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good, thanks for the patch!
Attachment #8788008 - Flags: review?(andrew) → review+

Comment 5

2 years ago
Pushed by cmccormack@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/3895ee3a6dc1
Make layers.acceleration.force-enabled override blacklisted devices in debug builds. r=acominos

Comment 6

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/3895ee3a6dc1
Status: NEW → RESOLVED
Last Resolved: 2 years ago
status-firefox51: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
You need to log in before you can comment on or make changes to this bug.