summaryrefslogtreecommitdiff
path: root/gsk/gskrenderer.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2016-11-16 04:14:32 +0100
committerBenjamin Otte <otte@redhat.com>2016-11-16 17:36:33 +0100
commit40565fb0308ba2e8a91a853af024bff49bd84a38 (patch)
tree828edcad15753dc51fd9e02b32eb91c07959eae7 /gsk/gskrenderer.c
parent455ce80ff7a98f3ef7591ac789ea2ea4e6a42053 (diff)
downloadgtk+-40565fb0308ba2e8a91a853af024bff49bd84a38.tar.gz
gsk: Rework GskTexture
We do no longer bind textures to a renderer, instead they are a way for applications to provide texture data. For now, that's it. We've reverted to uploading it from scratch every frame.
Diffstat (limited to 'gsk/gskrenderer.c')
-rw-r--r--gsk/gskrenderer.c41
1 files changed, 0 insertions, 41 deletions
diff --git a/gsk/gskrenderer.c b/gsk/gskrenderer.c
index de2867fea5..edf4633e58 100644
--- a/gsk/gskrenderer.c
+++ b/gsk/gskrenderer.c
@@ -134,44 +134,6 @@ gsk_renderer_real_create_cairo_surface (GskRenderer *self,
return res;
}
-static GskTexture *
-gsk_renderer_real_texture_new_for_data (GskRenderer *self,
- const guchar *data,
- int width,
- int height,
- int stride)
-{
- GSK_RENDERER_WARN_NOT_IMPLEMENTED_METHOD (self, texture_new_for_data);
-
- return NULL;
-}
-
-static GskTexture *
-gsk_renderer_real_texture_new_for_pixbuf (GskRenderer *renderer,
- GdkPixbuf *pixbuf)
-{
- GskTexture *texture;
- cairo_surface_t *surface;
-
- surface = gdk_cairo_surface_create_from_pixbuf (pixbuf, 1, NULL);
-
- texture = gsk_texture_new_for_data (renderer,
- cairo_image_surface_get_data (surface),
- cairo_image_surface_get_width (surface),
- cairo_image_surface_get_height (surface),
- cairo_image_surface_get_stride (surface));
-
- cairo_surface_destroy (surface);
-
- return texture;
-}
-
-static void
-gsk_renderer_real_texture_destroy (GskTexture *texture)
-{
- GSK_RENDERER_WARN_NOT_IMPLEMENTED_METHOD (gsk_texture_get_renderer (texture), texture_destroy);
-}
-
static void
gsk_renderer_dispose (GObject *gobject)
{
@@ -278,9 +240,6 @@ gsk_renderer_class_init (GskRendererClass *klass)
klass->unrealize = gsk_renderer_real_unrealize;
klass->render = gsk_renderer_real_render;
klass->create_cairo_surface = gsk_renderer_real_create_cairo_surface;
- klass->texture_new_for_data = gsk_renderer_real_texture_new_for_data;
- klass->texture_new_for_pixbuf = gsk_renderer_real_texture_new_for_pixbuf;
- klass->texture_destroy = gsk_renderer_real_texture_destroy;
gobject_class->constructed = gsk_renderer_constructed;
gobject_class->set_property = gsk_renderer_set_property;