gpu: Compositor management of GpuMemoryBuffer instances.
This is a refactor of the CHROMIUM_image extension that allows
the compositor to map/unmap GpuMemoryBuffers on worker threads
and potentially also allocate these buffers on worker threads.
CreateImageCHROMIUM now takes an opaque ClientBuffer as first
parameter. ClientBuffer is implementation specific and in the
case of chromium a gfx::GpuMemoryBuffer. Or more specifically
a content::GpuMemoryBufferImpl when used with the content layer.
This allows the compositor to allocate and use GpuMemoryBuffers
without a GLES2Interface.
A GpuMemoryBufferManager interface has been introduced. This
interface provides a mechanism for the compositor to allocate
GpuMemoryBuffer instances in the renderer and browser process.
BUG=418553
Review URL: https://codereview.chromium.org/634083002
Cr-Commit-Position: refs/heads/master@{#299360}
diff --git a/cc/trees/layer_tree_host_impl.h b/cc/trees/layer_tree_host_impl.h
index 22a50f0..d90f332 100644
--- a/cc/trees/layer_tree_host_impl.h
+++ b/cc/trees/layer_tree_host_impl.h
@@ -120,7 +120,8 @@
LayerTreeHostImplClient* client,
Proxy* proxy,
RenderingStatsInstrumentation* rendering_stats_instrumentation,
- SharedBitmapManager* manager,
+ SharedBitmapManager* shared_bitmap_manager,
+ GpuMemoryBufferManager* gpu_memory_buffer_manager,
int id);
virtual ~LayerTreeHostImpl();
@@ -492,7 +493,8 @@
LayerTreeHostImplClient* client,
Proxy* proxy,
RenderingStatsInstrumentation* rendering_stats_instrumentation,
- SharedBitmapManager* manager,
+ SharedBitmapManager* shared_bitmap_manager,
+ GpuMemoryBufferManager* gpu_memory_buffer_manager,
int id);
void UpdateInnerViewportContainerSize();
@@ -701,6 +703,7 @@
base::Closure tree_activation_callback_;
SharedBitmapManager* shared_bitmap_manager_;
+ GpuMemoryBufferManager* gpu_memory_buffer_manager_;
int id_;
std::set<SwapPromiseMonitor*> swap_promise_monitor_;