r13753 tlsa - /trunk/netsurf/desktop/plot_style.h

netsurf at semichrome.net netsurf at semichrome.net
Tue Mar 27 22:34:55 BST 2012


Author: tlsa
Date: Tue Mar 27 16:34:55 2012
New Revision: 13753

URL: http://source.netsurf-browser.org?rev=13753&view=rev
Log:
Clean up blend_colour macro.

Modified:
    trunk/netsurf/desktop/plot_style.h

Modified: trunk/netsurf/desktop/plot_style.h
URL: http://source.netsurf-browser.org/trunk/netsurf/desktop/plot_style.h?rev=13753&r1=13752&r2=13753&view=diff
==============================================================================
--- trunk/netsurf/desktop/plot_style.h (original)
+++ trunk/netsurf/desktop/plot_style.h Tue Mar 27 16:34:55 2012
@@ -60,9 +60,9 @@
  * colour and adding them to half the intensity of each channel in the second
  * colour */
 #define blend_colour(c0, c1)						\
-	 ((((c0 >> 16) + (c1 >> 16)) >> 1) << 16) |			\
-	(((((c0 >> 8) & 0xff) + ((c1 >> 8) & 0xff)) >> 1) << 8) |	\
-	 ((((c0 & 0xff) + (c1 & 0xff)) >> 1) << 0)
+	(((((c0 >> 16) & 0xff) + ((c1 >> 16) & 0xff)) >> 1) << 16) |	\
+	(((((c0 >>  8) & 0xff) + ((c1 >>  8) & 0xff)) >> 1) <<  8) |	\
+	(((( c0        & 0xff) + ( c1        & 0xff)) >> 1) <<  0)
 
 /* get a bitmap pixel (image/bitmap.h) into a plot colour */
 #define pixel_to_colour(b)					\




More information about the netsurf-commits mailing list