[chromium] Fix accelerated Canvas2D with threaded compositing.
authorsenorblanco@chromium.org <senorblanco@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Mar 2012 21:27:48 +0000 (21:27 +0000)
committersenorblanco@chromium.org <senorblanco@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Mar 2012 21:27:48 +0000 (21:27 +0000)
commit207d7d51d6ebec49bf77d5fc3718e239a5d06ec6
tree42a7d6c9984674a2f181008b1d67a1294e2e7223
parent09644291e41db8180322972324a08fe277c25cb6
[chromium] Fix accelerated Canvas2D with threaded compositing.
https://bugs.webkit.org/show_bug.cgi?id=80998

Reviewed by James Robinson.

Source/WebCore:

Covered by unit tests Canvas2DLayerChromiumTest and
TreeSynchronizerTest.

* platform/graphics/chromium/Canvas2DLayerChromium.cpp:
(WebCore::Canvas2DLayerChromium::paintContentsIfDirty):
(WebCore):
Delay creation of the front texture for double-buffering until the
first call to paintContentsIfDirty().
* platform/graphics/chromium/Canvas2DLayerChromium.h:
(Canvas2DLayerChromium):
Remove setTextureManager() and setLayerTreeHost(), since their job
has been subsumed by paintContentsIfDirty().
* platform/graphics/chromium/TreeSynchronizer.cpp:
(WebCore::TreeSynchronizer::updateScrollbarLayerPointersRecursive):
Perform an early-out if the passed-in layer is NULL.

Source/WebKit/chromium:

* tests/Canvas2DLayerChromiumTest.cpp:
Instantiate a CCLayerTreeHost, so that Canvas2DLayerChromium can
retrieve its texture manager.  Also move the test into the unnamed
namespace -- since it's already using WebCore, there's little reason for
it to also be in the namespace.
* tests/TreeSynchronizerTest.cpp:
(WebKitTests):
(WebKitTests::TEST):
Add a new test for trying to synchronize NULL tree.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@110753 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/chromium/Canvas2DLayerChromium.cpp
Source/WebCore/platform/graphics/chromium/Canvas2DLayerChromium.h
Source/WebCore/platform/graphics/chromium/TreeSynchronizer.cpp
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/tests/Canvas2DLayerChromiumTest.cpp
Source/WebKit/chromium/tests/TreeSynchronizerTest.cpp