Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
WKView does not draw after forced repaint before the first update
https://bugs.webkit.org/show_bug.cgi?id=60845

Reviewed by Alice Liu.

* UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::waitForBackingStoreUpdateOnNextPaint): Added.
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::waitForBackingStoreUpdateOnNextPaint): Set m_hasReceivedFirstUpdate
to true, ensuring that paint() will wait for an update if needed.
* UIProcess/DrawingAreaProxyImpl.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::forceRepaint): Call DrawingAreaProxy::waitForBackingStoreUpdateOnNextPaint().



Canonical link: https://commits.webkit.org/76147@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@86495 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Dan Bernstein committed May 14, 2011
1 parent c30284d commit 82c9b93
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 1 deletion.
16 changes: 16 additions & 0 deletions Source/WebKit2/ChangeLog
@@ -1,3 +1,19 @@
2011-05-14 Dan Bernstein <mitz@apple.com>

Reviewed by Alice Liu.

WKView does not draw after forced repaint before the first update
https://bugs.webkit.org/show_bug.cgi?id=60845

* UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::waitForBackingStoreUpdateOnNextPaint): Added.
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::waitForBackingStoreUpdateOnNextPaint): Set m_hasReceivedFirstUpdate
to true, ensuring that paint() will wait for an update if needed.
* UIProcess/DrawingAreaProxyImpl.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::forceRepaint): Call DrawingAreaProxy::waitForBackingStoreUpdateOnNextPaint().

2011-05-14 Anders Carlsson <andersca@apple.com>

Reviewed by Sam Weinig.
Expand Down
4 changes: 3 additions & 1 deletion Source/WebKit2/UIProcess/DrawingAreaProxy.h
Expand Up @@ -86,7 +86,9 @@ class DrawingAreaProxy {
// FIXME: These should be pure virtual.
virtual void visibilityDidChange() { }
virtual void setBackingStoreIsDiscardable(bool) { }


virtual void waitForBackingStoreUpdateOnNextPaint() { }

virtual void setPageIsVisible(bool isVisible) = 0;

const WebCore::IntSize& size() const { return m_size; }
Expand Down
5 changes: 5 additions & 0 deletions Source/WebKit2/UIProcess/DrawingAreaProxyImpl.cpp
Expand Up @@ -162,6 +162,11 @@ void DrawingAreaProxyImpl::setBackingStoreIsDiscardable(bool isBackingStoreDisca
m_discardBackingStoreTimer.stop();
}

void DrawingAreaProxyImpl::waitForBackingStoreUpdateOnNextPaint()
{
m_hasReceivedFirstUpdate = true;
}

void DrawingAreaProxyImpl::update(uint64_t backingStoreStateID, const UpdateInfo& updateInfo)
{
ASSERT_ARG(backingStoreStateID, backingStoreStateID <= m_currentBackingStoreStateID);
Expand Down
1 change: 1 addition & 0 deletions Source/WebKit2/UIProcess/DrawingAreaProxyImpl.h
Expand Up @@ -55,6 +55,7 @@ class DrawingAreaProxyImpl : public DrawingAreaProxy {
virtual void visibilityDidChange();
virtual void setPageIsVisible(bool);
virtual void setBackingStoreIsDiscardable(bool);
virtual void waitForBackingStoreUpdateOnNextPaint();

// CoreIPC message handlers
virtual void update(uint64_t backingStoreStateID, const UpdateInfo&);
Expand Down
1 change: 1 addition & 0 deletions Source/WebKit2/UIProcess/WebPageProxy.cpp
Expand Up @@ -1305,6 +1305,7 @@ void WebPageProxy::forceRepaint(PassRefPtr<VoidCallback> prpCallback)

uint64_t callbackID = callback->callbackID();
m_voidCallbacks.set(callbackID, callback.get());
m_drawingArea->waitForBackingStoreUpdateOnNextPaint();
process()->send(Messages::WebPage::ForceRepaint(callbackID), m_pageID);
}

Expand Down

0 comments on commit 82c9b93

Please sign in to comment.