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

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

Issue 540443002: Enable sync allocation of GpuMemoryBuffers from the browser process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « no previous file | content/browser/gpu/browser_gpu_channel_host_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 30c2939a669ce899469530f405092296ec688951..c4a626dcc1159f590163e4a5bce2500d198b7f91 100644
--- a/content/browser/gpu/browser_gpu_channel_host_factory.h
+++ b/content/browser/gpu/browser_gpu_channel_host_factory.h
@@ -10,14 +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 GpuMemoryBufferImpl;
+class GpuMemoryBufferFactoryHostImpl;
class CONTENT_EXPORT BrowserGpuChannelHostFactory
- : public GpuChannelHostFactory,
- public GpuMemoryBufferFactoryHost {
+ : public GpuChannelHostFactory {
public:
static void Initialize(bool establish_gpu_channel);
static void Terminate();
@@ -41,16 +41,6 @@ class CONTENT_EXPORT BrowserGpuChannelHostFactory
virtual void DeleteGpuMemoryBuffer(
scoped_ptr<gfx::GpuMemoryBuffer> buffer) OVERRIDE;
- // GpuMemoryBufferFactoryHost implementation.
- virtual void CreateGpuMemoryBuffer(
- const gfx::GpuMemoryBufferHandle& handle,
- const gfx::Size& size,
- 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().
@@ -91,19 +81,16 @@ class CONTENT_EXPORT BrowserGpuChannelHostFactory
AllocateGpuMemoryBufferRequest* request);
static void DeleteGpuMemoryBufferOnIO(
scoped_ptr<gfx::GpuMemoryBuffer> buffer);
- void OnGpuMemoryBufferCreated(uint32 request_id,
- const gfx::GpuMemoryBufferHandle& handle);
+ static void OnGpuMemoryBufferCreated(AllocateGpuMemoryBufferRequest* request,
+ scoped_ptr<GpuMemoryBufferImpl> buffer);
const int gpu_client_id_;
scoped_ptr<base::WaitableEvent> shutdown_event_;
scoped_refptr<GpuChannelHost> gpu_channel_;
+ scoped_ptr<GpuMemoryBufferFactoryHostImpl> gpu_memory_buffer_factory_host_;
int gpu_host_id_;
scoped_refptr<EstablishRequest> pending_request_;
std::vector<base::Closure> established_callbacks_;
- uint32 next_create_gpu_memory_buffer_request_id_;
- typedef std::map<uint32, CreateGpuMemoryBufferCallback>
- CreateGpuMemoryBufferCallbackMap;
- CreateGpuMemoryBufferCallbackMap create_gpu_memory_buffer_requests_;
static BrowserGpuChannelHostFactory* instance_;
« no previous file with comments | « no previous file | content/browser/gpu/browser_gpu_channel_host_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698