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

Unified Diff: blimp/client/core/compositor/blimp_compositor_dependencies.h

Issue 2274323002: Expose Blimp dependencies to the embedder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@khushal_baseline_1
Patch Set: Fix linux build break Created 4 years, 4 months 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/core/compositor/blimp_compositor_dependencies.h
diff --git a/blimp/client/core/compositor/blimp_compositor_dependencies.h b/blimp/client/core/compositor/blimp_compositor_dependencies.h
new file mode 100644
index 0000000000000000000000000000000000000000..2a68562187109557abe1e3102d73d0a26554d715
--- /dev/null
+++ b/blimp/client/core/compositor/blimp_compositor_dependencies.h
@@ -0,0 +1,58 @@
+// 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_CORE_COMPOSITOR_BLIMP_COMPOSITOR_DEPENDENCIES_H_
+#define BLIMP_CLIENT_CORE_COMPOSITOR_BLIMP_COMPOSITOR_DEPENDENCIES_H_
+
+#include "base/macros.h"
+#include "base/memory/ptr_util.h"
+#include "base/memory/ref_counted.h"
+
+namespace base {
+class SingleThreadTaskRunner;
+class Thread;
+} // namespace base
+
+namespace cc {
+class ImageSerializationProcessor;
+class TaskGraphRunner;
+}
+
+namespace blimp {
+namespace client {
+
+class CompositorDependencies;
+
+// Holds all dependencies shared by BlimpCompositor instances. This includes
+// shared threads and embedder dependencies. Access to this will be shared
+// among all BlimpCompositors and should only be used on the main thread.
+class BlimpCompositorDependencies {
+ public:
+ explicit BlimpCompositorDependencies(
+ std::unique_ptr<CompositorDependencies> embedder_dependencies);
+ virtual ~BlimpCompositorDependencies();
+
+ // External compositor dependencies provided by the embedder.
+ CompositorDependencies* GetEmbedderDependencies();
+
+ // Threads shared by all BlimpCompositor instances.
+ cc::TaskGraphRunner* GetTaskGraphRunner();
+ scoped_refptr<base::SingleThreadTaskRunner> GetCompositorTaskRunner();
+
+ cc::ImageSerializationProcessor* GetImageSerializationProcessor();
+
+ private:
+ std::unique_ptr<CompositorDependencies> embedder_dependencies_;
+
+ // Shared threads/task runners that will be used by all BlimpCompositors.
+ std::unique_ptr<base::Thread> compositor_impl_thread_;
+ std::unique_ptr<cc::TaskGraphRunner> task_graph_runner_;
+
+ DISALLOW_COPY_AND_ASSIGN(BlimpCompositorDependencies);
+};
+
+} // namespace client
+} // namespace blimp
+
+#endif // BLIMP_CLIENT_CORE_COMPOSITOR_BLIMP_COMPOSITOR_DEPENDENCIES_H_
« no previous file with comments | « blimp/client/core/compositor/BUILD.gn ('k') | blimp/client/core/compositor/blimp_compositor_dependencies.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698