diff options
author | Timm Bäder <mail@baedert.org> | 2018-03-19 08:57:40 +0100 |
---|---|---|
committer | Timm Bäder <mail@baedert.org> | 2018-03-20 09:37:59 +0100 |
commit | 4353ad224ffae57ba5cb34c86a8abec3aca691c9 (patch) | |
tree | b4d8c57e51ca8ec2d085959a837b6b890fa34cdd /gdk/gdktexture.c | |
parent | 85eef63b321ffc901b1fdb89a3418dd4c68d29e6 (diff) | |
download | gtk+-4353ad224ffae57ba5cb34c86a8abec3aca691c9.tar.gz |
rendernode: Check cairo surface status after creation
Diffstat (limited to 'gdk/gdktexture.c')
-rw-r--r-- | gdk/gdktexture.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gdk/gdktexture.c b/gdk/gdktexture.c index 6aeed4152a..c518bac8a4 100644 --- a/gdk/gdktexture.c +++ b/gdk/gdktexture.c @@ -151,9 +151,16 @@ static cairo_surface_t * gdk_texture_real_download_surface (GdkTexture *texture) { cairo_surface_t *surface; + cairo_status_t surface_status; surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, texture->width, texture->height); + + surface_status = cairo_surface_status (surface); + if (surface_status != CAIRO_STATUS_SUCCESS) + g_warning ("%s: surface error: %s", __FUNCTION__, + cairo_status_to_string (surface_status)); + gdk_texture_download (texture, cairo_image_surface_get_data (surface), cairo_image_surface_get_stride (surface)); |