Chromium Code Reviews| Index: cc/output/compositor_frame_sink.h | 
| diff --git a/cc/output/compositor_frame_sink.h b/cc/output/compositor_frame_sink.h | 
| index 5aa440552e3573434cd910256e8f0dde7ff63464..1cd1966188b7fcb17e969b91e58586a0541a6c9c 100644 | 
| --- a/cc/output/compositor_frame_sink.h | 
| +++ b/cc/output/compositor_frame_sink.h | 
| @@ -30,11 +30,16 @@ class Size; | 
| class Transform; | 
| } | 
| +namespace gpu { | 
| +class GpuMemoryBufferManager; | 
| +} | 
| + | 
| namespace cc { | 
| class CompositorFrame; | 
| struct ManagedMemoryPolicy; | 
| class CompositorFrameSinkClient; | 
| +class SharedBitmapManager; | 
| // An interface for submitting CompositorFrames to a display compositor | 
| // which will compose frames from multiple CompositorFrameSinks to show | 
| @@ -56,8 +61,16 @@ class CC_EXPORT CompositorFrameSink { | 
| }; | 
| // Constructor for GL-based and/or software resources. | 
| + // gpu_memory_buffer_manager and shared_bitmap_manager must outlive the | 
| + // CompositorFrameSink. | 
| + // shared_bitmap_manager is optional (won't be used) if context_provider is | 
| 
 
danakj
2016/10/27 21:00:34
Maybe we should have 2 constructors at this point?
 
piman
2016/10/28 00:58:36
So, that's what we used to have in the past iirc.
 
 | 
| + // present. | 
| + // gpu_memory_buffer_manager is optional (won't be used) if context_provider | 
| + // is not present. | 
| CompositorFrameSink(scoped_refptr<ContextProvider> context_provider, | 
| - scoped_refptr<ContextProvider> worker_context_provider); | 
| + scoped_refptr<ContextProvider> worker_context_provider, | 
| + gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, | 
| + SharedBitmapManager* shared_bitmap_manager); | 
| // Constructor for Vulkan-based resources. | 
| explicit CompositorFrameSink( | 
| @@ -93,6 +106,12 @@ class CC_EXPORT CompositorFrameSink { | 
| VulkanContextProvider* vulkan_context_provider() const { | 
| return vulkan_context_provider_.get(); | 
| } | 
| + gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager() const { | 
| + return gpu_memory_buffer_manager_; | 
| + } | 
| + SharedBitmapManager* shared_bitmap_manager() const { | 
| + return shared_bitmap_manager_; | 
| + } | 
| // If supported, this causes a ReclaimResources for all resources that are | 
| // currently in use. | 
| @@ -120,6 +139,8 @@ class CC_EXPORT CompositorFrameSink { | 
| scoped_refptr<ContextProvider> context_provider_; | 
| scoped_refptr<ContextProvider> worker_context_provider_; | 
| scoped_refptr<VulkanContextProvider> vulkan_context_provider_; | 
| + gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_; | 
| + SharedBitmapManager* shared_bitmap_manager_; | 
| base::ThreadChecker client_thread_checker_; | 
| private: |