Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef BLIMP_CLIENT_PUBLIC_COMPOSITOR_COMPOSITOR_DEPENDENCIES_H_ | |
| 6 #define BLIMP_CLIENT_PUBLIC_COMPOSITOR_COMPOSITOR_DEPENDENCIES_H_ | |
| 7 | |
| 8 #include "base/callback.h" | |
| 9 #include "base/memory/ptr_util.h" | |
| 10 | |
| 11 namespace cc { | |
| 12 class ContextProvider; | |
| 13 class LayerTreeSettings; | |
| 14 class SurfaceManager; | |
| 15 } // namespace cc | |
| 16 | |
| 17 namespace gpu { | |
| 18 class GpuMemoryBufferManager; | |
| 19 } // namespace gpu | |
| 20 | |
| 21 namespace blimp { | |
| 22 namespace client { | |
| 23 | |
| 24 // A set of compositor dependencies that must be provided by the embedder. | |
| 25 class CompositorDependencies { | |
|
Khushal
2016/08/25 05:02:54
Comment on the lifetime? The Dependencies are expe
David Trainor- moved to gerrit
2016/08/26 17:15:54
Done.
| |
| 26 public: | |
| 27 using ContextProviderCallback = | |
|
Khushal
2016/08/25 05:02:54
The ui::ContextProviderFactory passes an enum sayi
David Trainor- moved to gerrit
2016/08/26 17:15:54
Huh that callback doesn't return an enum either.
Khushal
2016/08/26 19:34:25
Ummm, that patch hasn't landed yet. My bad.
| |
| 28 base::Callback<void(scoped_refptr<cc::ContextProvider>)>; | |
| 29 | |
| 30 virtual ~CompositorDependencies() = default; | |
| 31 | |
| 32 // Settings used to create all BlimpCompositor instances. | |
| 33 virtual std::unique_ptr<cc::LayerTreeSettings> GetLayerTreeSettings() = 0; | |
| 34 virtual gpu::GpuMemoryBufferManager* GetGpuMemoryBufferManager() = 0; | |
| 35 virtual cc::SurfaceManager* GetSurfaceManager() = 0; | |
| 36 virtual uint32_t AllocateSurfaceId() = 0; | |
| 37 | |
| 38 // This call may return synchronously if the ContextProvider has already been | |
| 39 // created. It may be asynchronous if it needs to build it though. | |
|
Khushal
2016/08/25 05:02:54
nit: the asynchronous bit is expected.
David Trainor- moved to gerrit
2016/08/26 17:15:54
Done.
| |
| 40 virtual void GetContextProvider(const ContextProviderCallback& callback) = 0; | |
| 41 }; | |
| 42 | |
| 43 } // namespace client | |
| 44 } // namespace blimp | |
| 45 | |
| 46 #endif // BLIMP_CLIENT_PUBLIC_COMPOSITOR_COMPOSITOR_DEPENDENCIES_H_ | |
| OLD | NEW |