Closed Bug 1150767 Opened 9 years ago Closed 9 years ago

Add pref to force hardware rendering for GLContexts on OSX

Categories

(Core :: Graphics, defect)

All
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla40
Tracking Status
firefox40 --- fixed

People

(Reporter: jgilbert, Assigned: jgilbert)

References

Details

Attachments

(1 file)

We should have a way to easily ensure that GL is hardware-accelerated.
Attachment #8587773 - Flags: review?(jmuizelaar)
Note that we cannot yet have this default to force-hardware, as this would currently disable WebGL on OSX E10S. (bug 1150765)
(In reply to Jeff Gilbert [:jgilbert] from comment #0)
> Created attachment 8587773 [details] [diff] [review]
> 0003-Add-pref-for-requiring-hardware-backed-GL.patch
> 
> We should have a way to easily ensure that GL is hardware-accelerated.

As I understand it this for ensuring that test machines do the right thing correct?
Flags: needinfo?(jgilbert)
(In reply to Jeff Muizelaar [:jrmuizel] from comment #2)
> (In reply to Jeff Gilbert [:jgilbert] from comment #0)
> > Created attachment 8587773 [details] [diff] [review]
> > 0003-Add-pref-for-requiring-hardware-backed-GL.patch
> > 
> > We should have a way to easily ensure that GL is hardware-accelerated.
> 
> As I understand it this for ensuring that test machines do the right thing
> correct

Given the apparent acceptable quality of the software renderer, we don't care whether general WebGL tests run on this or an actual hardware driver.

We do want to be able the test that we are getting the hardware renderer for performance reasons.
Flags: needinfo?(jgilbert)
Comment on attachment 8587773 [details] [diff] [review]
0003-Add-pref-for-requiring-hardware-backed-GL.patch

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

::: gfx/gl/GLContextProviderCGL.mm
@@ +187,5 @@
>  static const NSOpenGLPixelFormatAttribute kAttribs_offscreen[] = {
> +    0
> +};
> +
> +static const NSOpenGLPixelFormatAttribute kAttribs_offscreen_fast[] = {

kAttribs_offscreen_accelerated is a better name than _fast

@@ +269,5 @@
>      }
>      if (!context) {
>          profile = ContextProfile::OpenGLCompatibility;
> +
> +        if (Preferences::GetBool("gl.require-hardware", false))

Preferences::GetBool is pretty heavyweight. Maybe use GfxPrefs instead?
Attachment #8587773 - Flags: review?(jmuizelaar) → review+
(In reply to Jeff Muizelaar [:jrmuizel] from comment #4)
> Comment on attachment 8587773 [details] [diff] [review]
> 0003-Add-pref-for-requiring-hardware-backed-GL.patch
> 
> Review of attachment 8587773 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> ::: gfx/gl/GLContextProviderCGL.mm
> @@ +187,5 @@
> >  static const NSOpenGLPixelFormatAttribute kAttribs_offscreen[] = {
> > +    0
> > +};
> > +
> > +static const NSOpenGLPixelFormatAttribute kAttribs_offscreen_fast[] = {
> 
> kAttribs_offscreen_accelerated is a better name than _fast
> 
> @@ +269,5 @@
> >      }
> >      if (!context) {
> >          profile = ContextProfile::OpenGLCompatibility;
> > +
> > +        if (Preferences::GetBool("gl.require-hardware", false))
> 
> Preferences::GetBool is pretty heavyweight. Maybe use GfxPrefs instead?

Done.

 https://hg.mozilla.org/integration/mozilla-inbound/rev/decbad9a43db
https://hg.mozilla.org/mozilla-central/rev/decbad9a43db
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: