Use the "copy" blend mode for backingstore drawing
authorMorten Johan Sorvig <morten.sorvig@digia.com>
Tue, 4 Dec 2012 14:26:02 +0000 (15:26 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Fri, 7 Dec 2012 11:05:08 +0000 (12:05 +0100)
The default is a "source over", but we want to
completely replace the destination pixels. (Which
is slightly faster).

Change-Id: I4916765258a2236f70f58a8e20b06f80739183c1
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
src/plugins/platforms/cocoa/qnsview.mm

index 1f19b07..f0ece54 100644 (file)
@@ -316,6 +316,7 @@ static QTouchDevice *touchDevice = 0;
     );
     CGImageRef bsCGImage = m_backingStore->getBackingStoreCGImage();
     CGImageRef cleanImg = CGImageCreateWithImageInRect(bsCGImage, backingStoreRect);
+    CGContextSetBlendMode(cgContext, kCGBlendModeCopy);
     CGContextDrawImage(cgContext, dirtyWindowRect, cleanImg);
 
     // Clean-up: