OLD | NEW |
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 #include "blimp/client/support/compositor/compositor_dependencies_impl.h" | 5 #include "blimp/client/support/compositor/compositor_dependencies_impl.h" |
6 | 6 |
7 #include "blimp/client/support/compositor/blimp_context_provider.h" | 7 #include "blimp/client/support/compositor/blimp_context_provider.h" |
8 #include "blimp/client/support/compositor/blimp_gpu_memory_buffer_manager.h" | 8 #include "blimp/client/support/compositor/blimp_gpu_memory_buffer_manager.h" |
9 #include "blimp/client/support/compositor/blimp_layer_tree_settings.h" | 9 #include "blimp/client/support/compositor/blimp_layer_tree_settings.h" |
10 #include "cc/output/context_provider.h" | 10 #include "cc/output/context_provider.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 | 24 |
25 gpu::GpuMemoryBufferManager* | 25 gpu::GpuMemoryBufferManager* |
26 CompositorDependenciesImpl::GetGpuMemoryBufferManager() { | 26 CompositorDependenciesImpl::GetGpuMemoryBufferManager() { |
27 return gpu_memory_buffer_manager_.get(); | 27 return gpu_memory_buffer_manager_.get(); |
28 } | 28 } |
29 | 29 |
30 cc::SurfaceManager* CompositorDependenciesImpl::GetSurfaceManager() { | 30 cc::SurfaceManager* CompositorDependenciesImpl::GetSurfaceManager() { |
31 return surface_manager_.get(); | 31 return surface_manager_.get(); |
32 } | 32 } |
33 | 33 |
34 uint32_t CompositorDependenciesImpl::AllocateSurfaceClientId() { | 34 cc::FrameSinkId CompositorDependenciesImpl::AllocateFrameSinkId() { |
35 return ++next_surface_id_; | 35 return cc::FrameSinkId(++next_surface_id_, 0 /* sink_id */); |
36 } | 36 } |
37 | 37 |
38 void CompositorDependenciesImpl::GetContextProviders( | 38 void CompositorDependenciesImpl::GetContextProviders( |
39 const CompositorDependencies::ContextProviderCallback& callback) { | 39 const CompositorDependencies::ContextProviderCallback& callback) { |
40 scoped_refptr<cc::ContextProvider> compositor_context = | 40 scoped_refptr<cc::ContextProvider> compositor_context = |
41 BlimpContextProvider::Create(gfx::kNullAcceleratedWidget, | 41 BlimpContextProvider::Create(gfx::kNullAcceleratedWidget, |
42 gpu_memory_buffer_manager_.get()); | 42 gpu_memory_buffer_manager_.get()); |
43 | 43 |
44 // TODO(khushalsagar): Make a worker context and bind to the current thread. | 44 // TODO(khushalsagar): Make a worker context and bind to the current thread. |
45 callback.Run(compositor_context, nullptr); | 45 callback.Run(compositor_context, nullptr); |
46 } | 46 } |
47 | 47 |
48 } // namespace client | 48 } // namespace client |
49 } // namespace blimp | 49 } // namespace blimp |
OLD | NEW |