| Index: cc/test/remote_compositor_test.h
|
| diff --git a/cc/test/remote_compositor_test.h b/cc/test/remote_compositor_test.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..fec3e1b73c50900e6ba6c6672dfe6fa4d285e35f
|
| --- /dev/null
|
| +++ b/cc/test/remote_compositor_test.h
|
| @@ -0,0 +1,63 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef CC_TEST_REMOTE_COMPOSITOR_TEST_H_
|
| +#define CC_TEST_REMOTE_COMPOSITOR_TEST_H_
|
| +
|
| +#include "base/macros.h"
|
| +#include "cc/blimp/compositor_state_deserializer.h"
|
| +#include "cc/test/fake_image_serialization_processor.h"
|
| +#include "cc/test/fake_layer_tree_host_client.h"
|
| +#include "cc/test/stub_layer_tree_host_client.h"
|
| +#include "cc/test/test_task_graph_runner.h"
|
| +#include "testing/gtest/include/gtest/gtest.h"
|
| +
|
| +namespace cc {
|
| +class AnimationHost;
|
| +class CompositorProtoState;
|
| +class FakeLayerTreeHost;
|
| +class LayerTreeHostRemote;
|
| +
|
| +class RemoteCompositorTest : public testing::Test,
|
| + public CompositorStateDeserializerClient,
|
| + public FakeLayerTreeHostClient {
|
| + public:
|
| + RemoteCompositorTest();
|
| + ~RemoteCompositorTest() override;
|
| +
|
| + void SetUp() override;
|
| + void TearDown() override;
|
| +
|
| + // CompositorStateDeserializer implementation.
|
| + void DidUpdateLocalState() override;
|
| +
|
| + // FakeLayerTreeHostClient implementation.
|
| + void ApplyViewportDeltas(const gfx::Vector2dF& inner_delta,
|
| + const gfx::Vector2dF& outer_delta,
|
| + const gfx::Vector2dF& elastic_overscroll_delta,
|
| + float page_scale,
|
| + float top_controls_delta) override;
|
| +
|
| + void ProcessCompositorStateUpdate(
|
| + std::unique_ptr<CompositorProtoState> compositor_proto_state);
|
| +
|
| + protected:
|
| + // Engine setup.
|
| + std::unique_ptr<LayerTreeHostRemote> layer_tree_host_remote_;
|
| + StubLayerTreeHostClient layer_tree_host_client_remote_;
|
| +
|
| + // Client setup.
|
| + std::unique_ptr<AnimationHost> animation_host_;
|
| + std::unique_ptr<FakeLayerTreeHost> layer_tree_host_in_process_;
|
| + std::unique_ptr<CompositorStateDeserializer> compositor_state_deserializer_;
|
| + TestTaskGraphRunner task_graph_runner_;
|
| +
|
| + FakeImageSerializationProcessor image_serialization_processor_;
|
| +
|
| + bool client_state_dirty_ = false;
|
| +};
|
| +
|
| +} // namespace cc
|
| +
|
| +#endif // CC_TEST_REMOTE_COMPOSITOR_TEST_H_
|
|
|