summaryrefslogtreecommitdiff
path: root/gdk/gdkdraw.c
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@src.gnome.org>2000-03-28 01:24:44 +0000
committerOwen Taylor <otaylor@src.gnome.org>2000-03-28 01:24:44 +0000
commit8098546227671a5d082fdf8f4811ee3ffca7f6d8 (patch)
treed1857c89ee73451cbb04bbf595c0dc8bade55987 /gdk/gdkdraw.c
parent4238d406e928d1afd95ab0c6ae51b6a37f9780ea (diff)
downloadgdk-pixbuf-8098546227671a5d082fdf8f4811ee3ffca7f6d8.tar.gz
Merge no-flicker branch into HEAD
Diffstat (limited to 'gdk/gdkdraw.c')
-rw-r--r--gdk/gdkdraw.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/gdk/gdkdraw.c b/gdk/gdkdraw.c
index ef007c6c5..a30c1c4e2 100644
--- a/gdk/gdkdraw.c
+++ b/gdk/gdkdraw.c
@@ -47,6 +47,8 @@ gdk_drawable_alloc (void)
private->width = 1;
private->height = 1;
+ private->depth = 0;
+
private->colormap = NULL;
return drawable;
@@ -104,6 +106,15 @@ gdk_drawable_get_visual (GdkDrawable *drawable)
return colormap ? gdk_colormap_get_visual (colormap) : NULL;
}
+gint
+gdk_drawable_get_depth (GdkDrawable *drawable)
+{
+ GdkDrawablePrivate *private = (GdkDrawablePrivate *)drawable;
+ g_return_val_if_fail (drawable != NULL, 0);
+
+ return private->depth;
+}
+
GdkDrawable*
gdk_drawable_ref (GdkDrawable *drawable)
{
@@ -365,8 +376,12 @@ gdk_draw_image (GdkDrawable *drawable,
height = image->height;
- image_private->klass->image_put (image, drawable, gc, xsrc, ysrc,
- xdest, ydest, width, height);
+ if (GDK_IS_WINDOW (drawable))
+ _gdk_window_draw_image (drawable, gc, image, xsrc, ysrc,
+ xdest, ydest, width, height);
+ else
+ image_private->klass->image_put (image, drawable, gc, xsrc, ysrc,
+ xdest, ydest, width, height);
}
void