All users were logged out of Bugzilla on October 13th, 2018

Try to create offscreen Xlib surface from existing visual if possible

RESOLVED FIXED in mozilla2.0b2

Status

()

RESOLVED FIXED
9 years ago
8 years ago

People

(Reporter: romaxa, Assigned: romaxa)

Tracking

Trunk
mozilla2.0b2
x86
Linux
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

9 years ago
Created attachment 446463 [details] [diff] [review]
Create offscreen xlib surface from visual

Problem is so that gfxPlatformQt creating offscreen surface with 

gfxXlibSurface(Display* dpy, XRenderPictFormat *format, const gfxIntSize& size);
And after that cairo return NULL visual because it is not trying to find visual and set it to xlib_surface structure...

http://mxr.mozilla.org/mozilla-central/source/gfx/cairo/cairo/src/cairo-xlib-surface.c#3196


I think we should try to find related visual, and call
new gfxXlibSurface(Display *dpy, Visual *visual, const gfxIntSize& size, int depth = 0);
Attachment #446463 - Flags: review?(vladimir)
(Assignee)

Updated

9 years ago
Blocks: 556487
(Assignee)

Comment 2

9 years ago
Created attachment 446745 [details] [diff] [review]
cairo patch, updated to trunk.
Assignee: nobody → romaxa
Attachment #446463 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #446745 - Flags: review?(jmuizelaar)
Attachment #446463 - Flags: review?(vladimir)
(Assignee)

Comment 3

9 years ago
Comment on attachment 446745 [details] [diff] [review]
cairo patch, updated to trunk.

This patch seems to break plugins rendering
Attachment #446745 - Flags: review?(jmuizelaar) → review-
(In reply to comment #3)
> This patch seems to break plugins rendering

Flash with GTK ports would need DRAW_SUPPORTS_NONDEFAULT_VISUAL to be removed:
http://hg.mozilla.org/mozilla-central/annotate/d7ba6aef21eb/layout/generic/nsObjectFrame.cpp#l5135
(I'm not clear on exactly which visuals Flash Player does support; it may only be ARGB visuals causing problems.)

I don't know why it would "break" Qt ports.
(Assignee)

Comment 5

9 years ago
Comment on attachment 446745 [details] [diff] [review]
cairo patch, updated to trunk.

Yep, you right... removing non-default visual helps in this situation.
And this patch seems to work fine
Attachment #446745 - Flags: review- → review?(jmuizelaar)
Oleg, can you try to upstream this patch? There are people on the cairo list that would be better at reviewing this then me.
(Assignee)

Comment 7

9 years ago
Bug created:
https://bugs.freedesktop.org/show_bug.cgi?id=28492

Message posted to cairo mailing list.
Comment on attachment 446745 [details] [diff] [review]
cairo patch, updated to trunk.

Looks good. Make sure you add the patch to the cairo directory
Attachment #446745 - Flags: review?(jmuizelaar) → review+
(Assignee)

Comment 10

8 years ago
http://hg.mozilla.org/mozilla-central/rev/598c5f8d295c
Status: ASSIGNED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
(Assignee)

Comment 11

8 years ago
due Gdk-CRITICAL **: gdk_x11_visual_get_xvisual
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1276838409.1276840450.21437.gz&fulltext=1

REFTEST INFO | Loading a blank page
REFTEST TEST-START | file:///home/cltbld/talos-slave/mozilla-central-fedora-opt-u-crashtest/build/reftest/tests/modules/plugin/test/crashtests/540114-1.html
NPP_Destroy
NPP_Destroy
WARNING: gdk_x11_visual_get_xvisual: assertion `visual != NULL' failed: 'glib warning', file /builds/slave/mozilla-central-linux/build/toolkit/xre/nsSigHandlers.cpp, line 193

(firefox-bin:1997): Gdk-CRITICAL **: gdk_x11_visual_get_xvisual: assertion `visual != NULL' failed
WARNING: gdk_x11_colormap_get_xcolormap: assertion `GDK_IS_COLORMAP (colormap)' failed: 'glib warning', file /builds/slave/mozilla-central-linux/build/toolkit/xre/nsSigHandlers.cpp, line 193

(firefox-bin:1997): Gdk-CRITICAL **: gdk_x11_colormap_get_xcolormap: assertion `GDK_IS_COLORMAP (colormap)' failed

###!!! [Parent][RPCChannel] Error: Channel error: cannot send/recv

REFTEST TEST-UNEXPECTED-FAIL | file:///home/cltbld/talos-slave/mozilla-central-fedora-opt-u-crashtest/build/reftest/tests/modules/plugin/test/crashtests/540114-1.html | plugin should not crash item 1
REFTEST INFO | Loading a blank page
REFTEST TEST-START | file:///home/cltbld/talos-slave/mozilla-central-fedora-opt-u-crashtest/build/reftest/tests/modules/plugin/test/crashtests/570884.html
REFTEST TEST-PASS | file:///home/cltbld/talos-slave/mozilla-central-fedora-opt-u-crashtest/build/reftest/tests/modules/plugin/test/crashtests/570884.html | (LOAD ONLY)
REFTEST INFO | Loading a blank page
REFTEST TEST-START | file:///home/cltbld/talos-slave/mozilla-central-fedora-opt-u-crashtest/build/reftest/tests/parser/htmlparser/tests/crashtests/30885-1.html
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
I'm guessing that was caused by gfxPlatformGtk::CreateOffscreenSurface using a GdkPixmap with no colormap:
http://hg.mozilla.org/mozilla-central/annotate/5f3955a452ac/gfx/thebes/src/gfxPlatformGtk.cpp#l195

One option might be to put a sensible colormap on the surface.

Though simpler (and maybe better) would be to just let
gfxXlibSurface(Display*, XRenderPictFormat*, const gfxIntSize&)
create the pixmap.
(Now that the cairo surface has an associated visual, the GdkPixmap wrapper will get added if and only when it is needed.)
Depends on: 573319
I filed bug 573319 on CreateOffscreenSurface.
Blocks: 573626
(Assignee)

Updated

8 years ago
Keywords: checkin-needed
(Assignee)

Comment 14

8 years ago
http://hg.mozilla.org/mozilla-central/rev/ba88e35da4e7 - repeat
Status: REOPENED → RESOLVED
Last Resolved: 8 years ago8 years ago
Resolution: --- → FIXED
(Assignee)

Updated

8 years ago
Keywords: checkin-needed
(Assignee)

Comment 15

8 years ago
reverted in http://hg.mozilla.org/mozilla-central/rev/200f9be1c8e5
due to svg crashtest fail: see bug 573319
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Depends on: 574220
Bug 574220 and bug 569775 probably need to be resolved before we can land this.
Depends on: 569775
http://hg.mozilla.org/mozilla-central/rev/ff0c0650d7f2
Status: REOPENED → RESOLVED
Last Resolved: 8 years ago8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3b2
You need to log in before you can comment on or make changes to this bug.