summaryrefslogtreecommitdiff
path: root/Source/WebKit/chromium/tests/CCLayerTreeHostImplTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit/chromium/tests/CCLayerTreeHostImplTest.cpp')
-rw-r--r--Source/WebKit/chromium/tests/CCLayerTreeHostImplTest.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/Source/WebKit/chromium/tests/CCLayerTreeHostImplTest.cpp b/Source/WebKit/chromium/tests/CCLayerTreeHostImplTest.cpp
index 58668d0ef..91c2d1dff 100644
--- a/Source/WebKit/chromium/tests/CCLayerTreeHostImplTest.cpp
+++ b/Source/WebKit/chromium/tests/CCLayerTreeHostImplTest.cpp
@@ -28,7 +28,6 @@
#include "CCAnimationTestCommon.h"
#include "CCLayerTestCommon.h"
-#include "CCTiledLayerTestCommon.h"
#include "FakeWebGraphicsContext3D.h"
#include "GraphicsContext3DPrivate.h"
#include "LayerRendererChromium.h"
@@ -60,7 +59,7 @@ public:
{
CCSettings settings;
m_hostImpl = CCLayerTreeHostImpl::create(settings, this);
- m_hostImpl->initializeLayerRenderer(createContext(), adoptPtr(new FakeTextureUploader));
+ m_hostImpl->initializeLayerRenderer(createContext(), UnthrottledUploader);
m_hostImpl->setViewportSize(IntSize(10, 10));
}
@@ -114,6 +113,8 @@ protected:
}
DebugScopedSetImplThread m_alwaysImplThread;
+ DebugScopedSetMainThreadBlocked m_alwaysMainThreadBlocked;
+
OwnPtr<CCLayerTreeHostImpl> m_hostImpl;
bool m_didRequestCommit;
bool m_didRequestRedraw;
@@ -876,7 +877,7 @@ TEST_F(CCLayerTreeHostImplTest, blendingOffWhenDrawingOpaqueLayers)
TEST_F(CCLayerTreeHostImplTest, viewportCovered)
{
- m_hostImpl->initializeLayerRenderer(createContext(), adoptPtr(new FakeTextureUploader));
+ m_hostImpl->initializeLayerRenderer(createContext(), UnthrottledUploader);
m_hostImpl->setBackgroundColor(Color::gray);
IntSize viewportSize(1000, 1000);
@@ -987,7 +988,7 @@ TEST_F(CCLayerTreeHostImplTest, reshapeNotCalledUntilDraw)
{
ReshapeTrackerContext* reshapeTracker = new ReshapeTrackerContext();
RefPtr<GraphicsContext3D> context = GraphicsContext3DPrivate::createGraphicsContextFromWebContext(adoptPtr(reshapeTracker), GraphicsContext3D::RenderDirectlyToHostWindow);
- m_hostImpl->initializeLayerRenderer(context, adoptPtr(new FakeTextureUploader));
+ m_hostImpl->initializeLayerRenderer(context, UnthrottledUploader);
CCLayerImpl* root = new FakeDrawableCCLayerImpl(1);
root->setAnchorPoint(FloatPoint(0, 0));
@@ -1036,7 +1037,7 @@ TEST_F(CCLayerTreeHostImplTest, partialSwapReceivesDamageRect)
CCSettings settings;
settings.partialSwapEnabled = true;
OwnPtr<CCLayerTreeHostImpl> layerTreeHostImpl = CCLayerTreeHostImpl::create(settings, this);
- layerTreeHostImpl->initializeLayerRenderer(context, adoptPtr(new FakeTextureUploader()));
+ layerTreeHostImpl->initializeLayerRenderer(context, UnthrottledUploader);
layerTreeHostImpl->setViewportSize(IntSize(500, 500));
CCLayerImpl* root = new FakeDrawableCCLayerImpl(1);
@@ -1135,7 +1136,7 @@ TEST_F(CCLayerTreeHostImplTest, contextLostAndRestoredNotificationSentToAllLayer
EXPECT_FALSE(layer1->didLoseContextCalled());
EXPECT_FALSE(layer2->didLoseContextCalled());
- m_hostImpl->initializeLayerRenderer(createContext(), adoptPtr(new FakeTextureUploader));
+ m_hostImpl->initializeLayerRenderer(createContext(), UnthrottledUploader);
EXPECT_TRUE(root->didLoseContextCalled());
EXPECT_TRUE(layer1->didLoseContextCalled());
@@ -1150,7 +1151,7 @@ public:
TEST_F(CCLayerTreeHostImplTest, finishAllRenderingAfterContextLost)
{
// The context initialization will fail, but we should still be able to call finishAllRendering() without any ill effects.
- m_hostImpl->initializeLayerRenderer(GraphicsContext3DPrivate::createGraphicsContextFromWebContext(adoptPtr(new FakeWebGraphicsContext3DMakeCurrentFails), GraphicsContext3D::RenderDirectlyToHostWindow), adoptPtr(new FakeTextureUploader));
+ m_hostImpl->initializeLayerRenderer(GraphicsContext3DPrivate::createGraphicsContextFromWebContext(adoptPtr(new FakeWebGraphicsContext3DMakeCurrentFails), GraphicsContext3D::RenderDirectlyToHostWindow), UnthrottledUploader);
m_hostImpl->finishAllRendering();
}
@@ -1180,7 +1181,7 @@ TEST_F(CCLayerTreeHostImplTest, scrollbarLayerLostContext)
// Scrollbar layer should always generate quads, even after lost context
EXPECT_GT(renderPass->quadList().size(), 0u);
m_hostImpl->didDrawAllLayers(frame);
- m_hostImpl->initializeLayerRenderer(createContext(), adoptPtr(new FakeTextureUploader));
+ m_hostImpl->initializeLayerRenderer(createContext(), UnthrottledUploader);
}
}
@@ -1355,7 +1356,7 @@ TEST_F(CCLayerTreeHostImplTest, dontUseOldResourcesAfterLostContext)
// Lose the context, replacing it with a StrictWebGraphicsContext3D, that
// will warn if any resource from the previous context gets used.
- m_hostImpl->initializeLayerRenderer(StrictWebGraphicsContext3D::createGraphicsContext(), adoptPtr(new FakeTextureUploader));
+ m_hostImpl->initializeLayerRenderer(StrictWebGraphicsContext3D::createGraphicsContext(), UnthrottledUploader);
EXPECT_TRUE(m_hostImpl->prepareToDraw(frame));
m_hostImpl->drawLayers(frame);
m_hostImpl->didDrawAllLayers(frame);