From 79ad030d505ccf79cf10aa9f8189ca3e2f61f6f4 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Mon, 25 Jun 2012 13:35:59 +0200 Subject: Imported WebKit commit c4b613825abd39ac739a47d7b4410468fcef66dc (http://svn.webkit.org/repository/webkit/trunk@121147) New snapshot that includes Win32 debug build fix (use SVGAllInOne) --- .../WebKit/chromium/tests/TiledLayerChromiumTest.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'Source/WebKit/chromium/tests/TiledLayerChromiumTest.cpp') 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 #include @@ -798,6 +799,7 @@ TEST(TiledLayerChromiumTest, skipsDrawGetsReset) WebKit::WebCompositor::initialize(0); FakeCCLayerTreeHostClient fakeCCLayerTreeHostClient; OwnPtr 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::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::max()); { DebugScopedSetImplThread implThread; OwnPtr 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::max()); { DebugScopedSetImplThread implThread; OwnPtr layerImpl(adoptPtr(new FakeCCTiledLayerImpl(0))); @@ -940,7 +942,7 @@ TEST(TiledLayerChromiumTest, partialUpdates) { DebugScopedSetImplThread implThread; OwnPtr layerImpl(adoptPtr(new FakeCCTiledLayerImpl(0))); - ccLayerTreeHost->updateLayers(updater); + ccLayerTreeHost->updateLayers(updater, std::numeric_limits::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 layerImpl(adoptPtr(new FakeCCTiledLayerImpl(0))); - ccLayerTreeHost->updateLayers(updater); + ccLayerTreeHost->updateLayers(updater, std::numeric_limits::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 layerImpl(adoptPtr(new FakeCCTiledLayerImpl(0))); - ccLayerTreeHost->updateLayers(updater); + ccLayerTreeHost->updateLayers(updater, std::numeric_limits::max()); updater.update(0, &allocator, &copier, &uploader, 4); EXPECT_EQ(4, layer->fakeLayerTextureUpdater()->updateCount()); EXPECT_FALSE(updater.hasMoreUpdates()); -- cgit v1.2.1