[gegl-gtk] gegl-gtk-view: do not use linear format when blitting to screen



commit fb4f9be26634beb65a7e1780e0123f69308888ca
Author: Massimo Valentini <mvalentini src gnome org>
Date:   Sat Sep 3 14:44:35 2011 +0200

    gegl-gtk-view: do not use linear format when blitting to screen

 gegl-gtk/gegl-gtk-view.c |    9 +--------
 1 files changed, 1 insertions(+), 8 deletions(-)
---
diff --git a/gegl-gtk/gegl-gtk-view.c b/gegl-gtk/gegl-gtk-view.c
index 8c944b0..79748ad 100644
--- a/gegl-gtk/gegl-gtk-view.c
+++ b/gegl-gtk/gegl-gtk-view.c
@@ -320,7 +320,6 @@ draw_implementation (GeglGtkViewPrivate *priv, cairo_t *cr, GdkRectangle *rect)
 {
   cairo_surface_t *surface = NULL;
   guchar          *buf = NULL;
-  Babl            *format = NULL;
   GeglRectangle   roi;
 
   roi.x = priv->x + rect->x;
@@ -330,16 +329,10 @@ draw_implementation (GeglGtkViewPrivate *priv, cairo_t *cr, GdkRectangle *rect)
 
   buf = g_malloc ((roi.width) * (roi.height) * 4);
 
-  format = babl_format_new (babl_model ("RGBA"), babl_type ("u8"),
-                            babl_component ("B"),
-                            babl_component ("G"),
-                            babl_component ("R"),
-                            babl_component ("A"),
-                            NULL);
   gegl_node_blit (priv->node,
                   priv->scale,
                   &roi,
-                  format,
+                  babl_format ("B'aG'aR'aA u8"),
                   (gpointer)buf,
                   GEGL_AUTO_ROWSTRIDE,
                   GEGL_BLIT_CACHE | (priv->block ? 0 : GEGL_BLIT_DIRTY));



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]