[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:58:12 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit b8d82a06c2cfa31dd479634aa0048b10058b1f92
Author: andersca at apple.com <andersca at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Dec 3 19:11:49 2010 +0000
The chunked update drawing area is flipped twice when drawing
https://bugs.webkit.org/show_bug.cgi?id=50465
<rdar://problem/8726836>
Reviewed by Dan Bernstein.
* UIProcess/mac/ChunkedUpdateDrawingAreaProxyMac.mm:
(WebKit::ChunkedUpdateDrawingAreaProxy::platformPaint):
(WebKit::ChunkedUpdateDrawingAreaProxy::drawUpdateChunkIntoBackingStore):
Flip the destination contexts, thus unflipping them. (Turns out two wrongs make a right here).
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73275 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 7397fbb..fd57fdf 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,16 @@
+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>
+
+ * UIProcess/mac/ChunkedUpdateDrawingAreaProxyMac.mm:
+ (WebKit::ChunkedUpdateDrawingAreaProxy::platformPaint):
+ (WebKit::ChunkedUpdateDrawingAreaProxy::drawUpdateChunkIntoBackingStore):
+ Flip the destination contexts, thus unflipping them. (Turns out two wrongs make a right here).
+
2010-12-03 Jessie Berlin <jberlin at apple.com>
Reviewed by Sam Weinig.
diff --git a/WebKit2/UIProcess/mac/ChunkedUpdateDrawingAreaProxyMac.mm b/WebKit2/UIProcess/mac/ChunkedUpdateDrawingAreaProxyMac.mm
index fea55e9..15f8951 100644
--- a/WebKit2/UIProcess/mac/ChunkedUpdateDrawingAreaProxyMac.mm
+++ b/WebKit2/UIProcess/mac/ChunkedUpdateDrawingAreaProxyMac.mm
@@ -65,8 +65,16 @@ void ChunkedUpdateDrawingAreaProxy::platformPaint(const IntRect& rect, CGContext
if (!m_bitmapContext)
return;
+ CGContextSaveGState(context);
+
+ // Flip the destination.
+ CGContextScaleCTM(context, 1, -1);
+ CGContextTranslateCTM(context, 0, -m_size.height());
+
RetainPtr<CGImageRef> image(AdoptCF, CGBitmapContextCreateImage(m_bitmapContext.get()));
CGContextDrawImage(context, CGRectMake(0, 0, CGImageGetWidth(image.get()), CGImageGetHeight(image.get())), image.get());
+
+ CGContextRestoreGState(context);
}
void ChunkedUpdateDrawingAreaProxy::drawUpdateChunkIntoBackingStore(UpdateChunk* updateChunk)
@@ -74,10 +82,16 @@ void ChunkedUpdateDrawingAreaProxy::drawUpdateChunkIntoBackingStore(UpdateChunk*
ensureBackingStore();
RetainPtr<CGImageRef> image(updateChunk->createImage());
- const IntRect& updateChunkRect = updateChunk->rect();
+ IntRect updateChunkRect = updateChunk->rect();
+
+ // Flip the destination.
+ CGContextSaveGState(m_bitmapContext.get());
+ CGContextScaleCTM(m_bitmapContext.get(), 1, -1);
+ CGContextTranslateCTM(m_bitmapContext.get(), 0, -(updateChunkRect.y() + updateChunkRect.bottom()));
+
+ CGContextDrawImage(m_bitmapContext.get(), updateChunkRect, image.get());
+ CGContextRestoreGState(m_bitmapContext.get());
- CGContextDrawImage(m_bitmapContext.get(), CGRectMake(updateChunkRect.x(), size().height() - updateChunkRect.bottom(),
- updateChunkRect.width(), updateChunkRect.height()), image.get());
[m_webView setNeedsDisplayInRect:NSRectFromCGRect(updateChunkRect)];
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list