+
+BOOL STDCALL
+IntEngBitBlt(SURFOBJ *DestObj,
+ SURFOBJ *SourceObj,
+ SURFOBJ *Mask,
+ CLIPOBJ *ClipRegion,
+ XLATEOBJ *ColorTranslation,
+ RECTL *DestRect,
+ POINTL *SourcePoint,
+ POINTL *MaskOrigin,
+ BRUSHOBJ *Brush,
+ POINTL *BrushOrigin,
+ ROP4 rop4)
+{
+ BOOLEAN ret;
+ SURFGDI *DestGDI;
+ SURFGDI *SourceGDI;
+
+ if (NULL != SourceObj)
+ {
+ SourceGDI = (PSURFGDI) AccessInternalObjectFromUserObject(SourceObj);
+ MouseSafetyOnDrawStart(SourceObj, SourceGDI, SourcePoint->x, SourcePoint->y,
+ (SourcePoint->x + abs(DestRect->right - DestRect->left)),
+ (SourcePoint->y + abs(DestRect->bottom - DestRect->top)));
+ }
+
+ /* No success yet */
+ ret = FALSE;
+ DestGDI = (SURFGDI*)AccessInternalObjectFromUserObject(DestObj);
+ MouseSafetyOnDrawStart(DestObj, DestGDI, DestRect->left, DestRect->top,
+ DestRect->right, DestRect->bottom);
+
+ /* Call the driver's DrvBitBlt if available */
+ if (NULL != DestGDI->BitBlt) {
+ ret = DestGDI->BitBlt(DestObj, SourceObj, Mask, ClipRegion, ColorTranslation,
+ DestRect, SourcePoint, MaskOrigin, Brush, BrushOrigin, rop4);
+ }
+
+ if (! ret) {
+ ret = EngBitBlt(DestObj, SourceObj, Mask, ClipRegion, ColorTranslation,
+ DestRect, SourcePoint, MaskOrigin, Brush, BrushOrigin, rop4);
+ }
+
+ MouseSafetyOnDrawEnd(DestObj, DestGDI);
+ if (NULL != SourceObj)
+ {
+ MouseSafetyOnDrawEnd(SourceObj, SourceGDI);
+ }
+
+ return ret;
+}