Move call to syncCompositingLayers so that we do not trigger redundant draws.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Jul 2011 21:22:45 +0000 (21:22 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Jul 2011 21:22:45 +0000 (21:22 +0000)
commit5ea70dabc7e4842266455be769817e7876ab2f91
tree7d46e67eadb6e4aac8794183e7bb056850d115a2
parent5585203949c7d97f0e0b1c57d6bca2bcee87208f
Move call to syncCompositingLayers so that we do not trigger redundant draws.
https://bugs.webkit.org/show_bug.cgi?id=64224

Source/WebCore:

doComposite was triggering two composites every time a canvas was dirtied.
By moving syncCompositingLayers call to layout, the client code can draw without triggering
a redundant frame. Also renamed WebViewImpl::updateLayers to
syncCompositingLayers, because it was confusing. CCLayerTreeHostImplProxy::updateLayers was
no longer needed, because animateAndLayout calls WebViewImpl::layout.

Patch by John Bates <jbates@google.com> on 2011-07-12
Reviewed by James Robinson.

* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::updateLayers):
* platform/graphics/chromium/LayerRendererChromium.h:
* platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
(WebCore::CCLayerTreeHost::syncCompositingLayers):
* platform/graphics/chromium/cc/CCLayerTreeHost.h:
* platform/graphics/chromium/cc/CCLayerTreeHostImplProxy.cpp:
(WebCore::CCLayerTreeHostImplProxy::requestFrameAndCommit):

Source/WebKit/chromium:

doComposite was triggering two composites every time a canvas was dirtied.
By moving syncCompositingLayers call to layout, the client code can draw without triggering
a redundant frame. Also renamed WebViewImpl::updateLayers to
syncCompositingLayers, because it was confusing.

Patch by John Bates <jbates@google.com> on 2011-07-12
Reviewed by James Robinson.

* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::layout):
(WebKit::WebViewImpl::syncCompositingLayers):
* src/WebViewImpl.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@90850 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp
Source/WebCore/platform/graphics/chromium/LayerRendererChromium.h
Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp
Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.h
Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImplProxy.cpp
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/src/WebViewImpl.cpp
Source/WebKit/chromium/src/WebViewImpl.h