diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-06-25 13:35:59 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-06-25 13:35:59 +0200 |
commit | 79ad030d505ccf79cf10aa9f8189ca3e2f61f6f4 (patch) | |
tree | 0287b1a69d84492c901e8bc820e635e7133809a0 /Source/WebKit/chromium/tests/TiledLayerChromiumTest.cpp | |
parent | 682ab87480e7757346802ce7f54cfdbdfeb2339e (diff) | |
download | qtwebkit-79ad030d505ccf79cf10aa9f8189ca3e2f61f6f4.tar.gz |
Imported WebKit commit c4b613825abd39ac739a47d7b4410468fcef66dc (http://svn.webkit.org/repository/webkit/trunk@121147)
New snapshot that includes Win32 debug build fix (use SVGAllInOne)
Diffstat (limited to 'Source/WebKit/chromium/tests/TiledLayerChromiumTest.cpp')
-rw-r--r-- | Source/WebKit/chromium/tests/TiledLayerChromiumTest.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/Source/WebKit/chromium/tests/TiledLayerChromiumTest.cpp b/Source/WebKit/chromium/tests/TiledLayerChromiumTest.cpp index 5e301d8eb..9495e706a 100644 --- a/Source/WebKit/chromium/tests/TiledLayerChromiumTest.cpp +++ b/Source/WebKit/chromium/tests/TiledLayerChromiumTest.cpp @@ -31,6 +31,7 @@ #include "CCTiledLayerTestCommon.h" #include "FakeCCLayerTreeHostClient.h" #include "WebCompositor.h" +#include "cc/CCOverdrawMetrics.h" #include "cc/CCSingleThreadProxy.h" // For DebugScopedSetImplThread #include <gtest/gtest.h> #include <public/WebTransformationMatrix.h> @@ -798,6 +799,7 @@ TEST(TiledLayerChromiumTest, skipsDrawGetsReset) WebKit::WebCompositor::initialize(0); FakeCCLayerTreeHostClient fakeCCLayerTreeHostClient; OwnPtr<CCLayerTreeHost> ccLayerTreeHost = CCLayerTreeHost::create(&fakeCCLayerTreeHostClient, CCLayerTreeSettings()); + ASSERT_TRUE(ccLayerTreeHost->initializeLayerRendererIfNeeded()); // Create two 300 x 300 tiled layers. IntSize contentBounds(300, 300); @@ -822,8 +824,7 @@ TEST(TiledLayerChromiumTest, skipsDrawGetsReset) ccLayerTreeHost->setRootLayer(rootLayer); ccLayerTreeHost->setViewportSize(IntSize(300, 300)); - textureManager->setMaxMemoryLimitBytes(memoryLimit); - ccLayerTreeHost->updateLayers(updater); + ccLayerTreeHost->updateLayers(updater, memoryLimit); // We'll skip the root layer. EXPECT_TRUE(rootLayer->skipsDraw()); @@ -835,7 +836,7 @@ TEST(TiledLayerChromiumTest, skipsDrawGetsReset) // Remove the child layer. rootLayer->removeAllChildren(); - ccLayerTreeHost->updateLayers(updater); + ccLayerTreeHost->updateLayers(updater, memoryLimit); EXPECT_FALSE(rootLayer->skipsDraw()); ccLayerTreeHost->setRootLayer(0); @@ -881,6 +882,7 @@ TEST(TiledLayerChromiumTest, partialUpdates) FakeCCLayerTreeHostClient fakeCCLayerTreeHostClient; OwnPtr<CCLayerTreeHost> ccLayerTreeHost = CCLayerTreeHost::create(&fakeCCLayerTreeHostClient, settings); + ASSERT_TRUE(ccLayerTreeHost->initializeLayerRendererIfNeeded()); // Create one 500 x 300 tiled layer. IntSize contentBounds(300, 200); @@ -901,7 +903,7 @@ TEST(TiledLayerChromiumTest, partialUpdates) ccLayerTreeHost->setViewportSize(IntSize(300, 200)); // Full update of all 6 tiles. - ccLayerTreeHost->updateLayers(updater); + ccLayerTreeHost->updateLayers(updater, std::numeric_limits<size_t>::max()); { DebugScopedSetImplThread implThread; OwnPtr<FakeCCTiledLayerImpl> layerImpl(adoptPtr(new FakeCCTiledLayerImpl(0))); @@ -919,7 +921,7 @@ TEST(TiledLayerChromiumTest, partialUpdates) // Full update of 3 tiles and partial update of 3 tiles. layer->invalidateRect(IntRect(0, 0, 300, 150)); - ccLayerTreeHost->updateLayers(updater); + ccLayerTreeHost->updateLayers(updater, std::numeric_limits<size_t>::max()); { DebugScopedSetImplThread implThread; OwnPtr<FakeCCTiledLayerImpl> layerImpl(adoptPtr(new FakeCCTiledLayerImpl(0))); @@ -940,7 +942,7 @@ TEST(TiledLayerChromiumTest, partialUpdates) { DebugScopedSetImplThread implThread; OwnPtr<FakeCCTiledLayerImpl> layerImpl(adoptPtr(new FakeCCTiledLayerImpl(0))); - ccLayerTreeHost->updateLayers(updater); + ccLayerTreeHost->updateLayers(updater, std::numeric_limits<size_t>::max()); updater.update(0, &allocator, &copier, &uploader, 4); EXPECT_EQ(2, layer->fakeLayerTextureUpdater()->updateCount()); EXPECT_TRUE(updater.hasMoreUpdates()); @@ -967,7 +969,7 @@ TEST(TiledLayerChromiumTest, partialUpdates) { DebugScopedSetImplThread implThread; OwnPtr<FakeCCTiledLayerImpl> layerImpl(adoptPtr(new FakeCCTiledLayerImpl(0))); - ccLayerTreeHost->updateLayers(updater); + ccLayerTreeHost->updateLayers(updater, std::numeric_limits<size_t>::max()); updater.update(0, &allocator, &copier, &uploader, 4); EXPECT_EQ(4, layer->fakeLayerTextureUpdater()->updateCount()); EXPECT_TRUE(updater.hasMoreUpdates()); @@ -985,7 +987,7 @@ TEST(TiledLayerChromiumTest, partialUpdates) { DebugScopedSetImplThread implThread; OwnPtr<FakeCCTiledLayerImpl> layerImpl(adoptPtr(new FakeCCTiledLayerImpl(0))); - ccLayerTreeHost->updateLayers(updater); + ccLayerTreeHost->updateLayers(updater, std::numeric_limits<size_t>::max()); updater.update(0, &allocator, &copier, &uploader, 4); EXPECT_EQ(4, layer->fakeLayerTextureUpdater()->updateCount()); EXPECT_FALSE(updater.hasMoreUpdates()); |