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

Unified Diff: content/browser/gpu/browser_gpu_channel_host_factory.h

Issue 302603004: Plumb GpuMemoryBuffer allocation to GPU process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments Created 6 years, 7 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
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..b26673a457a7f013bee3ed2237cd39df60ff9678 100644
--- a/content/browser/gpu/browser_gpu_channel_host_factory.h
+++ b/content/browser/gpu/browser_gpu_channel_host_factory.h
@@ -15,7 +15,8 @@
namespace content {
class CONTENT_EXPORT BrowserGpuChannelHostFactory
- : public GpuChannelHostFactory {
+ : public GpuChannelHostFactory,
+ public GpuChannelHostGpuBufferFactory {
public:
static void Initialize(bool establish_gpu_channel);
static void Terminate();
@@ -42,6 +43,17 @@ class CONTENT_EXPORT BrowserGpuChannelHostFactory
unsigned internalformat,
unsigned usage) OVERRIDE;
+ // GpuChannelHostGpuBufferFactory implementation.
+ virtual void CreateGpuMemoryBuffer(
+ size_t width,
+ size_t height,
+ unsigned internalformat,
+ unsigned usage,
+ const gfx::GpuMemoryBufferHandle& handle,
+ const CreateGpuMemoryBufferCallback& callback) OVERRIDE;
+ virtual void DeleteGpuMemoryBuffer(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 +98,21 @@ class CONTENT_EXPORT BrowserGpuChannelHostFactory
static void AddFilterOnIO(int gpu_host_id,
scoped_refptr<IPC::MessageFilter> filter);
+ void CreateGpuMemoryBufferOnIO(size_t width,
+ size_t height,
+ unsigned internalformat,
+ unsigned usage,
+ const gfx::GpuMemoryBufferHandle& handle,
+ const CreateGpuMemoryBufferCallback& callback);
+ static void GpuMemoryBufferCreatedOnIO(
+ const CreateGpuMemoryBufferCallback&,
+ const gfx::GpuMemoryBufferHandle& handle);
+ static void OnGpuMemoryBufferCreated(
+ const CreateGpuMemoryBufferCallback&,
+ const gfx::GpuMemoryBufferHandle& handle);
+ void DeleteGpuMemoryBufferOnIO(const gfx::GpuMemoryBufferHandle& handle,
+ int32 sync_point);
+
const int gpu_client_id_;
scoped_ptr<base::WaitableEvent> shutdown_event_;
scoped_refptr<GpuChannelHost> gpu_channel_;
« no previous file with comments | « no previous file | content/browser/gpu/browser_gpu_channel_host_factory.cc » ('j') | content/common/gpu/client/gpu_channel_host.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698