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

Unified Diff: cc/output/compositor_frame_sink.h

Issue 2452483002: Move GpuMemoryBufferManager and SharedBitmapManager to CompositorFrameSink (Closed)
Patch Set: rebase Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/layers/ui_resource_layer_impl_unittest.cc ('k') | cc/output/compositor_frame_sink.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
+ // 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:
« no previous file with comments | « cc/layers/ui_resource_layer_impl_unittest.cc ('k') | cc/output/compositor_frame_sink.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698