winex11.drv: Make X11DRV_PALETTE_ComputeColorShifts() static.

Francois Gouget fgouget at free.fr
Mon Jan 5 12:30:44 CST 2015


---

It's not used outside of palette.c.


 dlls/winex11.drv/palette.c | 116 ++++++++++++++++++++++-----------------------
 dlls/winex11.drv/x11drv.h  |   1 -
 2 files changed, 58 insertions(+), 59 deletions(-)

diff --git a/dlls/winex11.drv/palette.c b/dlls/winex11.drv/palette.c
index cf049c5..a399ec9 100644
--- a/dlls/winex11.drv/palette.c
+++ b/dlls/winex11.drv/palette.c
@@ -127,6 +127,64 @@ static void palette_set_mapping( HPALETTE hpal, int *mapping )
 
 
 /***********************************************************************
+ *		X11DRV_PALETTE_ComputeChannelShift
+ *
+ * Calculate conversion parameters for a given color mask
+ */
+static void X11DRV_PALETTE_ComputeChannelShift(unsigned long maskbits, ChannelShift *physical, ChannelShift *to_logical)
+{
+    int i;
+
+    if (maskbits==0)
+    {
+        physical->shift=0;
+        physical->scale=0;
+        physical->max=0;
+        to_logical->shift=0;
+        to_logical->scale=0;
+        to_logical->max=0;
+        return;
+    }
+
+    for(i=0;!(maskbits&1);i++)
+        maskbits >>= 1;
+
+    physical->shift = i;
+    physical->max = maskbits;
+
+    for(i=0;maskbits!=0;i++)
+        maskbits >>= 1;
+    physical->scale = i;
+
+    if (physical->scale>8)
+    {
+        /* On FreeBSD, VNC's default 32bpp mode is bgrabb (ffc00000,3ff800,7ff)!
+         * So we adjust the shifts to also normalize the color fields to
+         * the Win32 standard of 8 bits per color.
+         */
+        to_logical->shift=physical->shift+(physical->scale-8);
+        to_logical->scale=8;
+        to_logical->max=0xff;
+    } else {
+        to_logical->shift=physical->shift;
+        to_logical->scale=physical->scale;
+        to_logical->max=physical->max;
+    }
+}
+
+/***********************************************************************
+ *      X11DRV_PALETTE_ComputeColorShifts
+ *
+ * Calculate conversion parameters for a given color
+ */
+static void X11DRV_PALETTE_ComputeColorShifts(ColorShifts *shifts, unsigned long redMask, unsigned long greenMask, unsigned long blueMask)
+{
+    X11DRV_PALETTE_ComputeChannelShift(redMask, &shifts->physicalRed, &shifts->logicalRed);
+    X11DRV_PALETTE_ComputeChannelShift(greenMask, &shifts->physicalGreen, &shifts->logicalGreen);
+    X11DRV_PALETTE_ComputeChannelShift(blueMask, &shifts->physicalBlue, &shifts->logicalBlue);
+}
+
+/***********************************************************************
  *           COLOR_Init
  *
  * Initialize color management.
@@ -211,64 +269,6 @@ int X11DRV_PALETTE_Init(void)
 }
 
 /***********************************************************************
- *		X11DRV_PALETTE_ComputeChannelShift
- *
- * Calculate conversion parameters for a given color mask
- */
-static void X11DRV_PALETTE_ComputeChannelShift(unsigned long maskbits, ChannelShift *physical, ChannelShift *to_logical)
-{
-    int i;
-
-    if (maskbits==0)
-    {
-        physical->shift=0;
-        physical->scale=0;
-        physical->max=0;
-        to_logical->shift=0;
-        to_logical->scale=0;
-        to_logical->max=0;
-        return;
-    }
-
-    for(i=0;!(maskbits&1);i++)
-        maskbits >>= 1;
-
-    physical->shift = i;
-    physical->max = maskbits;
-
-    for(i=0;maskbits!=0;i++)
-        maskbits >>= 1;
-    physical->scale = i;
-
-    if (physical->scale>8)
-    {
-        /* On FreeBSD, VNC's default 32bpp mode is bgrabb (ffc00000,3ff800,7ff)!
-         * So we adjust the shifts to also normalize the color fields to
-         * the Win32 standard of 8 bits per color.
-         */
-        to_logical->shift=physical->shift+(physical->scale-8);
-        to_logical->scale=8;
-        to_logical->max=0xff;
-    } else {
-        to_logical->shift=physical->shift;
-        to_logical->scale=physical->scale;
-        to_logical->max=physical->max;
-    }
-}
-
-/***********************************************************************
- *      X11DRV_PALETTE_ComputeColorShifts
- *
- * Calculate conversion parameters for a given color
- */
-void X11DRV_PALETTE_ComputeColorShifts(ColorShifts *shifts, unsigned long redMask, unsigned long greenMask, unsigned long blueMask)
-{
-    X11DRV_PALETTE_ComputeChannelShift(redMask, &shifts->physicalRed, &shifts->logicalRed);
-    X11DRV_PALETTE_ComputeChannelShift(greenMask, &shifts->physicalGreen, &shifts->logicalGreen);
-    X11DRV_PALETTE_ComputeChannelShift(blueMask, &shifts->physicalBlue, &shifts->logicalBlue);
-}
-
-/***********************************************************************
  *           X11DRV_PALETTE_BuildPrivateMap
  *
  * Allocate colorcells and initialize mapping tables.
diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h
index bcbfe14..0adf7f3 100644
--- a/dlls/winex11.drv/x11drv.h
+++ b/dlls/winex11.drv/x11drv.h
@@ -267,7 +267,6 @@ extern BOOL X11DRV_IsSolidColor(COLORREF color) DECLSPEC_HIDDEN;
 extern COLORREF X11DRV_PALETTE_ToLogical(X11DRV_PDEVICE *physDev, int pixel) DECLSPEC_HIDDEN;
 extern int X11DRV_PALETTE_ToPhysical(X11DRV_PDEVICE *physDev, COLORREF color) DECLSPEC_HIDDEN;
 extern COLORREF X11DRV_PALETTE_GetColor( X11DRV_PDEVICE *physDev, COLORREF color ) DECLSPEC_HIDDEN;
-extern void X11DRV_PALETTE_ComputeColorShifts(ColorShifts *shifts, unsigned long redMask, unsigned long greenMask, unsigned long blueMask) DECLSPEC_HIDDEN;
 
 /* GDI escapes */
 
-- 
2.1.4




More information about the wine-patches mailing list