Closed Bug 1274012 Opened 9 years ago Closed 5 years ago

use gfxConfig for WebGL prefs

Categories

(Core :: Graphics: CanvasWebGL, task, P5)

task

Tracking

()

RESOLVED INCOMPLETE
Tracking Status
firefox50 --- wontfix
firefox51 --- wontfix
firefox52 --- wontfix
firefox53 --- wontfix

People

(Reporter: BenWa, Assigned: rhunt)

References

Details

Attachments

(2 files, 3 obsolete files)

No description provided.
Assignee: nobody → bgirard
Comment on attachment 8754086 [details] MozReview Request: Bug 1274012 - use gfxConfig for WebGL prefs. r=dvander Review request updated; see interdiff: https://reviewboard.mozilla.org/r/53712/diff/1-2/
Attachment #8754086 - Attachment description: MozReview Request: Bug 1274012 - WIP: use gfxConfig for WebGL prefs → MozReview Request: Bug 1274012 - use gfxConfig for WebGL prefs. r=dvander
Attachment #8754086 - Flags: review?(dvander)
Comment on attachment 8754086 [details] MozReview Request: Bug 1274012 - use gfxConfig for WebGL prefs. r=dvander Review request updated; see interdiff: https://reviewboard.mozilla.org/r/53712/diff/2-3/
This is waiting on the API changes from bug 1274046 bug which I'll post once I get it building on windows. But it should be reviewable now since the API change is trivial.
Depends on: 1274046
Comment on attachment 8754086 [details] MozReview Request: Bug 1274012 - use gfxConfig for WebGL prefs. r=dvander https://reviewboard.mozilla.org/r/53712/#review51698 ::: dom/canvas/WebGLContext.cpp:584 (Diff revision 3) > static already_AddRefed<gl::GLContext> > CreateGLWithEGL(const gl::SurfaceCaps& caps, gl::CreateContextFlags flags, > WebGLContext* webgl, nsACString* const out_failReason, > nsACString* const out_failureId) > { > + if (!gfxConfig::IsEnabled(Feature::WEBGL_OPENGL)) { No out_failureId in this case? ::: gfx/thebes/gfxPlatform.cpp:2492 (Diff revision 3) > + if (InSafeMode()) { > + nsCString safeModeFailure = NS_LITERAL_CSTRING("FEATURE_FAILURE_WEBGL_SAFEMODE"); > + webglOpenGLFeature.ForceDisable(FeatureStatus::Blocked, "Acceleration blocked by safe-mode", > + safeModeFailure); > + webglAngleFeature.ForceDisable(FeatureStatus::Blocked, "Acceleration blocked by safe-mode", > + safeModeFailure); Return here if possible, or move the InSafeMode check to the end - ForceDisable sets the very last state so anything that comes after is effectively ignored. (It might technically show up in the about:support decision log, I guess.)
Attachment #8754086 - Flags: review?(dvander) → review+
Comment on attachment 8754086 [details] MozReview Request: Bug 1274012 - use gfxConfig for WebGL prefs. r=dvander Review request updated; see interdiff: https://reviewboard.mozilla.org/r/53712/diff/3-4/
Depends on: 1259536
Keywords: feature
Assignee: bgirard → nobody
Ryan, can you check with David if we still want this, and see if we can land it if we do?
Assignee: nobody → rhunt
Attached patch remove-disable-wgl.patch (obsolete) — Splinter Review
Currently this pref does nothing. I don't know if that is a mistake or if it should be updated to follow original intent. For this bug, it's nice to just remove it. It can be added back later.
Attachment #8754086 - Attachment is obsolete: true
Attachment #8819944 - Flags: review?(jgilbert)
Attached patch use-gfxconfig.patch (obsolete) — Splinter Review
This patch is similar to Benoit's patches, but updated to match changes to WebGL initialization. This patch tries to keep the same observable behavior of error messages and warnings. All of the feature detections (env variables, prefs, blacklist, safemode) that were reported as failures, are moved into gfxPlatform/gfxConfig. The rest of the prefs that are about choosing which backend to try are left as is.
Attachment #8819951 - Flags: review?(jgilbert)
Please hold off on optional fixes until 54, while we get WebGL 2 out the door.
Yes, let's land this in late January.
Comment on attachment 8819951 [details] [diff] [review] use-gfxconfig.patch Review of attachment 8819951 [details] [diff] [review]: ----------------------------------------------------------------- The rest of this looks ok. I'm not clear on why we want to change this. Please explain why it's useful to transition to this new API. ::: dom/canvas/WebGLContext.cpp @@ +748,2 @@ > #ifdef XP_WIN > + const bool tryNativeGL = gfxPrefs::WebGLDisableANGLE() || PR_GetEnv("MOZ_WEBGL_FORCE_OPENGL") || useEGL; Do not simplify this logic. For readability, it's important it stays roughly how it was.
Attachment #8819951 - Flags: review?(jgilbert) → review-
Comment on attachment 8819944 [details] [diff] [review] remove-disable-wgl.patch Review of attachment 8819944 [details] [diff] [review]: ----------------------------------------------------------------- If you're removing this, you *must* remove the all.js entry.
Attachment #8819944 - Flags: review?(jgilbert) → review-
(In reply to Jeff Gilbert [:jgilbert] from comment #13) > Comment on attachment 8819951 [details] [diff] [review] > use-gfxconfig.patch > > Review of attachment 8819951 [details] [diff] [review]: > ----------------------------------------------------------------- > > The rest of this looks ok. > > I'm not clear on why we want to change this. Please explain why it's useful > to transition to this new API. Bug 1254899.
Rebased and removed the all.js entry.
Attachment #8819944 - Attachment is obsolete: true
Attachment #8819951 - Attachment is obsolete: true
Attachment #8828945 - Flags: review?(jgilbert)
Rebased and addressed review comments.
Attachment #8828946 - Flags: review?(jgilbert)
Attachment #8828945 - Flags: review?(jgilbert) → review+
Comment on attachment 8828946 [details] [diff] [review] webgl-gfxconfig.patch Clearing review as I'm not working on this right now.
Attachment #8828946 - Flags: review?(jgilbert)
Type: defect → task
Priority: -- → P5

It's all StaticPrefs now.

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: