From: Koen Kooi Date: Wed, 14 Feb 2007 07:19:19 +0000 (+0000) Subject: pixop-test: adds new enhanced version written by Rob Taylor X-Git-Tag: Release-2010-05/1~9230^2~59^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3278d5079ad2d86a97bb495e3c75f91494ebf690;p=openembedded.git pixop-test: adds new enhanced version written by Rob Taylor --- diff --git a/packages/gtk+/pixops-test.bb b/packages/gtk+/pixops-test.bb index b65f700a16..79bc33a04f 100644 --- a/packages/gtk+/pixops-test.bb +++ b/packages/gtk+/pixops-test.bb @@ -1,7 +1,7 @@ DESCRIPTION = "Productive gtk+ devel prodder" DEPENDS = "gtk+" -PR = "r1" +PR = "r2" inherit pkgconfig diff --git a/packages/gtk+/pixops-test/pixops-test.c b/packages/gtk+/pixops-test/pixops-test.c index 33a11263de..f8906dfc42 100644 --- a/packages/gtk+/pixops-test/pixops-test.c +++ b/packages/gtk+/pixops-test/pixops-test.c @@ -1,35 +1,68 @@ #include #include +#include static gdouble total_seconds = 0.0; +/* randomly colour each pixel */ +static void +fill_pixbuf (GdkPixbuf *buf) +{ + int width, height, rowstride, n_channels; + int x,y,n; + guchar *pixels, *p; + + g_assert (gdk_pixbuf_get_bits_per_sample (buf) == 8); + + n_channels = gdk_pixbuf_get_n_channels (buf); + width = gdk_pixbuf_get_width (buf); + height = gdk_pixbuf_get_height (buf); + rowstride = gdk_pixbuf_get_rowstride (buf); + pixels = gdk_pixbuf_get_pixels (buf); + + for (x=0; x