Changeset 73275 in webkit
- Timestamp:
- Dec 3, 2010 11:11:49 AM (13 years ago)
- Location:
- trunk/WebKit2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit2/ChangeLog
r73267 r73275 1 2010-12-03 Anders Carlsson <andersca@apple.com> 2 3 Reviewed by Dan Bernstein. 4 5 The chunked update drawing area is flipped twice when drawing 6 https://bugs.webkit.org/show_bug.cgi?id=50465 7 <rdar://problem/8726836> 8 9 * UIProcess/mac/ChunkedUpdateDrawingAreaProxyMac.mm: 10 (WebKit::ChunkedUpdateDrawingAreaProxy::platformPaint): 11 (WebKit::ChunkedUpdateDrawingAreaProxy::drawUpdateChunkIntoBackingStore): 12 Flip the destination contexts, thus unflipping them. (Turns out two wrongs make a right here). 13 1 14 2010-12-03 Jessie Berlin <jberlin@apple.com> 2 15 -
trunk/WebKit2/UIProcess/mac/ChunkedUpdateDrawingAreaProxyMac.mm
r71780 r73275 66 66 return; 67 67 68 CGContextSaveGState(context); 69 70 // Flip the destination. 71 CGContextScaleCTM(context, 1, -1); 72 CGContextTranslateCTM(context, 0, -m_size.height()); 73 68 74 RetainPtr<CGImageRef> image(AdoptCF, CGBitmapContextCreateImage(m_bitmapContext.get())); 69 75 CGContextDrawImage(context, CGRectMake(0, 0, CGImageGetWidth(image.get()), CGImageGetHeight(image.get())), image.get()); 76 77 CGContextRestoreGState(context); 70 78 } 71 79 … … 75 83 76 84 RetainPtr<CGImageRef> image(updateChunk->createImage()); 77 const IntRect&updateChunkRect = updateChunk->rect();85 IntRect updateChunkRect = updateChunk->rect(); 78 86 79 CGContextDrawImage(m_bitmapContext.get(), CGRectMake(updateChunkRect.x(), size().height() - updateChunkRect.bottom(), 80 updateChunkRect.width(), updateChunkRect.height()), image.get()); 87 // Flip the destination. 88 CGContextSaveGState(m_bitmapContext.get()); 89 CGContextScaleCTM(m_bitmapContext.get(), 1, -1); 90 CGContextTranslateCTM(m_bitmapContext.get(), 0, -(updateChunkRect.y() + updateChunkRect.bottom())); 91 92 CGContextDrawImage(m_bitmapContext.get(), updateChunkRect, image.get()); 93 CGContextRestoreGState(m_bitmapContext.get()); 94 81 95 [m_webView setNeedsDisplayInRect:NSRectFromCGRect(updateChunkRect)]; 82 96 }
Note: See TracChangeset
for help on using the changeset viewer.