From 881fd1b420349d5330a29eb890c8e72a2b895e4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Sun, 11 Jan 2004 19:52:27 +0000 Subject: [PATCH] Do a dummy BitBlt at the end of a MaskBitBlt to inform the driver that a region was updated. Fixes bug #125 svn path=/trunk/; revision=7572 --- reactos/subsys/win32k/eng/bitblt.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/reactos/subsys/win32k/eng/bitblt.c b/reactos/subsys/win32k/eng/bitblt.c index 7e357e66e90..8227095ce72 100644 --- a/reactos/subsys/win32k/eng/bitblt.c +++ b/reactos/subsys/win32k/eng/bitblt.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: bitblt.c,v 1.37 2003/12/31 16:06:48 weiden Exp $ +/* $Id: bitblt.c,v 1.38 2004/01/11 19:52:27 gvg Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -226,6 +226,16 @@ EngBitBlt(SURFOBJ *DestObj, unsigned i; POINTL Pt; ULONG Direction; + BOOL UsesSource; + BOOL UsesPattern; + + UsesSource = ((Rop4 & 0xCC0000) >> 2) != (Rop4 & 0x330000); + UsesPattern = ((Rop4 & 0xF00000) >> 4) != (Rop4 & 0x0F0000); + if (! UsesSource && ! UsesPattern && 0xaacc != Rop4) + { + /* Copy destination onto itself: nop */ + return TRUE; + } if (NULL != SourcePoint) { @@ -1071,6 +1081,11 @@ EngMaskBitBlt(SURFOBJ *DestObj, IntEngLeave(&EnterLeaveDest); IntEngLeave(&EnterLeaveSource); + /* Dummy BitBlt to let driver know that something has changed. + 0x00AA0029 is the Rop for D (no-op) */ + IntEngBitBlt(DestObj, NULL, Mask, ClipRegion, DestColorTranslation, + DestRect, SourcePoint, MaskOrigin, Brush, BrushOrigin, 0x00AA0029); + return Ret; }