summaryrefslogtreecommitdiff
path: root/Source/WebKit/chromium/tests/TiledLayerChromiumTest.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-06-20 13:01:08 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-06-20 13:01:08 +0200
commit49233e234e5c787396cadb2cea33b31ae0cd65c1 (patch)
tree5410cb9a8fd53168bb60d62c54b654d86f03c38d /Source/WebKit/chromium/tests/TiledLayerChromiumTest.cpp
parentb211c645d8ab690f713515dfdc84d80b11c27d2c (diff)
downloadqtwebkit-49233e234e5c787396cadb2cea33b31ae0cd65c1.tar.gz
Imported WebKit commit 3a8c29f35d00659d2ce7a0ccdfa8304f14e82327 (http://svn.webkit.org/repository/webkit/trunk@120813)
New snapshot with Windows build fixes
Diffstat (limited to 'Source/WebKit/chromium/tests/TiledLayerChromiumTest.cpp')
-rw-r--r--Source/WebKit/chromium/tests/TiledLayerChromiumTest.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/Source/WebKit/chromium/tests/TiledLayerChromiumTest.cpp b/Source/WebKit/chromium/tests/TiledLayerChromiumTest.cpp
index 80b099f19..5e301d8eb 100644
--- a/Source/WebKit/chromium/tests/TiledLayerChromiumTest.cpp
+++ b/Source/WebKit/chromium/tests/TiledLayerChromiumTest.cpp
@@ -673,12 +673,13 @@ TEST(TiledLayerChromiumTest, invalidateFromPrepare)
FakeTextureCopier fakeCopier;
FakeTextureUploader fakeUploader;
RefPtr<GraphicsContext3D> context = createCompositorMockGraphicsContext3D(GraphicsContext3D::Attributes());
+ RefPtr<CCGraphicsContext> ccContext = CCGraphicsContext::create3D(context);
// The tile size is 100x100, so this invalidates and then paints two tiles.
layer->setBounds(IntSize(100, 200));
layer->invalidateRect(IntRect(0, 0, 100, 200));
layer->updateLayerRect(updater, IntRect(0, 0, 100, 200), 0);
- updater.update(context.get(), &fakeAllocator, &fakeCopier, &fakeUploader, 1000);
+ updater.update(ccContext.get(), &fakeAllocator, &fakeCopier, &fakeUploader, 1000);
layer->pushPropertiesTo(layerImpl.get());
// We should have both tiles on the impl side.
@@ -691,7 +692,7 @@ TEST(TiledLayerChromiumTest, invalidateFromPrepare)
// Invoke updateLayerRect again. As the layer is valid updateLayerRect shouldn't be invoked on
// the LayerTextureUpdater.
layer->updateLayerRect(updater, IntRect(0, 0, 100, 200), 0);
- updater.update(context.get(), &fakeAllocator, &fakeCopier, &fakeUploader, 1000);
+ updater.update(ccContext.get(), &fakeAllocator, &fakeCopier, &fakeUploader, 1000);
EXPECT_EQ(0, layer->fakeLayerTextureUpdater()->prepareCount());
layer->invalidateRect(IntRect(0, 0, 50, 50));
@@ -699,12 +700,12 @@ TEST(TiledLayerChromiumTest, invalidateFromPrepare)
layer->fakeLayerTextureUpdater()->setRectToInvalidate(IntRect(25, 25, 50, 50), layer.get());
layer->fakeLayerTextureUpdater()->clearPrepareCount();
layer->updateLayerRect(updater, IntRect(0, 0, 100, 200), 0);
- updater.update(context.get(), &fakeAllocator, &fakeCopier, &fakeUploader, 1000);
+ updater.update(ccContext.get(), &fakeAllocator, &fakeCopier, &fakeUploader, 1000);
EXPECT_EQ(1, layer->fakeLayerTextureUpdater()->prepareCount());
layer->fakeLayerTextureUpdater()->clearPrepareCount();
// The layer should still be invalid as updateLayerRect invoked invalidate.
layer->updateLayerRect(updater, IntRect(0, 0, 100, 200), 0);
- updater.update(context.get(), &fakeAllocator, &fakeCopier, &fakeUploader, 1000);
+ updater.update(ccContext.get(), &fakeAllocator, &fakeCopier, &fakeUploader, 1000);
EXPECT_EQ(1, layer->fakeLayerTextureUpdater()->prepareCount());
}
@@ -796,7 +797,7 @@ TEST(TiledLayerChromiumTest, skipsDrawGetsReset)
// Initialize without threading support.
WebKit::WebCompositor::initialize(0);
FakeCCLayerTreeHostClient fakeCCLayerTreeHostClient;
- OwnPtr<CCLayerTreeHost> ccLayerTreeHost = CCLayerTreeHost::create(&fakeCCLayerTreeHostClient, CCSettings());
+ OwnPtr<CCLayerTreeHost> ccLayerTreeHost = CCLayerTreeHost::create(&fakeCCLayerTreeHostClient, CCLayerTreeSettings());
// Create two 300 x 300 tiled layers.
IntSize contentBounds(300, 300);
@@ -872,10 +873,12 @@ TEST(TiledLayerChromiumTest, hugeLayerUpdateCrash)
TEST(TiledLayerChromiumTest, partialUpdates)
{
- CCSettings settings;
- settings.maxPartialTextureUpdates = 4;
// Initialize without threading support.
WebKit::WebCompositor::initialize(0);
+
+ CCLayerTreeSettings settings;
+ settings.maxPartialTextureUpdates = 4;
+
FakeCCLayerTreeHostClient fakeCCLayerTreeHostClient;
OwnPtr<CCLayerTreeHost> ccLayerTreeHost = CCLayerTreeHost::create(&fakeCCLayerTreeHostClient, settings);