| Index: cc/test/layer_tree_test_common.h
|
| diff --git a/cc/test/layer_tree_test_common.h b/cc/test/layer_tree_test_common.h
|
| index f126bb57982669e559101ae6afe3c8aef05ffbec..23c6d9ba60ea70beb922d163e862268c24676b23 100644
|
| --- a/cc/test/layer_tree_test_common.h
|
| +++ b/cc/test/layer_tree_test_common.h
|
| @@ -21,19 +21,17 @@ class LayerTreeHost;
|
| class LayerTreeHostClient;
|
| class LayerTreeHostImpl;
|
| class Thread;
|
| -}
|
|
|
| -namespace cc {
|
|
|
| // Used by test stubs to notify the test when something interesting happens.
|
| class TestHooks : public WebKit::WebAnimationDelegate {
|
| public:
|
| - virtual void beginCommitOnThread(cc::LayerTreeHostImpl*) { }
|
| - virtual void commitCompleteOnThread(cc::LayerTreeHostImpl*) { }
|
| - virtual bool prepareToDrawOnThread(cc::LayerTreeHostImpl*);
|
| - virtual void drawLayersOnThread(cc::LayerTreeHostImpl*) { }
|
| - virtual void animateLayers(cc::LayerTreeHostImpl*, base::TimeTicks monotonicTime) { }
|
| - virtual void willAnimateLayers(cc::LayerTreeHostImpl*, base::TimeTicks monotonicTime) { }
|
| + virtual void beginCommitOnThread(LayerTreeHostImpl*) { }
|
| + virtual void commitCompleteOnThread(LayerTreeHostImpl*) { }
|
| + virtual bool prepareToDrawOnThread(LayerTreeHostImpl*);
|
| + virtual void drawLayersOnThread(LayerTreeHostImpl*) { }
|
| + virtual void animateLayers(LayerTreeHostImpl*, base::TimeTicks monotonicTime) { }
|
| + virtual void willAnimateLayers(LayerTreeHostImpl*, base::TimeTicks monotonicTime) { }
|
| virtual void applyScrollAndScale(gfx::Vector2d, float) { }
|
| virtual void animate(base::TimeTicks monotonicTime) { }
|
| virtual void layout() { }
|
| @@ -54,7 +52,7 @@ public:
|
| class TimeoutTask;
|
| class BeginTask;
|
|
|
| -class MockLayerImplTreeHostClient : public cc::LayerTreeHostClient {
|
| +class MockLayerImplTreeHostClient : public LayerTreeHostClient {
|
| };
|
|
|
| // The ThreadedTests runs with the main loop running. It instantiates a single MockLayerTreeHost and associated
|
| @@ -78,7 +76,7 @@ public:
|
| void endTestAfterDelay(int delayMilliseconds);
|
|
|
| void postSetNeedsAnimateToMainThread();
|
| - void postAddAnimationToMainThread(cc::Layer*);
|
| + void postAddAnimationToMainThread(Layer*);
|
| void postAddInstantAnimationToMainThread();
|
| void postSetNeedsCommitToMainThread();
|
| void postAcquireLayerTextures();
|
| @@ -89,12 +87,12 @@ public:
|
| void doBeginTest();
|
| void timeout();
|
|
|
| - cc::LayerTreeHost* layerTreeHost() { return m_layerTreeHost.get(); }
|
| + LayerTreeHost* layerTreeHost() { return m_layerTreeHost.get(); }
|
|
|
| protected:
|
| ThreadedTest();
|
|
|
| - virtual void initializeSettings(cc::LayerTreeSettings&) { }
|
| + virtual void initializeSettings(LayerTreeSettings&) { }
|
|
|
| virtual void scheduleComposite() OVERRIDE;
|
|
|
| @@ -102,7 +100,7 @@ protected:
|
|
|
| void dispatchSetNeedsAnimate();
|
| void dispatchAddInstantAnimation();
|
| - void dispatchAddAnimation(cc::Layer*);
|
| + void dispatchAddAnimation(Layer*);
|
| void dispatchSetNeedsCommit();
|
| void dispatchAcquireLayerTextures();
|
| void dispatchSetNeedsRedraw();
|
| @@ -112,15 +110,15 @@ protected:
|
|
|
| virtual void runTest(bool threaded);
|
|
|
| - cc::Thread* implThread() { return proxy() ? proxy()->implThread() : 0; }
|
| - cc::Proxy* proxy() const { return m_layerTreeHost ? m_layerTreeHost->proxy() : 0; }
|
| + Thread* implThread() { return proxy() ? proxy()->implThread() : 0; }
|
| + Proxy* proxy() const { return m_layerTreeHost ? m_layerTreeHost->proxy() : 0; }
|
|
|
| - cc::LayerTreeSettings m_settings;
|
| + LayerTreeSettings m_settings;
|
| scoped_ptr<MockLayerImplTreeHostClient> m_client;
|
| - scoped_ptr<cc::LayerTreeHost> m_layerTreeHost;
|
| + scoped_ptr<LayerTreeHost> m_layerTreeHost;
|
|
|
| protected:
|
| - scoped_refptr<cc::ScopedThreadProxy> m_mainThreadProxy;
|
| + scoped_refptr<ScopedThreadProxy> m_mainThreadProxy;
|
|
|
| private:
|
| bool m_beginning;
|
| @@ -130,7 +128,7 @@ private:
|
| bool m_scheduled;
|
| bool m_started;
|
|
|
| - scoped_ptr<cc::Thread> m_mainCCThread;
|
| + scoped_ptr<Thread> m_mainCCThread;
|
| scoped_ptr<base::Thread> m_implThread;
|
| base::CancelableClosure m_timeout;
|
| };
|
| @@ -144,9 +142,9 @@ public:
|
| };
|
|
|
| // Adapts LayerTreeHostImpl for test. Runs real code, then invokes test hooks.
|
| -class MockLayerTreeHostImpl : public cc::LayerTreeHostImpl {
|
| +class MockLayerTreeHostImpl : public LayerTreeHostImpl {
|
| public:
|
| - static scoped_ptr<MockLayerTreeHostImpl> create(TestHooks*, const cc::LayerTreeSettings&, cc::LayerTreeHostImplClient*, cc::Proxy*);
|
| + static scoped_ptr<MockLayerTreeHostImpl> create(TestHooks*, const LayerTreeSettings&, LayerTreeHostImplClient*, Proxy*);
|
|
|
| virtual void beginCommit() OVERRIDE;
|
| virtual void commitComplete() OVERRIDE;
|
| @@ -154,7 +152,7 @@ public:
|
| virtual void drawLayers(FrameData&) OVERRIDE;
|
|
|
| // Make these public.
|
| - typedef std::vector<cc::LayerImpl*> LayerList;
|
| + typedef std::vector<LayerImpl*> LayerList;
|
| using LayerTreeHostImpl::calculateRenderSurfaceLayerList;
|
|
|
| protected:
|
| @@ -162,12 +160,12 @@ protected:
|
| virtual base::TimeDelta lowFrequencyAnimationInterval() const OVERRIDE;
|
|
|
| private:
|
| - MockLayerTreeHostImpl(TestHooks*, const cc::LayerTreeSettings&, cc::LayerTreeHostImplClient*, cc::Proxy*);
|
| + MockLayerTreeHostImpl(TestHooks*, const LayerTreeSettings&, LayerTreeHostImplClient*, Proxy*);
|
|
|
| TestHooks* m_testHooks;
|
| };
|
|
|
| -class CompositorFakeWebGraphicsContext3DWithTextureTracking : public WebKit::CompositorFakeWebGraphicsContext3D {
|
| +class CompositorFakeWebGraphicsContext3DWithTextureTracking : public CompositorFakeWebGraphicsContext3D {
|
| public:
|
| static scoped_ptr<CompositorFakeWebGraphicsContext3DWithTextureTracking> create(Attributes);
|
| virtual ~CompositorFakeWebGraphicsContext3DWithTextureTracking();
|
| @@ -193,7 +191,7 @@ private:
|
| base::hash_set<WebKit::WebGLId> m_usedTextures;
|
| };
|
|
|
| -} // namespace WebKitTests
|
| +} // namespace cc
|
|
|
| #define SINGLE_AND_MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) \
|
| TEST_F(TEST_FIXTURE_NAME, runSingleThread) \
|
|
|