Remote Layer Tree: Force repaint

https://bugs.webkit.org/show_bug.cgi?id=125189
<rdar://problem/15541789>

Reviewed by Anders Carlsson.

* WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
* WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
(WebKit::RemoteLayerTreeContext::forceRepaint):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::forceRepaint):
Implement WebProcess-synchronous force repaint.
We don't need the async variant because it is only needed
to synchronize with the WebProcess-side threaded scrolling
tree, which is not a component of the remote layer tree model.
The UI process will not handle the callback until after
RemoteLayerTreeHost::commit is complete, ensuring that the commit
is actually done.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160052 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent ec0ab31d
2013-12-03 Tim Horton <timothy_horton@apple.com>
Remote Layer Tree: Force repaint
https://bugs.webkit.org/show_bug.cgi?id=125189
<rdar://problem/15541789>
Reviewed by Anders Carlsson.
* WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
* WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
(WebKit::RemoteLayerTreeContext::forceRepaint):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::forceRepaint):
Implement WebProcess-synchronous force repaint.
We don't need the async variant because it is only needed
to synchronize with the WebProcess-side threaded scrolling
tree, which is not a component of the remote layer tree model.
The UI process will not handle the callback until after
RemoteLayerTreeHost::commit is complete, ensuring that the commit
is actually done.
2013-12-03 Simon Fraser <simon.fraser@apple.com>
Remove some iOS-related documentScale code
......
......@@ -58,6 +58,8 @@ public:
void setIsFlushingSuspended(bool);
void forceRepaint();
private:
// WebCore::GraphicsLayerFactory
virtual std::unique_ptr<WebCore::GraphicsLayer> createGraphicsLayer(WebCore::GraphicsLayerClient*) OVERRIDE;
......
......@@ -26,6 +26,7 @@
#import "config.h"
#import "RemoteLayerTreeContext.h"
#import "GenericCallback.h"
#import "GraphicsLayerCARemote.h"
#import "PlatformCALayerRemote.h"
#import "RemoteLayerTreeTransaction.h"
......@@ -151,4 +152,20 @@ void RemoteLayerTreeContext::setIsFlushingSuspended(bool isFrozen)
}
}
void RemoteLayerTreeContext::forceRepaint()
{
if (m_isFlushingSuspended)
return;
for (Frame* frame = &m_webPage->corePage()->mainFrame(); frame; frame = frame->tree().traverseNext()) {
FrameView* frameView = frame->view();
if (!frameView || !frameView->tiledBacking())
continue;
frameView->tiledBacking()->forceRepaint();
}
flushLayers();
}
} // namespace WebKit
......@@ -66,6 +66,9 @@ private:
virtual void setLayerTreeStateIsFrozen(bool) OVERRIDE;
virtual void forceRepaint() OVERRIDE;
virtual bool forceRepaintAsync(uint64_t) OVERRIDE { return false; }
// WebCore::GraphicsLayerClient
virtual void notifyAnimationStarted(const WebCore::GraphicsLayer*, double time) OVERRIDE { }
virtual void notifyFlushRequired(const WebCore::GraphicsLayer*) OVERRIDE { }
......
......@@ -202,4 +202,9 @@ void RemoteLayerTreeDrawingArea::setLayerTreeStateIsFrozen(bool isFrozen)
m_remoteLayerTreeContext->setIsFlushingSuspended(isFrozen);
}
void RemoteLayerTreeDrawingArea::forceRepaint()
{
m_remoteLayerTreeContext->forceRepaint();
}
} // namespace WebKit
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment