Last Comment Bug 670106 - OGL/GLX does not like image layers that are not xlib surfaces
: OGL/GLX does not like image layers that are not xlib surfaces
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Graphics (show other bugs)
: Trunk
: x86 Linux
: -- normal (vote)
: mozilla8
Assigned To: Matt Woodrow (:mattwoodrow)
:
:
Mentors:
Depends on: 628566
Blocks:
  Show dependency treegraph
 
Reported: 2011-07-08 04:03 PDT by Florian Hänel [:heeen]
Modified: 2011-07-15 07:06 PDT (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Check the surface type before attempting to create a pixmap (4.22 KB, patch)
2011-07-12 14:51 PDT, Matt Woodrow (:mattwoodrow)
joe: review+
Details | Diff | Splinter Review

Description Florian Hänel [:heeen] 2011-07-08 04:03:26 PDT
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.
Comment 1 Matt Woodrow (:mattwoodrow) 2011-07-12 14:51:05 PDT
Created attachment 545493 [details] [diff] [review]
Check the surface type before attempting to create a pixmap
Comment 2 Joe Drew (not getting mail) 2011-07-12 17:24:02 PDT
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?
Comment 3 Matt Woodrow (:mattwoodrow) 2011-07-14 14:06:15 PDT
http://hg.mozilla.org/integration/mozilla-inbound/rev/9672ad924796
Comment 4 :Ehsan Akhgari 2011-07-15 07:06:04 PDT
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!

Note You need to log in before you can comment on or make changes to this bug.