[Chromium] Incremental texture updates are not atomic.
https://bugs.webkit.org/show_bug.cgi?id=72672
Patch by David Reveman <reveman@chromium.org> on 2012-01-21
Reviewed by Adam Barth.
Source/WebCore:
Use a new set of textures for each commit when incremental
texture updates are enabled.
This patch is tested by the following unit test:
- CCLayerTreeHostTestAtomicCommit.runMultiThread
* platform/graphics/chromium/ManagedTexture.cpp:
(WebCore::ManagedTexture::ManagedTexture):
(WebCore::ManagedTexture::steal):
* platform/graphics/chromium/ManagedTexture.h:
* platform/graphics/chromium/TiledLayerChromium.cpp:
(WebCore::TiledLayerChromium::prepareToUpdateTiles):
* platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
(WebCore::CCLayerTreeHost::initialize):
(WebCore::CCLayerTreeHost::commitComplete):
(WebCore::CCLayerTreeHost::deleteTextureAfterCommit):
* platform/graphics/chromium/cc/CCLayerTreeHost.h:
(WebCore::CCSettings::CCSettings):
* platform/graphics/chromium/cc/CCProxy.h:
* platform/graphics/chromium/cc/CCSingleThreadProxy.h:
(WebCore::CCSingleThreadProxy::partialTextureUpdateCapability):
* platform/graphics/chromium/cc/CCThreadProxy.cpp:
(WebCore::CCThreadProxy::scheduledActionUpdateMoreResources):
(WebCore::CCThreadProxy::partialTextureUpdateCapability):
* platform/graphics/chromium/cc/CCThreadProxy.h:
Source/WebKit/chromium:
Add CCLayerTreeHostTestAtomicCommit test that verifies atomicity
of commits.
* tests/CCLayerTreeHostTest.cpp:
(WTF::CompositorFakeWebGraphicsContext3DWithTextureTracking::create):
(WTF::CompositorFakeWebGraphicsContext3DWithTextureTracking::createTexture):
(WTF::CompositorFakeWebGraphicsContext3DWithTextureTracking::deleteTexture):
(WTF::CompositorFakeWebGraphicsContext3DWithTextureTracking::bindTexture):
(WTF::CompositorFakeWebGraphicsContext3DWithTextureTracking::numTextures):
(WTF::CompositorFakeWebGraphicsContext3DWithTextureTracking::texture):
(WTF::CompositorFakeWebGraphicsContext3DWithTextureTracking::resetTextures):
(WTF::CompositorFakeWebGraphicsContext3DWithTextureTracking::numUsedTextures):
(WTF::CompositorFakeWebGraphicsContext3DWithTextureTracking::usedTexture):
(WTF::CompositorFakeWebGraphicsContext3DWithTextureTracking::resetUsedTextures):
(WTF::CompositorFakeWebGraphicsContext3DWithTextureTracking::CompositorFakeWebGraphicsContext3DWithTextureTracking):
(WTF::MockLayerTreeHostClient::createLayerTreeHostContext3D):
(WTF::MockContentLayerDelegate::drawsContent):
(WTF::MockContentLayerDelegate::paintContents):
(WTF::MockContentLayerDelegate::notifySyncRequired):
(WTF::CCLayerTreeHostTestAtomicCommit::CCLayerTreeHostTestAtomicCommit):
(WTF::CCLayerTreeHostTestAtomicCommit::beginTest):
(WTF::CCLayerTreeHostTestAtomicCommit::commitCompleteOnCCThread):
(WTF::CCLayerTreeHostTestAtomicCommit::drawLayersOnCCThread):
(WTF::CCLayerTreeHostTestAtomicCommit::layout):
(WTF::CCLayerTreeHostTestAtomicCommit::afterTest):
(WTF::TEST_F):
* tests/CompositorFakeWebGraphicsContext3D.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105583
268f45cc-cd09-0410-ab3c-
d52691b4dbfc