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

Side by Side Diff: blimp/client/public/compositor/compositor_dependencies.h

Issue 2297933002: blimp: Set up the CompositorDependencies for blimp in Chrome. (Closed)
Patch Set: retry gpu process failures after crbug.com/643282 Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef BLIMP_CLIENT_PUBLIC_COMPOSITOR_COMPOSITOR_DEPENDENCIES_H_ 5 #ifndef BLIMP_CLIENT_PUBLIC_COMPOSITOR_COMPOSITOR_DEPENDENCIES_H_
6 #define BLIMP_CLIENT_PUBLIC_COMPOSITOR_COMPOSITOR_DEPENDENCIES_H_ 6 #define BLIMP_CLIENT_PUBLIC_COMPOSITOR_COMPOSITOR_DEPENDENCIES_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 10
11 namespace cc { 11 namespace cc {
12 class ContextProvider; 12 class ContextProvider;
13 class LayerTreeSettings;
14 class SurfaceManager; 13 class SurfaceManager;
15 } // namespace cc 14 } // namespace cc
16 15
17 namespace gpu { 16 namespace gpu {
18 class GpuMemoryBufferManager; 17 class GpuMemoryBufferManager;
19 } // namespace gpu 18 } // namespace gpu
20 19
21 namespace blimp { 20 namespace blimp {
22 namespace client { 21 namespace client {
23 22
24 // A set of compositor dependencies that must be provided by the embedder. This 23 // A set of compositor dependencies that must be provided by the embedder. This
25 // is expected to outlive all BlimpContents instances. 24 // is expected to outlive all BlimpContents instances.
26 class CompositorDependencies { 25 class CompositorDependencies {
27 public: 26 public:
28 using ContextProviderCallback = 27 using ContextProviderCallback = base::Callback<void(
29 base::Callback<void(const scoped_refptr<cc::ContextProvider>&)>; 28 const scoped_refptr<cc::ContextProvider>& compositor_context_provider,
29 const scoped_refptr<cc::ContextProvider>& worker_context_provider)>;
30 30
31 virtual ~CompositorDependencies() = default; 31 virtual ~CompositorDependencies() = default;
32 32
33 // Settings used to create all BlimpCompositor instances. 33 // Settings used to create all BlimpCompositor instances.
34 virtual cc::LayerTreeSettings* GetLayerTreeSettings() = 0;
35 virtual gpu::GpuMemoryBufferManager* GetGpuMemoryBufferManager() = 0; 34 virtual gpu::GpuMemoryBufferManager* GetGpuMemoryBufferManager() = 0;
36 virtual cc::SurfaceManager* GetSurfaceManager() = 0; 35 virtual cc::SurfaceManager* GetSurfaceManager() = 0;
37 virtual uint32_t AllocateSurfaceId() = 0; 36 virtual uint32_t AllocateSurfaceClientId() = 0;
38 37
39 // This call may return synchronously if the ContextProvider has already been 38 // This call may return synchronously if the ContextProvider has already been
40 // created. 39 // created.
41 virtual void GetContextProvider(const ContextProviderCallback& callback) = 0; 40 virtual void GetContextProviders(const ContextProviderCallback& callback) = 0;
42 }; 41 };
43 42
44 } // namespace client 43 } // namespace client
45 } // namespace blimp 44 } // namespace blimp
46 45
47 #endif // BLIMP_CLIENT_PUBLIC_COMPOSITOR_COMPOSITOR_DEPENDENCIES_H_ 46 #endif // BLIMP_CLIENT_PUBLIC_COMPOSITOR_COMPOSITOR_DEPENDENCIES_H_
OLDNEW
« no previous file with comments | « blimp/client/public/blimp_client_context.h ('k') | blimp/client/support/compositor/blimp_context_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698