The default bug view has changed. See this FAQ.

OGL/GLX does not like image layers that are not xlib surfaces

RESOLVED FIXED in mozilla8

Status

()

Core
Graphics
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: heeen, Assigned: mattwoodrow)

Tracking

Trunk
mozilla8
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

6 years ago
For the checkerboard pattern I created a gfxImageSurface in layout/ipc/RenderFrameParent.cpp. This is used in an ImageLayerOGL to render the background for fennec.
On EGL, there is no problem, but GLX assumes all ImageLayers are Xlib surfaces, so creating a pixmap fails around here:
http://mxr.mozilla.org/mozilla-central/source/gfx/layers/opengl/ImageLayerOGL.cpp#466

It leads to a crash as soon as you try to open a page.
(Reporter)

Updated

6 years ago
Depends on: 628566
(Assignee)

Comment 1

6 years ago
Created attachment 545493 [details] [diff] [review]
Check the surface type before attempting to create a pixmap
Attachment #545493 - Flags: review?(bjacob)
(Assignee)

Updated

6 years ago
Attachment #545493 - Flags: review?(bjacob) → review?(joe)
Comment on attachment 545493 [details] [diff] [review]
Check the surface type before attempting to create a pixmap

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

::: gfx/layers/opengl/ImageLayerOGL.cpp
@@ +462,5 @@
>      GLXPixmap pixmap;
>  
>      if (cairoImage->mSurface) {
>          pixmap = sGLXLibrary.CreatePixmap(cairoImage->mSurface);
> +        NS_ASSERTION(pixmap, "Failed to create pixmap!");

Should we have an assertion if we then go on and test for pixmap?
Attachment #545493 - Flags: review?(joe) → review+
(Assignee)

Comment 3

6 years ago
http://hg.mozilla.org/integration/mozilla-inbound/rev/9672ad924796
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Whiteboard: [inbound]
http://hg.mozilla.org/mozilla-central/rev/9672ad924796

Matt: please don't mark the bugs which you land on inbound fixed until the patch hits m-c, since it might get backed out before that, and we could potentially miss it because of the bug being marked as fixed.  Thanks!
Assignee: nobody → matt.woodrow+bugzilla
Whiteboard: [inbound]
Target Milestone: --- → mozilla8
You need to log in before you can comment on or make changes to this bug.