Bug 28492

Summary: cairo_xlib_surface_create_with_xrender_format does not create visual for resulting surface
Product: cairo Reporter: Oleg Romashin <romaxa>
Component: xlib backendAssignee: Carl Worth <cworth>
Status: RESOLVED FIXED QA Contact: cairo-bugs mailing list <cairo-bugs>
Severity: normal    
Priority: medium CC: bugs.freedesktop
Version: 1.9.7   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Fix updated to cairo 1.9.6

Description Oleg Romashin 2010-06-10 12:43:51 UTC
Created attachment 36206 [details] [review]
Fix updated to cairo 1.9.6

cairo_xlib_surface_get_visual for surface created by cairo_xlib_surface_create_with_xrender_format return NULL.

Because the surface is created with
a xrender_format rather than a visual.

Original mozilla bugs:
https://bugzilla.mozilla.org/show_bug.cgi?id=445250#c0
https://bugzilla.mozilla.org/show_bug.cgi?id=567065

2 years old request http://marc.info/?l=cairo&m=121625165621988&w=2
Comment 1 Chris Wilson 2010-06-11 02:43:06 UTC
commit 55037bfb2454a671332d961e061c712ab5471580
Author: Karl Tomlinson <karlt+@karlt.net>
Date:   Fri Jun 11 10:35:43 2010 +0100

    xlib: Find matching Visual for XRenderFormat
    
    Not only is this useful for users to know which Visual matches any
    particular Cairo surface, it should also close a few obscure bugs of not
    converting images correctly on upload.
    
    Fixes:
    
      Bug 28492 - cairo_xlib_surface_create_with_xrender_format does not
                  create visual for resulting surface
      https://bugs.freedesktop.org/show_bug.cgi?id=28492
    
      Mozilla Bug 567065 - Try to create offscreen Xlib surface from existing
                           visual if possible
      https://bugzilla.mozilla.org/show_bug.cgi?id=567065
    
      Mozilla Bug 445250 - cairo_draw_with_xlib should provide a non-NULL visual
                           to callback
      https://bugzilla.mozilla.org/show_bug.cgi?id=445250
    
    Reported-by: Oleg Romashin <romaxa@gmail.com>

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.