[Chromium] Incremental texture updates are not atomic.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 22 Jan 2012 03:30:41 +0000 (03:30 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 22 Jan 2012 03:30:41 +0000 (03:30 +0000)
commite12484f2c2533803f9f8517ce917c12e64bd345a
tree12d1324fe1a8f4286e74041d344365d4b802e787
parent83c7daf58dd5ac62a53b7d029476e1cbc63a69c2
[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
13 files changed:
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/chromium/ManagedTexture.cpp
Source/WebCore/platform/graphics/chromium/ManagedTexture.h
Source/WebCore/platform/graphics/chromium/TiledLayerChromium.cpp
Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp
Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.h
Source/WebCore/platform/graphics/chromium/cc/CCProxy.h
Source/WebCore/platform/graphics/chromium/cc/CCSingleThreadProxy.h
Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.cpp
Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.h
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/tests/CCLayerTreeHostTest.cpp
Source/WebKit/chromium/tests/CompositorFakeWebGraphicsContext3D.h