[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198
andersca at apple.com
andersca at apple.com
Sun Feb 20 23:12:22 UTC 2011
The following commit has been merged in the webkit-1.3 branch:
commit 7bb3de43813871e57b3892ee8515acf65fdf03ef
Author: andersca at apple.com <andersca at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Jan 18 23:08:18 2011 +0000
2011-01-18 Anders Carlsson <andersca at apple.com>
Reviewed by Darin Adler.
Factor code to create the backing store bitmap context out into a new function
https://bugs.webkit.org/show_bug.cgi?id=52670
* UIProcess/BackingStore.h:
* UIProcess/mac/BackingStoreMac.mm:
(WebKit::BackingStore::backingStoreContext):
Create the backing store context.
(WebKit::BackingStore::incorporateUpdate):
Call backingStoreContext.
(WebKit::BackingStore::scroll):
Assert that the context is not null.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76072 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebKit2/ChangeLog b/Source/WebKit2/ChangeLog
index 7da0ffc..3d3bd87 100644
--- a/Source/WebKit2/ChangeLog
+++ b/Source/WebKit2/ChangeLog
@@ -1,5 +1,23 @@
2011-01-18 Anders Carlsson <andersca at apple.com>
+ Reviewed by Darin Adler.
+
+ Factor code to create the backing store bitmap context out into a new function
+ https://bugs.webkit.org/show_bug.cgi?id=52670
+
+ * UIProcess/BackingStore.h:
+ * UIProcess/mac/BackingStoreMac.mm:
+ (WebKit::BackingStore::backingStoreContext):
+ Create the backing store context.
+
+ (WebKit::BackingStore::incorporateUpdate):
+ Call backingStoreContext.
+
+ (WebKit::BackingStore::scroll):
+ Assert that the context is not null.
+
+2011-01-18 Anders Carlsson <andersca at apple.com>
+
Reviewed by Dan Bernstein.
Add PageClientImpl::containingWindowGraphicsContext
diff --git a/Source/WebKit2/UIProcess/BackingStore.h b/Source/WebKit2/UIProcess/BackingStore.h
index de8c4a3..de9152a 100644
--- a/Source/WebKit2/UIProcess/BackingStore.h
+++ b/Source/WebKit2/UIProcess/BackingStore.h
@@ -65,6 +65,8 @@ private:
WebCore::IntSize m_size;
#if PLATFORM(MAC)
+ CGContextRef backingStoreContext();
+
RetainPtr<CGContextRef> m_bitmapContext;
#endif
};
diff --git a/Source/WebKit2/UIProcess/mac/BackingStoreMac.mm b/Source/WebKit2/UIProcess/mac/BackingStoreMac.mm
index 1c3c07c..db06e79 100644
--- a/Source/WebKit2/UIProcess/mac/BackingStoreMac.mm
+++ b/Source/WebKit2/UIProcess/mac/BackingStoreMac.mm
@@ -41,14 +41,8 @@ void BackingStore::paint(PlatformGraphicsContext context, const IntRect& rect)
paintBitmapContext(context, m_bitmapContext.get(), rect.location(), rect);
}
-void BackingStore::incorporateUpdate(const UpdateInfo& updateInfo)
+CGContextRef BackingStore::backingStoreContext()
{
- ASSERT(m_size == updateInfo.viewSize);
-
- RefPtr<ShareableBitmap> bitmap = ShareableBitmap::create(updateInfo.updateRectBounds.size(), updateInfo.bitmapHandle);
- if (!bitmap)
- return;
-
if (!m_bitmapContext) {
RetainPtr<CGColorSpaceRef> colorSpace(AdoptCF, CGColorSpaceCreateDeviceRGB());
@@ -59,11 +53,24 @@ void BackingStore::incorporateUpdate(const UpdateInfo& updateInfo)
CGContextScaleCTM(m_bitmapContext.get(), 1, -1);
}
+ return m_bitmapContext.get();
+}
+
+void BackingStore::incorporateUpdate(const UpdateInfo& updateInfo)
+{
+ ASSERT(m_size == updateInfo.viewSize);
+
+ RefPtr<ShareableBitmap> bitmap = ShareableBitmap::create(updateInfo.updateRectBounds.size(), updateInfo.bitmapHandle);
+ if (!bitmap)
+ return;
+
+ CGContextRef context = backingStoreContext();
+
scroll(updateInfo.scrollRect, updateInfo.scrollOffset);
IntPoint updateRectLocation = updateInfo.updateRectBounds.location();
- GraphicsContext graphicsContext(m_bitmapContext.get());
+ GraphicsContext graphicsContext(context);
// Paint all update rects.
for (size_t i = 0; i < updateInfo.updateRects.size(); ++i) {
@@ -80,6 +87,8 @@ void BackingStore::scroll(const IntRect& scrollRect, const IntSize& scrollOffset
if (scrollOffset.isZero())
return;
+ ASSERT(m_bitmapContext);
+
CGContextSaveGState(m_bitmapContext.get());
CGContextClipToRect(m_bitmapContext.get(), scrollRect);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list