summaryrefslogtreecommitdiff
path: root/gtk/gtkimagedefinition.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2018-03-15 03:01:58 +0100
committerBenjamin Otte <otte@redhat.com>2018-03-16 06:04:45 +0100
commit9e54c22c49062c615f37dbb7f67472f788e0ab5a (patch)
treee7379b59dc0b6bcafa262fa247a0c963001522bf /gtk/gtkimagedefinition.c
parent01f996447e15094f72d14addb1634623bebb61c1 (diff)
downloadgtk+-9e54c22c49062c615f37dbb7f67472f788e0ab5a.tar.gz
image: Don't handle surfaces anymore
Lots of special cases that are no longer needed because no code uses surfaces. Also remove the GdkCellRendererPixbuf:surface property.
Diffstat (limited to 'gtk/gtkimagedefinition.c')
-rw-r--r--gtk/gtkimagedefinition.c37
1 files changed, 0 insertions, 37 deletions
diff --git a/gtk/gtkimagedefinition.c b/gtk/gtkimagedefinition.c
index f663f12365..059b41820d 100644
--- a/gtk/gtkimagedefinition.c
+++ b/gtk/gtkimagedefinition.c
@@ -22,7 +22,6 @@
typedef struct _GtkImageDefinitionEmpty GtkImageDefinitionEmpty;
typedef struct _GtkImageDefinitionIconName GtkImageDefinitionIconName;
typedef struct _GtkImageDefinitionGIcon GtkImageDefinitionGIcon;
-typedef struct _GtkImageDefinitionSurface GtkImageDefinitionSurface;
typedef struct _GtkImageDefinitionTexture GtkImageDefinitionTexture;
typedef struct _GtkImageDefinitionPaintable GtkImageDefinitionPaintable;
@@ -45,13 +44,6 @@ struct _GtkImageDefinitionGIcon {
GIcon *gicon;
};
-struct _GtkImageDefinitionSurface {
- GtkImageType type;
- gint ref_count;
-
- cairo_surface_t *surface;
-};
-
struct _GtkImageDefinitionTexture {
GtkImageType type;
gint ref_count;
@@ -72,7 +64,6 @@ union _GtkImageDefinition
GtkImageDefinitionEmpty empty;
GtkImageDefinitionIconName icon_name;
GtkImageDefinitionGIcon gicon;
- GtkImageDefinitionSurface surface;
GtkImageDefinitionTexture texture;
GtkImageDefinitionPaintable paintable;
};
@@ -92,7 +83,6 @@ gtk_image_definition_alloc (GtkImageType type)
sizeof (GtkImageDefinitionEmpty),
sizeof (GtkImageDefinitionIconName),
sizeof (GtkImageDefinitionGIcon),
- sizeof (GtkImageDefinitionSurface),
sizeof (GtkImageDefinitionTexture),
sizeof (GtkImageDefinitionPaintable)
};
@@ -136,20 +126,6 @@ gtk_image_definition_new_gicon (GIcon *gicon)
}
GtkImageDefinition *
-gtk_image_definition_new_surface (cairo_surface_t *surface)
-{
- GtkImageDefinition *def;
-
- if (surface == NULL)
- return NULL;
-
- def = gtk_image_definition_alloc (GTK_IMAGE_SURFACE);
- def->surface.surface = cairo_surface_reference (surface);
-
- return def;
-}
-
-GtkImageDefinition *
gtk_image_definition_new_texture (GdkTexture *texture)
{
GtkImageDefinition *def;
@@ -199,9 +175,6 @@ gtk_image_definition_unref (GtkImageDefinition *def)
case GTK_IMAGE_EMPTY:
g_assert_not_reached ();
break;
- case GTK_IMAGE_SURFACE:
- cairo_surface_destroy (def->surface.surface);
- break;
case GTK_IMAGE_TEXTURE:
g_object_unref (def->texture.texture);
break;
@@ -233,7 +206,6 @@ gtk_image_definition_get_scale (const GtkImageDefinition *def)
default:
g_assert_not_reached ();
case GTK_IMAGE_EMPTY:
- case GTK_IMAGE_SURFACE:
case GTK_IMAGE_PAINTABLE:
case GTK_IMAGE_TEXTURE:
case GTK_IMAGE_ICON_NAME:
@@ -260,15 +232,6 @@ gtk_image_definition_get_gicon (const GtkImageDefinition *def)
return def->gicon.gicon;
}
-cairo_surface_t *
-gtk_image_definition_get_surface (const GtkImageDefinition *def)
-{
- if (def->type != GTK_IMAGE_SURFACE)
- return NULL;
-
- return def->surface.surface;
-}
-
GdkTexture *
gtk_image_definition_get_texture (const GtkImageDefinition *def)
{