Closed Bug 1300440 Opened 3 years ago Closed 3 years ago

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

Categories

(Core :: Graphics: Layers, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla51
Tracking Status
firefox51 --- fixed

People

(Reporter: roc, Assigned: roc)

Details

Attachments

(1 file)

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.
Attached patch patchSplinter Review
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+
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
https://hg.mozilla.org/mozilla-central/rev/3895ee3a6dc1
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
You need to log in before you can comment on or make changes to this bug.