[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da
andersca at apple.com
andersca at apple.com
Wed Dec 22 17:59:12 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 25e514f4a4a00ba2bb27f9b0827a26ebd914cd34
Author: andersca at apple.com <andersca at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Dec 3 23:16:20 2010 +0000
Flip the destination context when painting a backing store into the destination
https://bugs.webkit.org/show_bug.cgi?id=50491
Reviewed by Dan Bernstein.
* Shared/cg/BackingStoreCG.cpp:
(WebKit::BackingStore::paint):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73310 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 55ca590..d9a4982 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -177,6 +177,16 @@
Reviewed by Dan Bernstein.
+ Flip the destination context when painting a backing store into the destination
+ https://bugs.webkit.org/show_bug.cgi?id=50491
+
+ * Shared/cg/BackingStoreCG.cpp:
+ (WebKit::BackingStore::paint):
+
+2010-12-03 Anders Carlsson <andersca at apple.com>
+
+ Reviewed by Dan Bernstein.
+
The chunked update drawing area is flipped twice when drawing
https://bugs.webkit.org/show_bug.cgi?id=50465
<rdar://problem/8726836>
diff --git a/WebKit2/Shared/cg/BackingStoreCG.cpp b/WebKit2/Shared/cg/BackingStoreCG.cpp
index 8bc21fd..d56302b 100644
--- a/WebKit2/Shared/cg/BackingStoreCG.cpp
+++ b/WebKit2/Shared/cg/BackingStoreCG.cpp
@@ -64,9 +64,17 @@ void BackingStore::paint(WebCore::GraphicsContext& context, const WebCore::IntPo
CGContextRef cgContext = context.platformContext();
CGContextSaveGState(cgContext);
+
CGContextClipToRect(cgContext, CGRectMake(dstPoint.x(), dstPoint.y(), srcRect.width(), srcRect.height()));
- CGContextTranslateCTM(cgContext, -srcRect.x(), -srcRect.y());
- CGContextDrawImage(cgContext, CGRectMake(dstPoint.x(), dstPoint.y(), CGImageGetWidth(image.get()), CGImageGetHeight(image.get())), image.get());
+ CGContextScaleCTM(cgContext, 1, -1);
+
+ CGFloat imageHeight = CGImageGetHeight(image.get());
+ CGFloat imageWidth = CGImageGetWidth(image.get());
+
+ CGFloat destX = dstPoint.x() - srcRect.x();
+ CGFloat destY = -imageHeight - dstPoint.y() + srcRect.y();
+
+ CGContextDrawImage(cgContext, CGRectMake(destX, destY, imageWidth, imageHeight), image.get());
CGContextRestoreGState(cgContext);
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list