Index: content/browser/gpu/browser_gpu_channel_host_factory.h |
diff --git a/content/browser/gpu/browser_gpu_channel_host_factory.h b/content/browser/gpu/browser_gpu_channel_host_factory.h |
index c2637f033cc3ca00ce518c353f8c9e901037f68e..842823f57bfd108159ac86b2b7d21a5a0f61265b 100644 |
--- a/content/browser/gpu/browser_gpu_channel_host_factory.h |
+++ b/content/browser/gpu/browser_gpu_channel_host_factory.h |
@@ -10,12 +10,14 @@ |
#include "base/memory/ref_counted.h" |
#include "base/memory/scoped_ptr.h" |
#include "content/common/gpu/client/gpu_channel_host.h" |
+#include "content/common/gpu/client/gpu_memory_buffer_factory_host.h" |
#include "ipc/message_filter.h" |
namespace content { |
class CONTENT_EXPORT BrowserGpuChannelHostFactory |
- : public GpuChannelHostFactory { |
+ : public GpuChannelHostFactory, |
+ public GpuMemoryBufferFactoryHost { |
public: |
static void Initialize(bool establish_gpu_channel); |
static void Terminate(); |
@@ -42,6 +44,17 @@ class CONTENT_EXPORT BrowserGpuChannelHostFactory |
unsigned internalformat, |
unsigned usage) OVERRIDE; |
+ // GpuMemoryBufferFactoryHost implementation. |
+ virtual void CreateGpuMemoryBuffer( |
+ const gfx::GpuMemoryBufferHandle& handle, |
+ size_t width, |
+ size_t height, |
+ unsigned internalformat, |
+ unsigned usage, |
+ const CreateGpuMemoryBufferCallback& callback) OVERRIDE; |
+ virtual void DestroyGpuMemoryBuffer(const gfx::GpuMemoryBufferHandle& handle, |
+ int32 sync_point) OVERRIDE; |
+ |
// Specify a task runner and callback to be used for a set of messages. The |
// callback will be set up on the current GpuProcessHost, identified by |
// GpuProcessHostId(). |
@@ -86,6 +99,21 @@ class CONTENT_EXPORT BrowserGpuChannelHostFactory |
static void AddFilterOnIO(int gpu_host_id, |
scoped_refptr<IPC::MessageFilter> filter); |
+ void CreateGpuMemoryBufferOnIO(const gfx::GpuMemoryBufferHandle& handle, |
+ size_t width, |
+ size_t height, |
+ unsigned internalformat, |
+ unsigned usage, |
+ const CreateGpuMemoryBufferCallback& callback); |
+ static void GpuMemoryBufferCreatedOnIO( |
+ const CreateGpuMemoryBufferCallback&, |
+ const gfx::GpuMemoryBufferHandle& handle); |
+ static void OnGpuMemoryBufferCreated( |
+ const CreateGpuMemoryBufferCallback&, |
+ const gfx::GpuMemoryBufferHandle& handle); |
+ void DestroyGpuMemoryBufferOnIO(const gfx::GpuMemoryBufferHandle& handle, |
+ int32 sync_point); |
+ |
const int gpu_client_id_; |
scoped_ptr<base::WaitableEvent> shutdown_event_; |
scoped_refptr<GpuChannelHost> gpu_channel_; |