[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 22:53:26 UTC 2011
The following commit has been merged in the webkit-1.3 branch:
commit 2cdef2fb762d50041527bc144e5b02158a200b6a
Author: andersca at apple.com <andersca at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Jan 13 00:41:21 2011 +0000
2011-01-12 Anders Carlsson <andersca at apple.com>
Reviewed by Sam Weinig.
Get the new drawing area painting to the screen
https://bugs.webkit.org/show_bug.cgi?id=52331
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::incorporateUpdate):
Call setViewNeedsDisplay on all the update rects.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setViewNeedsDisplay):
Call through to the page client.
(WebKit::WebPageProxy::processDidCrash):
Null out the drawing area proxy.
* UIProcess/mac/BackingStoreMac.mm:
(WebKit::BackingStore::paint):
Paint.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75657 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index bbf837a..8ead36d 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -2,6 +2,28 @@
Reviewed by Sam Weinig.
+ Get the new drawing area painting to the screen
+ https://bugs.webkit.org/show_bug.cgi?id=52331
+
+ * UIProcess/DrawingAreaProxyImpl.cpp:
+ (WebKit::DrawingAreaProxyImpl::incorporateUpdate):
+ Call setViewNeedsDisplay on all the update rects.
+
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::setViewNeedsDisplay):
+ Call through to the page client.
+
+ (WebKit::WebPageProxy::processDidCrash):
+ Null out the drawing area proxy.
+
+ * UIProcess/mac/BackingStoreMac.mm:
+ (WebKit::BackingStore::paint):
+ Paint.
+
+2011-01-12 Anders Carlsson <andersca at apple.com>
+
+ Reviewed by Sam Weinig.
+
More work on getting the drawing area proxy to paint
https://bugs.webkit.org/show_bug.cgi?id=52328
diff --git a/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp b/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp
index 990dec1..6ef4e7e 100644
--- a/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp
+++ b/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp
@@ -116,6 +116,9 @@ void DrawingAreaProxyImpl::incorporateUpdate(const UpdateInfo& updateInfo)
m_backingStore = BackingStore::create(updateInfo.viewSize);
m_backingStore->incorporateUpdate(updateInfo);
+
+ for (size_t i = 0; i < updateInfo.updateRects.size(); ++i)
+ m_webPageProxy->setViewNeedsDisplay(updateInfo.updateRects[i]);
}
void DrawingAreaProxyImpl::sendSetSize()
diff --git a/WebKit2/UIProcess/WebPageProxy.cpp b/WebKit2/UIProcess/WebPageProxy.cpp
index c70f7d4..b818898 100644
--- a/WebKit2/UIProcess/WebPageProxy.cpp
+++ b/WebKit2/UIProcess/WebPageProxy.cpp
@@ -461,6 +461,11 @@ void WebPageProxy::setDrawsTransparentBackground(bool drawsTransparentBackground
process()->send(Messages::WebPage::SetDrawsTransparentBackground(drawsTransparentBackground), m_pageID);
}
+void WebPageProxy::setViewNeedsDisplay(const IntRect& rect)
+{
+ m_pageClient->setViewNeedsDisplay(rect);
+}
+
void WebPageProxy::viewStateDidChange(ViewStateFlags flags)
{
if (!isValid())
@@ -2158,6 +2163,8 @@ void WebPageProxy::processDidCrash()
m_mainFrame = 0;
+ m_drawingArea = nullptr;
+
#if ENABLE(INSPECTOR)
if (m_inspector) {
m_inspector->invalidate();
diff --git a/WebKit2/UIProcess/WebPageProxy.h b/WebKit2/UIProcess/WebPageProxy.h
index 58f6f20..25335dc 100644
--- a/WebKit2/UIProcess/WebPageProxy.h
+++ b/WebKit2/UIProcess/WebPageProxy.h
@@ -167,6 +167,8 @@ public:
void setInitialFocus(bool);
void setWindowResizerSize(const WebCore::IntSize&);
+ void setViewNeedsDisplay(const WebCore::IntRect&);
+
enum {
ViewWindowIsActive = 1 << 0,
ViewIsFocused = 1 << 1,
diff --git a/WebKit2/UIProcess/mac/BackingStoreMac.mm b/WebKit2/UIProcess/mac/BackingStoreMac.mm
index 3bf6403..daafdf7 100644
--- a/WebKit2/UIProcess/mac/BackingStoreMac.mm
+++ b/WebKit2/UIProcess/mac/BackingStoreMac.mm
@@ -33,9 +33,32 @@ using namespace WebCore;
namespace WebKit {
-void BackingStore::paint(PlatformGraphicsContext, const IntRect&)
+void BackingStore::paint(PlatformGraphicsContext context, const IntRect& rect)
{
- // FIXME: Implement.
+ ASSERT(m_bitmapContext);
+
+ // FIXME: This code should be shared with ShareableBitmap::paint.
+ size_t sizeInBytes = CGBitmapContextGetBytesPerRow(m_bitmapContext.get()) * CGBitmapContextGetHeight(m_bitmapContext.get());
+ RetainPtr<CGDataProviderRef> dataProvider(AdoptCF, CGDataProviderCreateWithData(0, CGBitmapContextGetData(m_bitmapContext.get()), sizeInBytes, 0));
+ RetainPtr<CGImageRef> image(AdoptCF, CGImageCreate(CGBitmapContextGetWidth(m_bitmapContext.get()),
+ CGBitmapContextGetHeight(m_bitmapContext.get()),
+ CGBitmapContextGetBitsPerComponent(m_bitmapContext.get()),
+ CGBitmapContextGetBitsPerPixel(m_bitmapContext.get()),
+ CGBitmapContextGetBytesPerRow(m_bitmapContext.get()),
+ CGBitmapContextGetColorSpace(m_bitmapContext.get()),
+ CGBitmapContextGetBitmapInfo(m_bitmapContext.get()),
+ dataProvider.get(), 0, false, kCGRenderingIntentDefault));
+
+ CGFloat imageWidth = CGImageGetWidth(image.get());
+ CGFloat imageHeight = CGImageGetHeight(image.get());
+
+ CGContextSaveGState(context);
+
+ CGContextClipToRect(context, rect);
+ CGContextScaleCTM(context, 1, -1);
+
+ CGContextDrawImage(context, CGRectMake(0, -imageHeight, imageWidth, imageHeight), image.get());
+ CGContextRestoreGState(context);
}
void BackingStore::incorporateUpdate(const UpdateInfo& updateInfo)
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list