[gtk+/wip/window-scales: 5/11] Gtk: Use gdk_cairo_surface_create_similar
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/window-scales: 5/11] Gtk: Use gdk_cairo_surface_create_similar
- Date: Tue, 4 Jun 2013 09:57:46 +0000 (UTC)
commit 7855a8600eda0cf7764f6d43e19c367d7871db85
Author: Alexander Larsson <alexl redhat com>
Date: Mon Jun 3 17:03:39 2013 +0200
Gtk: Use gdk_cairo_surface_create_similar
gtk/gtkcssimage.c | 2 +-
gtk/gtknumerableicon.c | 6 +++---
gtk/gtkthemingbackground.c | 6 +++---
3 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/gtk/gtkcssimage.c b/gtk/gtkcssimage.c
index 167af64..a687278 100644
--- a/gtk/gtkcssimage.c
+++ b/gtk/gtkcssimage.c
@@ -392,7 +392,7 @@ _gtk_css_image_get_surface (GtkCssImage *image,
g_return_val_if_fail (surface_height > 0, NULL);
if (target)
- result = cairo_surface_create_similar (target,
+ result = gdk_cairo_surface_create_similar (target,
CAIRO_CONTENT_COLOR_ALPHA,
surface_width,
surface_height);
diff --git a/gtk/gtknumerableicon.c b/gtk/gtknumerableicon.c
index e465471..f9233a5 100644
--- a/gtk/gtknumerableicon.c
+++ b/gtk/gtknumerableicon.c
@@ -175,9 +175,9 @@ draw_from_image (cairo_surface_t *image)
cairo_surface_t *surface;
cairo_t *cr;
- surface = cairo_surface_create_similar (image, CAIRO_CONTENT_COLOR_ALPHA,
- cairo_image_surface_get_width (image),
- cairo_image_surface_get_height (image));
+ surface = gdk_cairo_surface_create_similar (image, CAIRO_CONTENT_COLOR_ALPHA,
+ cairo_image_surface_get_width (image),
+ cairo_image_surface_get_height (image));
cr = cairo_create (surface);
cairo_set_source_surface (cr, image, 0, 0);
diff --git a/gtk/gtkthemingbackground.c b/gtk/gtkthemingbackground.c
index 706752b..1566aae 100644
--- a/gtk/gtkthemingbackground.c
+++ b/gtk/gtkthemingbackground.c
@@ -216,9 +216,9 @@ _gtk_theming_background_paint_layer (GtkThemingBackground *bg,
else
surface_height = round (image_height);
- surface = cairo_surface_create_similar (cairo_get_target (cr),
- CAIRO_CONTENT_COLOR_ALPHA,
- surface_width, surface_height);
+ surface = gdk_cairo_surface_create_similar (cairo_get_target (cr),
+ CAIRO_CONTENT_COLOR_ALPHA,
+ surface_width, surface_height);
cr2 = cairo_create (surface);
cairo_translate (cr2,
0.5 * (surface_width - image_width),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]