Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1291)

Unified Diff: blimp/client/test/compositor/blimp_compositor_with_fake_host.h

Issue 2445093002: cc/blimp: Add synchronization for scroll/scale state. (Closed)
Patch Set: test compile Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: blimp/client/test/compositor/blimp_compositor_with_fake_host.h
diff --git a/blimp/client/test/compositor/blimp_compositor_with_fake_host.h b/blimp/client/test/compositor/blimp_compositor_with_fake_host.h
new file mode 100644
index 0000000000000000000000000000000000000000..a95ae82797476bf0ec7901c3cda5064f89726c88
--- /dev/null
+++ b/blimp/client/test/compositor/blimp_compositor_with_fake_host.h
@@ -0,0 +1,50 @@
+// 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 BLIMP_CLIENT_TEST_COMPOSITOR_BLIMP_COMPOSITOR_WITH_FAKE_HOST_H_
+#define BLIMP_CLIENT_TEST_COMPOSITOR_BLIMP_COMPOSITOR_WITH_FAKE_HOST_H_
+
+#include "base/macros.h"
+#include "blimp/client/core/compositor/blimp_compositor.h"
+#include "cc/test/fake_layer_tree_host.h"
+#include "cc/test/fake_layer_tree_host_client.h"
+#include "cc/test/test_task_graph_runner.h"
+
+namespace cc {
+namespace proto {
+class CompositorMessage;
+}
+}
+
+namespace blimp {
+namespace client {
+
+class BlimpCompositorWithFakeHost : public BlimpCompositor {
+ public:
+ static std::unique_ptr<BlimpCompositorWithFakeHost> Create(
+ BlimpCompositorDependencies* compositor_dependencies,
+ BlimpCompositorClient* client);
+ ~BlimpCompositorWithFakeHost() override;
+
+ std::unique_ptr<cc::proto::CompositorMessage> CreateFakeUpdate(
+ scoped_refptr<cc::Layer> root_layer);
+ cc::FakeLayerTreeHost* host() { return fake_host_; }
+
+ protected:
+ BlimpCompositorWithFakeHost(
+ BlimpCompositorDependencies* compositor_dependencies,
+ BlimpCompositorClient* client);
+
+ std::unique_ptr<cc::LayerTreeHostInProcess> CreateLayerTreeHost() override;
+
+ private:
+ cc::FakeLayerTreeHostClient fake_client_;
+ cc::TestTaskGraphRunner task_graph_runner_;
+ cc::FakeLayerTreeHost* fake_host_ = nullptr;
+};
+
+} // namespace client
+} // namespace blimp
+
+#endif // BLIMP_CLIENT_TEST_COMPOSITOR_BLIMP_COMPOSITOR_WITH_FAKE_HOST_H_
« no previous file with comments | « blimp/client/test/compositor/BUILD.gn ('k') | blimp/client/test/compositor/blimp_compositor_with_fake_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698