Fixing strechblt dib16 and dib32 can be compile with -O2 (gcc) reporeted by jimtalor...
authorMagnus Olsen <magnus@greatlord.com>
Tue, 23 May 2006 21:18:08 +0000 (21:18 +0000)
committerMagnus Olsen <magnus@greatlord.com>
Tue, 23 May 2006 21:18:08 +0000 (21:18 +0000)
svn path=/trunk/; revision=21995

reactos/subsystems/win32/win32k/dib/dib16bpp.c
reactos/subsystems/win32/win32k/dib/dib32bpp.c

index 0ac0517..ac5b2a2 100644 (file)
@@ -687,8 +687,9 @@ BOOLEAN DIB_16BPP_StretchBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf,
                                                                        
                   sx = ((DesX * SrcSizeX) / DesSizeX) + SourceRect->left;              
                   color = DIB_4BPP_GetPixel(SourceSurf, sx, sy);
+                  color = XLATEOBJ_iXlate(ColorTranslation, color);
                               
-                                 *DestBits = XLATEOBJ_iXlate(ColorTranslation, color);                                                           
+                                 *DestBits = color;                                                              
                                   DestBits = (PULONG)((ULONG_PTR)DestBits + 2);
             }
             DestBits = (PULONG)((ULONG_PTR)DestBits + DifflDelta);
@@ -713,8 +714,8 @@ BOOLEAN DIB_16BPP_StretchBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf,
                                                                        
                   sx = ((DesX * SrcSizeX) / DesSizeX) + SourceRect->left;              
                   color = DIB_8BPP_GetPixel(SourceSurf, sx, sy);
-                              
-                                 *DestBits = XLATEOBJ_iXlate(ColorTranslation, color);                                                           
+                  color = XLATEOBJ_iXlate(ColorTranslation, color);            
+                                 *DestBits = color;                                                              
                                   DestBits = (PULONG)((ULONG_PTR)DestBits + 2);
             }
             DestBits = (PULONG)((ULONG_PTR)DestBits + DifflDelta);
@@ -740,8 +741,9 @@ BOOLEAN DIB_16BPP_StretchBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf,
                                                                        
                   sx = ((DesX * SrcSizeX) / DesSizeX) + SourceRect->left;              
                   color = DIB_24BPP_GetPixel(SourceSurf, sx, sy);
+                  color = XLATEOBJ_iXlate(ColorTranslation, color);
                               
-                                 *DestBits = XLATEOBJ_iXlate(ColorTranslation, color);                                                           
+                                 *DestBits = color;                                                              
                                   DestBits = (PULONG)((ULONG_PTR)DestBits + 2);
             }
             DestBits = (PULONG)((ULONG_PTR)DestBits + DifflDelta);
@@ -766,8 +768,9 @@ BOOLEAN DIB_16BPP_StretchBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf,
                                                                        
                   sx = ((DesX * SrcSizeX) / DesSizeX) + SourceRect->left;              
                   color = DIB_32BPP_GetPixel(SourceSurf, sx, sy);
+                  color = XLATEOBJ_iXlate(ColorTranslation, color);
                               
-                                 *DestBits = XLATEOBJ_iXlate(ColorTranslation, color);                                                           
+                                 *DestBits = color;                                                              
                                   DestBits = (PULONG)((ULONG_PTR)DestBits + 2);
             }
             DestBits = (PULONG)((ULONG_PTR)DestBits + DifflDelta);
index 28d7fbf..d7a910d 100644 (file)
@@ -609,7 +609,8 @@ BOOLEAN DIB_32BPP_StretchBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf,
             {                  
                  sx = ((DesX  * SrcSizeX) / DesSizeX) + SourceRect->left;              
                  color = DIB_4BPP_GetPixel(SourceSurf, sx, sy);
-                 *DestBits =  XLATEOBJ_iXlate(ColorTranslation, color);
+                 color = XLATEOBJ_iXlate(ColorTranslation, color);
+                 *DestBits =  color;
             }
             
             DestBits = (PULONG)((ULONG_PTR)DestBits + DifflDelta);
@@ -633,7 +634,8 @@ BOOLEAN DIB_32BPP_StretchBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf,
             {                  
                  sx = ((DesX  * SrcSizeX) / DesSizeX) + SourceRect->left;              
                  color = DIB_8BPP_GetPixel(SourceSurf, sx, sy);
-                 *DestBits =  XLATEOBJ_iXlate(ColorTranslation, color);
+                 color = XLATEOBJ_iXlate(ColorTranslation, color);
+                 *DestBits =  color;
             }
             DestBits = (PULONG)((ULONG_PTR)DestBits + DifflDelta);
        }                               
@@ -656,7 +658,8 @@ BOOLEAN DIB_32BPP_StretchBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf,
             {                  
                  sx = ((DesX  * SrcSizeX) / DesSizeX) + SourceRect->left;              
                  color = DIB_16BPP_GetPixel(SourceSurf, sx, sy);
-                 *DestBits =  XLATEOBJ_iXlate(ColorTranslation, color);
+                 color = XLATEOBJ_iXlate(ColorTranslation, color);
+                 *DestBits = color;
             }
             DestBits = (PULONG)((ULONG_PTR)DestBits + DifflDelta);
        }                  
@@ -679,7 +682,8 @@ BOOLEAN DIB_32BPP_StretchBlt(SURFOBJ *DestSurf, SURFOBJ *SourceSurf,
             {                  
                  sx = ((DesX  * SrcSizeX) / DesSizeX) + SourceRect->left;              
                  color = DIB_24BPP_GetPixel(SourceSurf, sx, sy);
-                 *DestBits =  XLATEOBJ_iXlate(ColorTranslation, color);
+                 color = XLATEOBJ_iXlate(ColorTranslation, color);
+                 *DestBits =  color;
             }
             DestBits = (PULONG)((ULONG_PTR)DestBits + DifflDelta);
        }