gtk: kill gdk_draw_* apis that will go away in gtk 2.22

So it's summer cleanup in gnome land and some functions
will go away in the next gtk release. So remove the
usage.

Reference:
http://blogs.gnome.org/otte/2010/07/27/rendering-cleanup/
This commit is contained in:
riccardom 2010-08-01 14:35:15 +00:00
parent 82db2206b0
commit f842340653
1 changed files with 6 additions and 5 deletions

View File

@ -1128,6 +1128,7 @@ static gboolean ExposeDrawingArea (GtkWidget *widget, GdkEventExpose *event, gpo
{
GdkPixbuf *resizedPixbuf, *drawPixbuf;
guchar rgb[SCREENS_PIXEL_SIZE*SCREEN_BYTES_PER_PIXEL];
cairo_t *cr;
gfloat vratio, hratio, nscreen_ratio;
gint daW, daH, imgW, imgH, screenW, screenH, gapW, gapH;
@ -1215,15 +1216,15 @@ static gboolean ExposeDrawingArea (GtkWidget *widget, GdkEventExpose *event, gpo
drawPixbuf = resizedPixbuf;
}
gdk_draw_pixbuf(widget->window, NULL, drawPixbuf, 0, 0, primaryOffsetX, primaryOffsetY, screenW, screenH,
GDK_RGB_DITHER_NONE, 0,0);
cr = gdk_cairo_create(widget->window);
gdk_cairo_set_source_pixbuf(cr, drawPixbuf, 0, 0);
if (nds_screen.orientation != ORIENT_SINGLE) {
gdk_draw_pixbuf(widget->window, NULL, drawPixbuf, secondaryPixbufOffsetX, secondaryPixbufOffsetY, secondaryOffsetX, secondaryOffsetY, screenW, screenH,
GDK_RGB_DITHER_NONE, 0,0);
gdk_cairo_set_source_pixbuf(cr, drawPixbuf, primaryOffsetX, primaryOffsetY);
}
g_object_unref(drawPixbuf);
cairo_paint(cr);
cairo_destroy(cr);
return TRUE;
}