[gdk-pixbuf] tests: Fill the default pixbuf with the placeholder colour



commit 39a31870177bb06162c3cd1a8d0dbb3571ee3c0b
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Dec 28 16:38:00 2016 +0100

    tests: Fill the default pixbuf with the placeholder colour
    
    Ideally, we should only be comparing data that the loader told us it
    updated, and this is kind of what we're doing, as long as we don't have
    a legitimate image that uses the exact same filler colour. Unlikely
    though.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=696331

 tests/pixbuf-reftest.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/tests/pixbuf-reftest.c b/tests/pixbuf-reftest.c
index 25e8783..fd54146 100644
--- a/tests/pixbuf-reftest.c
+++ b/tests/pixbuf-reftest.c
@@ -25,6 +25,9 @@
 
 #include "test-common.h"
 
+/* As defined in gdk-pixbuf-private.h */
+#define DEFAULT_FILL_COLOR 0x979899ff
+
 static void
 loader_size_prepared (GdkPixbufLoader  *loader,
                       int               w,
@@ -35,6 +38,8 @@ loader_size_prepared (GdkPixbufLoader  *loader,
 
   *pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, w, h);
   g_assert (*pixbuf != NULL);
+  /* likely!! */
+  gdk_pixbuf_fill (*pixbuf, DEFAULT_FILL_COLOR);
 }
 
 static void


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