[chromium] Use CCTexture/TextureAllocator and remove TextureManager
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 Jul 2012 21:35:34 +0000 (21:35 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 Jul 2012 21:35:34 +0000 (21:35 +0000)
commit43f7e155bb152e20071570dfbd0809bbc1ba63c6
tree32dae17a99a11b61573f6ec04012c9307f7d4f6a
parent1ddc2643447d81ed725ec30fc3608d0c26dba902
[chromium] Use CCTexture/TextureAllocator and remove TextureManager
https://bugs.webkit.org/show_bug.cgi?id=91001

Patch by Eric Penner <epenner@google.com> on 2012-07-12
Reviewed by Adrienne Walker.

Source/WebCore:

Use CCTexture to clean up CCPrioritizedTexture::Backing.
Add TextureAllocator.h and remove remainder of TextureManager.h/cpp.
Minor move/refactoring of link/unlink in CCPrioritizedTexture.
Remove double initialization of the default memory limit.

Covered by existing tests (refactoring).

* WebCore.gypi:
* platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.cpp:
* platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.h:
(WebCore):
* platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.cpp:
* platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.h:
(WebCore):
* platform/graphics/chromium/ImageLayerChromium.cpp:
* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::initialize):
* platform/graphics/chromium/ManagedTexture.cpp: Removed.
* platform/graphics/chromium/ManagedTexture.h: Removed.
* platform/graphics/chromium/RenderSurfaceChromium.h:
(WebCore):
* platform/graphics/chromium/TextureAllocator.h: Copied from Source/WebCore/platform/graphics/chromium/cc/CCPriorityCalculator.h.
(WebCore):
(TextureAllocator):
(WebCore::TextureAllocator::~TextureAllocator):
* platform/graphics/chromium/TextureManager.cpp: Removed.
* platform/graphics/chromium/TextureManager.h: Removed.
* platform/graphics/chromium/TiledLayerChromium.cpp:
* platform/graphics/chromium/TrackingTextureAllocator.cpp:
(WebCore::TrackingTextureAllocator::createTexture):
(WebCore::TrackingTextureAllocator::deleteTexture):
* platform/graphics/chromium/TrackingTextureAllocator.h:
* platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
* platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
(WebCore::CCLayerTreeHost::prioritizeTextures):
* platform/graphics/chromium/cc/CCLayerTreeHost.h:
(WebCore):
* platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
(WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl):
* platform/graphics/chromium/cc/CCPrioritizedTexture.cpp:
(WebCore::CCPrioritizedTexture::CCPrioritizedTexture):
(WebCore::CCPrioritizedTexture::setDimensions):
(WebCore::CCPrioritizedTexture::textureId):
(WebCore::CCPrioritizedTexture::bindTexture):
(WebCore::CCPrioritizedTexture::framebufferTexture2D):
(WebCore::CCPrioritizedTexture::link):
(WebCore):
(WebCore::CCPrioritizedTexture::unlink):
* platform/graphics/chromium/cc/CCPrioritizedTexture.h:
(WebCore):
(WebCore::CCPrioritizedTexture::bytes):
(CCPrioritizedTexture):
(WebCore::CCPrioritizedTexture::haveBackingTexture):
(WebCore::CCPrioritizedTexture::Backing::Backing):
(WebCore::CCPrioritizedTexture::Backing::~Backing):
(WebCore::CCPrioritizedTexture::Backing::owner):
(Backing):
(WebCore::CCPrioritizedTexture::backing):
* platform/graphics/chromium/cc/CCPrioritizedTextureManager.cpp:
(WebCore::CCPrioritizedTextureManager::prioritizeTextures):
(WebCore::CCPrioritizedTextureManager::requestLate):
(WebCore::CCPrioritizedTextureManager::acquireBackingTextureIfNeeded):
(WebCore::CCPrioritizedTextureManager::reduceMemory):
(WebCore::CCPrioritizedTextureManager::clearAllMemory):
(WebCore::CCPrioritizedTextureManager::registerTexture):
(WebCore::CCPrioritizedTextureManager::returnBackingTexture):
(WebCore::CCPrioritizedTextureManager::createBacking):
(WebCore::CCPrioritizedTextureManager::destroyBacking):
(WebCore::CCPrioritizedTextureManager::assertInvariants):
* platform/graphics/chromium/cc/CCPrioritizedTextureManager.h:
(CCPrioritizedTextureManager):
(WebCore::CCPrioritizedTextureManager::defaultMemoryAllocationLimit):
(WebCore::CCPrioritizedTextureManager::compareBackings):
* platform/graphics/chromium/cc/CCPriorityCalculator.h:
* platform/graphics/chromium/cc/CCScopedTexture.cpp:
* platform/graphics/chromium/cc/CCScopedTexture.h:
* platform/graphics/chromium/cc/CCTexture.h:
(WebCore::CCTexture::CCTexture):
* platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
(WebCore):
* platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:

Source/WebKit/chromium:

Deleting old texture manager tests.

* WebKit.gypi:
* tests/CCLayerTreeHostImplTest.cpp:
* tests/CCPrioritizedTextureTest.cpp:
(WTF::CCPrioritizedTextureTest::texturesMemorySize):
* tests/CCThreadedTest.cpp:
* tests/CCTiledLayerTestCommon.h:
* tests/Canvas2DLayerBridgeTest.cpp:
* tests/TextureManagerTest.cpp: Removed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@122506 268f45cc-cd09-0410-ab3c-d52691b4dbfc
40 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.gypi
Source/WebCore/platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.cpp
Source/WebCore/platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.h
Source/WebCore/platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.cpp
Source/WebCore/platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.h
Source/WebCore/platform/graphics/chromium/ImageLayerChromium.cpp
Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp
Source/WebCore/platform/graphics/chromium/ManagedTexture.cpp [deleted file]
Source/WebCore/platform/graphics/chromium/ManagedTexture.h [deleted file]
Source/WebCore/platform/graphics/chromium/RenderSurfaceChromium.h
Source/WebCore/platform/graphics/chromium/TextureAllocator.h [new file with mode: 0644]
Source/WebCore/platform/graphics/chromium/TextureManager.cpp [deleted file]
Source/WebCore/platform/graphics/chromium/TextureManager.h [deleted file]
Source/WebCore/platform/graphics/chromium/TiledLayerChromium.cpp
Source/WebCore/platform/graphics/chromium/TrackingTextureAllocator.cpp
Source/WebCore/platform/graphics/chromium/TrackingTextureAllocator.h
Source/WebCore/platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp
Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp
Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.h
Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp
Source/WebCore/platform/graphics/chromium/cc/CCPrioritizedTexture.cpp
Source/WebCore/platform/graphics/chromium/cc/CCPrioritizedTexture.h
Source/WebCore/platform/graphics/chromium/cc/CCPrioritizedTextureManager.cpp
Source/WebCore/platform/graphics/chromium/cc/CCPrioritizedTextureManager.h
Source/WebCore/platform/graphics/chromium/cc/CCPriorityCalculator.h
Source/WebCore/platform/graphics/chromium/cc/CCScopedTexture.cpp
Source/WebCore/platform/graphics/chromium/cc/CCScopedTexture.h
Source/WebCore/platform/graphics/chromium/cc/CCTexture.h
Source/WebCore/platform/graphics/chromium/cc/CCTiledLayerImpl.cpp
Source/WebCore/platform/graphics/chromium/cc/CCVideoLayerImpl.cpp
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/WebKit.gypi
Source/WebKit/chromium/tests/CCLayerTreeHostImplTest.cpp
Source/WebKit/chromium/tests/CCPrioritizedTextureTest.cpp
Source/WebKit/chromium/tests/CCThreadedTest.cpp
Source/WebKit/chromium/tests/CCTiledLayerTestCommon.h
Source/WebKit/chromium/tests/Canvas2DLayerBridgeTest.cpp
Source/WebKit/chromium/tests/LayerRendererChromiumTest.cpp
Source/WebKit/chromium/tests/TextureManagerTest.cpp [deleted file]