Closed Bug 1241486 Opened 8 years ago Closed 8 years ago

Should we use SharedSurface_GLX with the basic (xrender) compositor?

Categories

(Core :: Graphics, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla47
Tracking Status
firefox47 --- fixed

People

(Reporter: nical, Assigned: nical)

Details

(Whiteboard: [gfx-noted])

Attachments

(1 file)

WebGL currently uses SharedSurface_Basic with basic compositor on linux. It makes sense on other platforms but wouldn't it save us expensive read-backs to use GLX surfaces instead, since the compositor uses xrender in the end? I tried locally and it seems to work (haven't measured performance). I know that it doesn't make much of difference since with bug 1193015 we require an environment variable, but if we never want GLX surfaces with the basic xrender compositor, we should at least add a comment in the code for future reference.
Flags: needinfo?(jgilbert)
That's what I tried locally.
Whiteboard: [gfx-noted]
It should work, and it should be the right way to do this. If we have any problems with it, we won't have much bandwidth to handle it, so we can just turn this back off again.
Flags: needinfo?(jgilbert)
Assignee: nobody → nical.bugzilla
Attachment #8710445 - Flags: review?(jgilbert)
Comment on attachment 8710445 [details] [diff] [review]
allow glx surfaces when using the basic compositor

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

::: gfx/gl/GLScreenBuffer.cpp
@@ +114,5 @@
>              default:
>                break;
>          }
> +
> +#if defined(GL_PROVIDER_GLX)

#ifdef is generally preferred.

@@ +116,5 @@
>          }
> +
> +#if defined(GL_PROVIDER_GLX)
> +        if (!factory && sGLXLibrary.UseSurfaceSharing()) {
> +          factory = SurfaceFactory_GLXDrawable::Create(gl, caps, forwarder, flags);

4-space file, though I do see 2-space above.
Attachment #8710445 - Flags: review?(jgilbert) → review+
https://hg.mozilla.org/mozilla-central/rev/bbe9d627651b
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: