Chromium Code Reviews| 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..0b6a682dd9afb39c3246911e7556c2feb96ab05f |
| --- /dev/null |
| +++ b/blimp/client/core/compositor/blimp_compositor_dependencies.h |
| @@ -0,0 +1,59 @@ |
| +// 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 BlimpTaskGraphRunner; |
| +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. |
| +class BlimpCompositorDependencies { |
|
Khushal
2016/08/25 05:02:53
May be mention that this class is all on the main/
David Trainor- moved to gerrit
2016/08/26 17:15:54
Done.
|
| + 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<BlimpTaskGraphRunner> task_graph_runner_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(BlimpCompositorDependencies); |
| +}; |
| + |
| +} // namespace client |
| +} // namespace blimp |
| + |
| +#endif // BLIMP_CLIENT_CORE_COMPOSITOR_BLIMP_COMPOSITOR_DEPENDENCIES_H_ |