Author: jgardou
Date: Fri Aug 6 22:09:38 2010
New Revision: 48472
URL:
http://svn.reactos.org/svn/reactos?rev=48472&view=rev
Log:
revert xlate.c from 48471, never meant to be committed.
Sorry.
Modified:
branches/reactos-yarotows/subsystems/win32/win32k/eng/xlate.c
Modified: branches/reactos-yarotows/subsystems/win32/win32k/eng/xlate.c
URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/subsystems/win…
==============================================================================
--- branches/reactos-yarotows/subsystems/win32/win32k/eng/xlate.c [iso-8859-1] (original)
+++ branches/reactos-yarotows/subsystems/win32/win32k/eng/xlate.c [iso-8859-1] Fri Aug 6
22:09:38 2010
@@ -83,45 +83,66 @@
{
ULONG iNewColor;
- /* Copy blue */
- iColor >>= 3;
- iNewColor = iColor & 0x1F;
-
- /* Copy green */
- iColor >>= 3;
- iNewColor |= iColor & 0x3E0;
-
- /* Copy red */
- iColor >>= 3;
- iNewColor |= iColor & 0x7C00;
-
- return iNewColor;
-}
-
-ULONG
-FASTCALL
-EXLATEOBJ_iXlateBGRto555(PEXLATEOBJ pxlo, ULONG iColor)
-{
- ULONG iNewColor;
-
/* Copy red */
iColor <<= 7;
iNewColor = iColor & 0x7C00;
/* Copy green */
iColor >>= 13;
+ iNewColor |= iColor & 0x3E0;
+
+ /* Copy green */
+ iColor >>= 13;
+ iNewColor |= iColor & 0x1F;
+
+ return iNewColor;
+}
+
+ULONG
+FASTCALL
+EXLATEOBJ_iXlateBGRto555(PEXLATEOBJ pxlo, ULONG iColor)
+{
+ ULONG iNewColor;
+
+ /* Copy blue */
+ iColor >>= 3;
+ iNewColor = iColor & 0x1f;
+
+ /* Copy green */
+ iColor >>= 3;
iNewColor |= (iColor & 0x3E0);
- /* Copy blue */
+ /* Copy red */
+ iColor >>= 3;
+ iNewColor |= (iColor & 0x7C00);
+
+ return iNewColor;
+}
+
+ULONG
+FASTCALL
+EXLATEOBJ_iXlateRGBto565(PEXLATEOBJ pxlo, ULONG iColor)
+{
+ ULONG iNewColor;
+
+ /* Copy red */
+ iColor <<= 8;
+ iNewColor = iColor & 0xF800;
+
+ /* Copy green */
iColor >>= 13;
- iNewColor |= (iColor & 0x1F);
-
- return iNewColor;
-}
-
-ULONG
-FASTCALL
-EXLATEOBJ_iXlateRGBto565(PEXLATEOBJ pxlo, ULONG iColor)
+ iNewColor |= iColor & 0x7E0;
+
+ /* Copy green */
+ iColor >>= 14;
+ iNewColor |= iColor & 0x1F;
+
+ return iNewColor;
+}
+
+ULONG
+FASTCALL
+EXLATEOBJ_iXlateBGRto565(PEXLATEOBJ pxlo, ULONG iColor)
{
ULONG iNewColor;
@@ -142,35 +163,34 @@
ULONG
FASTCALL
-EXLATEOBJ_iXlateBGRto565(PEXLATEOBJ pxlo, ULONG iColor)
-{
- ULONG iNewColor;
+EXLATEOBJ_iXlateRGBtoPal(PEXLATEOBJ pexlo, ULONG iColor)
+{
+ return PALETTE_ulGetNearestPaletteIndex(pexlo->ppalDst, iColor);
+}
+
+ULONG
+FASTCALL
+EXLATEOBJ_iXlate555toRGB(PEXLATEOBJ pxlo, ULONG iColor)
+{
+ ULONG iNewColor;
+
+ /* Copy blue */
+ iNewColor = gajXlate5to8[iColor & 0x1F] << 16;
+
+ /* Copy green */
+ iColor >>= 5;
+ iNewColor |= gajXlate5to8[iColor & 0x1F] << 8;
/* Copy red */
- iColor <<= 8;
- iNewColor = iColor & 0xF800;
-
- /* Copy green */
- iColor >>= 13;
- iNewColor |= iColor & 0x7E0;
-
- /* Copy green */
- iColor >>= 14;
- iNewColor |= iColor & 0x1F;
-
- return iNewColor;
-}
-
-ULONG
-FASTCALL
-EXLATEOBJ_iXlateRGBtoPal(PEXLATEOBJ pexlo, ULONG iColor)
-{
- return PALETTE_ulGetNearestPaletteIndex(pexlo->ppalDst, iColor);
-}
-
-ULONG
-FASTCALL
-EXLATEOBJ_iXlate555toRGB(PEXLATEOBJ pxlo, ULONG iColor)
+ iColor >>= 5;
+ iNewColor |= gajXlate5to8[iColor & 0x1F];
+
+ return iNewColor;
+}
+
+ULONG
+FASTCALL
+EXLATEOBJ_iXlate555toBGR(PEXLATEOBJ pxlo, ULONG iColor)
{
ULONG iNewColor;
@@ -190,26 +210,6 @@
ULONG
FASTCALL
-EXLATEOBJ_iXlate555toBGR(PEXLATEOBJ pxlo, ULONG iColor)
-{
- ULONG iNewColor;
-
- /* Copy blue */
- iNewColor = gajXlate5to8[iColor & 0x1F] << 16;
-
- /* Copy green */
- iColor >>= 5;
- iNewColor |= gajXlate5to8[iColor & 0x1F] << 8;
-
- /* Copy red */
- iColor >>= 5;
- iNewColor |= gajXlate5to8[iColor & 0x1F];
-
- return iNewColor;
-}
-
-ULONG
-FASTCALL
EXLATEOBJ_iXlate555to565(PEXLATEOBJ pxlo, ULONG iColor)
{
ULONG iNewColor;
@@ -260,26 +260,6 @@
ULONG iNewColor;
/* Copy blue */
- iNewColor = gajXlate5to8[iColor & 0x1F];
-
- /* Copy green */
- iColor >>= 5;
- iNewColor |= gajXlate6to8[iColor & 0x3F] << 8;
-
- /* Copy red */
- iColor >>= 6;
- iNewColor |= gajXlate5to8[iColor & 0x1F] << 16;
-
- return iNewColor;
-}
-
-ULONG
-FASTCALL
-EXLATEOBJ_iXlate565toBGR(PEXLATEOBJ pexlo, ULONG iColor)
-{
- ULONG iNewColor;
-
- /* Copy blue */
iNewColor = gajXlate5to8[iColor & 0x1F] << 16;
/* Copy green */
@@ -289,6 +269,26 @@
/* Copy red */
iColor >>= 6;
iNewColor |= gajXlate5to8[iColor & 0x1F];
+
+ return iNewColor;
+}
+
+ULONG
+FASTCALL
+EXLATEOBJ_iXlate565toBGR(PEXLATEOBJ pexlo, ULONG iColor)
+{
+ ULONG iNewColor;
+
+ /* Copy blue */
+ iNewColor = gajXlate5to8[iColor & 0x1F];
+
+ /* Copy green */
+ iColor >>= 5;
+ iNewColor |= gajXlate6to8[iColor & 0x3F] << 8;
+
+ /* Copy blue */
+ iColor >>= 6;
+ iNewColor |= gajXlate5to8[iColor & 0x1F] << 16;
return iNewColor;
}