forked from AuroraMiddleware/gtk
gdk_pixbuf_get_from_source: only reuse surfaces with matching format
Otherwise the conversion functions will return rubbish. https://bugzilla.gnome.org/show_bug.cgi?id=707445
This commit is contained in:
parent
fc7d26860a
commit
0735aa1c2e
@ -248,7 +248,8 @@ gdk_pixbuf_get_from_surface (cairo_surface_t *surface,
|
||||
8,
|
||||
width, height);
|
||||
|
||||
if (cairo_surface_get_type (surface) == CAIRO_SURFACE_TYPE_IMAGE)
|
||||
if (cairo_surface_get_type (surface) == CAIRO_SURFACE_TYPE_IMAGE &&
|
||||
cairo_image_surface_get_format (surface) == gdk_cairo_format_for_content (content))
|
||||
surface = cairo_surface_reference (surface);
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user