Skip to contentSkip to conversation

fbdev: Consolidate common drawing functions into a header file

PATCH In review Antonino A. Daplas 1 participant 1 message Apr 25, 2007 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH 26/41 fbdev: Consolidate common drawing functions into a header file

Consolidate common drawing functions into a single header file.

---

 drivers/video/cfbcopyarea.c |   14 +-------
 drivers/video/cfbfillrect.c |   68 +----------------------------------------
 drivers/video/fb_draw.h     |   72 +++++++++++++++++++++++++++++++++++++++++++
 drivers/video/syscopyarea.c |   12 +------
 drivers/video/sysfillrect.c |   68 +----------------------------------------
 5 files changed, 76 insertions(+), 158 deletions(-)
drivers/video/cfbcopyarea.c +1 -13
index 6faea40..032210f 100644
@@ -22,8 +22,6 @@
  *  help moving some redundant computations and branches out of the loop, too.
  */
 
-
-
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
@@ -31,6 +29,7 @@ #include <linux/fb.h>
 #include <linux/slab.h>
 #include <asm/types.h>
 #include <asm/io.h>
+#include "fb_draw.h"
 
 #if BITS_PER_LONG == 32
 #  define FB_WRITEL fb_writel
@@ -41,17 +40,6 @@ #  define FB_READL  fb_readq
 #endif
 
     /*
-     *  Compose two values, using a bitmask as decision value
-     *  This is equivalent to (a & mask) | (b & ~mask)
-     */
-
-static inline unsigned long
-comp(unsigned long a, unsigned long b, unsigned long mask)
-{
-    return ((a ^ b) & mask) ^ b;
-}
-
-    /*
      *  Generic bitwise copy algorithm
      */
 
drivers/video/cfbfillrect.c +1 -67

80 lines not on this page · raw message

drivers/video/fb_draw.h new file +72 -0

72 lines not on this page · raw message

drivers/video/syscopyarea.c +1 -11
index e348893..37af10a 100644
@@ -19,17 +19,7 @@ #include <linux/fb.h>
 #include <linux/slab.h>
 #include <asm/types.h>
 #include <asm/io.h>
-
-    /*
-     *  Compose two values, using a bitmask as decision value
-     *  This is equivalent to (a & mask) | (b & ~mask)
-     */
-
-static inline unsigned long
-comp(unsigned long a, unsigned long b, unsigned long mask)
-{
-    return ((a ^ b) & mask) ^ b;
-}
+#include "fb_draw.h"
 
     /*
      *  Generic bitwise copy algorithm
drivers/video/sysfillrect.c +1 -67

74 lines not on this page · raw message

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/