[maemo-commits] [maemo-commits] r17528 - in projects/haf/trunk/clutter: clutter/cogl/common debian

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Fri Feb 27 13:09:57 EET 2009
Author: gw
Date: 2009-02-27 13:09:54 +0200 (Fri, 27 Feb 2009)
New Revision: 17528

Modified:
   projects/haf/trunk/clutter/clutter/cogl/common/cogl-bitmap-pixbuf.c
   projects/haf/trunk/clutter/debian/changelog
Log:
Changed colour ranges for _cogl_bitmap_check_alpha to make it more safe


Modified: projects/haf/trunk/clutter/clutter/cogl/common/cogl-bitmap-pixbuf.c
===================================================================
--- projects/haf/trunk/clutter/clutter/cogl/common/cogl-bitmap-pixbuf.c	2009-02-26 15:41:18 UTC (rev 17527)
+++ projects/haf/trunk/clutter/clutter/cogl/common/cogl-bitmap-pixbuf.c	2009-02-27 11:09:54 UTC (rev 17528)
@@ -123,8 +123,8 @@
           * as far as I know, C standard doesn't say a bool has to be
           * between 0 and 1, so I use ternary to make sure. I *hope*
           * this gets optimised out */
-         ctransparent += ((*src) < 32) ? 1 : 0;
-         copaque += ((*src) >= 224) ? 1 : 0;
+         ctransparent += ((*src) < 16) ? 1 : 0;
+         copaque += ((*src) >= 240) ? 1 : 0;
          src += 4;
        }
    }

Modified: projects/haf/trunk/clutter/debian/changelog
===================================================================
--- projects/haf/trunk/clutter/debian/changelog	2009-02-26 15:41:18 UTC (rev 17527)
+++ projects/haf/trunk/clutter/debian/changelog	2009-02-27 11:09:54 UTC (rev 17528)
@@ -2,6 +2,7 @@
 
   * Fixed coverity findings for clutter-behaviour-rotate.c
   * Fixed coverity findings for json-parser.c
+  * Changed colour ranges for _cogl_bitmap_check_alpha to make it more safe
   * unreleased
 
  -- Gordon Williams <gordon.williams at collabora.co.uk>  Mon, 23 Feb 2009 13:59:13 +0200


More information about the maemo-commits mailing list