Mesa (master): mesa: rename macro params to emphasize that there' s no particular color ordering

Brian Paul brianp at kemper.freedesktop.org
Fri Oct 10 22:39:43 UTC 2008


Module: Mesa
Branch: master
Commit: 3210a6d6c7e3d5660d31f6c736e0d0f7e34bcf6d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=3210a6d6c7e3d5660d31f6c736e0d0f7e34bcf6d

Author: Brian Paul <brian.paul at tungstengraphics.com>
Date:   Fri Oct 10 16:23:31 2008 -0600

mesa: rename macro params to emphasize that there's no particular color ordering

---

 src/mesa/main/colormac.h |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/src/mesa/main/colormac.h b/src/mesa/main/colormac.h
index a19521f..a34bd2e 100644
--- a/src/mesa/main/colormac.h
+++ b/src/mesa/main/colormac.h
@@ -1,8 +1,8 @@
 /*
  * Mesa 3-D graphics library
- * Version:  6.1
+ * Version:  7.3
  *
- * Copyright (C) 1999-2004  Brian Paul   All Rights Reserved.
+ * Copyright (C) 1999-2008  Brian Paul   All Rights Reserved.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
@@ -180,20 +180,20 @@ do {						\
  */
 /*@{*/
 
-#define PACK_COLOR_8888( R, G, B, A )					\
-   (((R) << 24) | ((G) << 16) | ((B) << 8) | (A))
+#define PACK_COLOR_8888( X, Y, Z, W ) \
+   (((X) << 24) | ((Y) << 16) | ((Z) << 8) | (W))
 
-#define PACK_COLOR_8888_REV( R, G, B, A )				\
-   (((A) << 24) | ((B) << 16) | ((G) << 8) | (R))
+#define PACK_COLOR_8888_REV( X, Y, Z, W ) \
+   (((W) << 24) | ((Z) << 16) | ((Y) << 8) | (X))
 
-#define PACK_COLOR_888( R, G, B )					\
-   (((R) << 16) | ((G) << 8) | (B))
+#define PACK_COLOR_888( X, Y, Z ) \
+   (((X) << 16) | ((Y) << 8) | (Z))
 
-#define PACK_COLOR_565( R, G, B )					\
-   ((((R) & 0xf8) << 8) | (((G) & 0xfc) << 3) | (((B) & 0xf8) >> 3))
+#define PACK_COLOR_565( X, Y, Z )                                  \
+   ((((X) & 0xf8) << 8) | (((Y) & 0xfc) << 3) | (((Z) & 0xf8) >> 3))
 
-#define PACK_COLOR_565_REV( R, G, B )					\
-   (((R) & 0xf8) | ((G) & 0xe0) >> 5 | (((G) & 0x1c) << 11) | (((B) & 0xf8) << 5))
+#define PACK_COLOR_565_REV( X, Y, Z ) \
+   (((X) & 0xf8) | ((Y) & 0xe0) >> 5 | (((Y) & 0x1c) << 11) | (((Z) & 0xf8) << 5))
 
 #define PACK_COLOR_1555( A, B, G, R )					\
    ((((B) & 0xf8) << 7) | (((G) & 0xf8) << 2) | (((R) & 0xf8) >> 3) |	\




More information about the mesa-commit mailing list