[YAROTOWS] Reintegrate the branch. For a brighter future.
[reactos.git] / reactos / subsystems / win32 / win32k / eng / copybits.c
index 73a477d..afb2f16 100644 (file)
@@ -53,13 +53,7 @@ EngCopyBits(SURFOBJ *psoDest,
     ASSERT(psoDest != NULL && psoSource != NULL && DestRect != NULL && SourcePoint != NULL);
 
     psurfSource = CONTAINING_RECORD(psoSource, SURFACE, SurfObj);
-    SURFACE_LockBitmapBits(psurfSource);
-
     psurfDest = CONTAINING_RECORD(psoDest, SURFACE, SurfObj);
-    if (psoDest != psoSource)
-    {
-        SURFACE_LockBitmapBits(psurfDest);
-    }
 
     // FIXME: Don't punt to the driver's DrvCopyBits immediately. Instead,
     //        mark the copy block function to be DrvCopyBits instead of the
@@ -73,7 +67,7 @@ EngCopyBits(SURFOBJ *psoDest,
         if (psoDest->iType!=STYPE_BITMAP)
         {
             /* FIXME: Eng* functions shouldn't call Drv* functions. ? */
-            if (psurfDest->flHooks & HOOK_COPYBITS)
+            if (psurfDest->flags & HOOK_COPYBITS)
             {
                 ret = GDIDEVFUNCS(psoDest).CopyBits(
                           psoDest, psoSource, Clip, ColorTranslation, DestRect, SourcePoint);
@@ -86,7 +80,7 @@ EngCopyBits(SURFOBJ *psoDest,
         if (psoSource->iType!=STYPE_BITMAP)
         {
             /* FIXME: Eng* functions shouldn't call Drv* functions. ? */
-            if (psurfSource->flHooks & HOOK_COPYBITS)
+            if (psurfSource->flags & HOOK_COPYBITS)
             {
                 ret = GDIDEVFUNCS(psoSource).CopyBits(
                           psoDest, psoSource, Clip, ColorTranslation, DestRect, SourcePoint);
@@ -180,12 +174,6 @@ EngCopyBits(SURFOBJ *psoDest,
     }
 
 cleanup:
-    if (psoDest != psoSource)
-    {
-        SURFACE_UnlockBitmapBits(psurfDest);
-    }
-    SURFACE_UnlockBitmapBits(psurfSource);
-
     return ret;
 }
 
@@ -198,20 +186,7 @@ IntEngCopyBits(
     RECTL *prclDest,
     POINTL *ptlSource)
 {
-    BOOL bResult;
-
-    MouseSafetyOnDrawStart(psoSource, ptlSource->x, ptlSource->y,
-                           (ptlSource->x + abs(prclDest->right - prclDest->left)),
-                           (ptlSource->y + abs(prclDest->bottom - prclDest->top)));
-
-    MouseSafetyOnDrawStart(psoDest, prclDest->left, prclDest->top, prclDest->right, prclDest->bottom);
-
-    bResult = EngCopyBits(psoDest, psoSource, pco, pxlo, prclDest, ptlSource);
-
-    MouseSafetyOnDrawEnd(psoDest);
-    MouseSafetyOnDrawEnd(psoSource);
-
-    return bResult;
+    return EngCopyBits(psoDest, psoSource, pco, pxlo, prclDest, ptlSource);
 }