From f0c1464ff22ae5dce31776218b4bfcaa095e337c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Minisini?= Date: Wed, 27 Aug 2014 11:53:37 +0000 Subject: [PATCH] [GB.GTK] * NEW: Remove useless gb.gtk exported functions. * OPT: Prevent an unneeded image conversion in Paint.DrawImage(). [GB.GTK3] * NEW: Remove useless gb.gtk3 exported functions. * OPT: Prevent an unneeded image conversion in Paint.DrawImage(). git-svn-id: svn://localhost/gambas/trunk@6431 867c0c6c-44f3-4631-809d-bfa615b0a4ec --- gb.gtk/src/cpaint_impl.cpp | 3 +-- gb.gtk/src/gb.gtk.h | 2 -- gb.gtk/src/main.cpp | 2 -- 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/gb.gtk/src/cpaint_impl.cpp b/gb.gtk/src/cpaint_impl.cpp index ee1ab9afd..565a7e6fe 100644 --- a/gb.gtk/src/cpaint_impl.cpp +++ b/gb.gtk/src/cpaint_impl.cpp @@ -1278,7 +1278,6 @@ static void TransformMap(GB_TRANSFORM matrix, double *x, double *y) static void DrawImage(GB_PAINT *d, GB_IMAGE image, float x, float y, float w, float h, float opacity, GB_RECT *source) { cairo_t *cr = CONTEXT(d); - gPicture *picture = CIMAGE_get((CIMAGE *)image); cairo_surface_t *surface; cairo_pattern_t *pattern = NULL; cairo_pattern_t *save; @@ -1295,7 +1294,7 @@ static void DrawImage(GB_PAINT *d, GB_IMAGE image, float x, float y, float w, fl //if (source) // pixbuf = gdk_pixbuf_new_subpixbuf(pixbuf, source->x, source->y, source->w, source->h); - surface = picture->getSurface(); + surface = check_image(image); //picture->getSurface(); pattern = cairo_pattern_create_for_surface(surface); diff --git a/gb.gtk/src/gb.gtk.h b/gb.gtk/src/gb.gtk.h index 5dcdf4757..9b25bf07a 100644 --- a/gb.gtk/src/gb.gtk.h +++ b/gb.gtk/src/gb.gtk.h @@ -38,8 +38,6 @@ typedef struct { intptr_t version; - void *(*GetPicture)(GdkPixbuf *buf); - void *(*GetImage)(GdkPixbuf *buf); GtkWidget *(*CreateGLArea)(void *control, void *parent, void (*init)(GtkWidget *)); void *_null; } diff --git a/gb.gtk/src/main.cpp b/gb.gtk/src/main.cpp index c1f7e6f38..23d15412c 100644 --- a/gb.gtk/src/main.cpp +++ b/gb.gtk/src/main.cpp @@ -187,8 +187,6 @@ extern "C" void *GB_GTK_1[] EXPORT = { (void *)GTK_INTERFACE_VERSION, - (void *)GTK_GetPicture, - (void *)GTK_GetImage, (void *)GTK_CreateGLArea, NULL };