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

Unified Diff: content/common/gpu/gpu_channel_manager.h

Issue 331723003: gpu: Remove Create/DeleteImage IPC by adding an X11_PIXMAP_BUFFER GpuMemoryBuffer type. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 5 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 | « content/common/gpu/gpu_channel.cc ('k') | content/common/gpu/gpu_channel_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/gpu_channel_manager.h
diff --git a/content/common/gpu/gpu_channel_manager.h b/content/common/gpu/gpu_channel_manager.h
index 02efd914753ed70729cf0406ebb1bd771eeae356..65eb1f1340f5415acb202a46b7a14e0dcdae31a8 100644
--- a/content/common/gpu/gpu_channel_manager.h
+++ b/content/common/gpu/gpu_channel_manager.h
@@ -47,6 +47,7 @@ struct GPUCreateCommandBufferConfig;
namespace content {
class GpuChannel;
+class GpuMemoryBufferFactory;
class GpuWatchdog;
class MessageRouter;
class SyncPointManager;
@@ -98,16 +99,20 @@ class GpuChannelManager : public IPC::Listener,
gfx::GLSurface* GetDefaultOffscreenSurface();
+ GpuMemoryBufferFactory* gpu_memory_buffer_factory() {
+ return gpu_memory_buffer_factory_.get();
+ }
+
private:
- struct ImageOperation {
- ImageOperation(int32 sync_point, base::Closure callback);
- ~ImageOperation();
+ struct GpuMemoryBufferOperation {
+ GpuMemoryBufferOperation(int32 sync_point, base::Closure callback);
+ ~GpuMemoryBufferOperation();
int32 sync_point;
base::Closure callback;
};
typedef base::ScopedPtrHashMap<int, GpuChannel> GpuChannelMap;
- typedef std::deque<ImageOperation*> ImageOperationQueue;
+ typedef std::deque<GpuMemoryBufferOperation*> GpuMemoryBufferOperationQueue;
// Message handlers.
void OnEstablishChannel(int client_id,
@@ -122,20 +127,20 @@ class GpuChannelManager : public IPC::Listener,
int32 client_id,
const GPUCreateCommandBufferConfig& init_params,
int32 route_id);
- void CreateImage(
- gfx::PluginWindowHandle window, int32 client_id, int32 image_id);
- void OnCreateImage(
- gfx::PluginWindowHandle window, int32 client_id, int32 image_id);
- void DeleteImage(int32 client_id, int32 image_id);
- void OnDeleteImage(int32 client_id, int32 image_id, int32 sync_point);
- void OnDeleteImageSyncPointRetired(ImageOperation*);
void OnLoadedShader(std::string shader);
+ void CreateGpuMemoryBuffer(const gfx::GpuMemoryBufferHandle& handle,
+ const gfx::Size& size,
+ unsigned internalformat,
+ unsigned usage);
void OnCreateGpuMemoryBuffer(const gfx::GpuMemoryBufferHandle& handle,
const gfx::Size& size,
unsigned internalformat,
unsigned usage);
+ void DestroyGpuMemoryBuffer(const gfx::GpuMemoryBufferHandle& handle);
void OnDestroyGpuMemoryBuffer(const gfx::GpuMemoryBufferHandle& handle,
int32 sync_point);
+ void OnDestroyGpuMemoryBufferSyncPointRetired(
+ GpuMemoryBufferOperation* gpu_memory_buffer_operation);
void OnLoseAllContexts();
@@ -158,7 +163,8 @@ class GpuChannelManager : public IPC::Listener,
scoped_ptr<gpu::gles2::ProgramCache> program_cache_;
scoped_refptr<gpu::gles2::ShaderTranslatorCache> shader_translator_cache_;
scoped_refptr<gfx::GLSurface> default_offscreen_surface_;
- ImageOperationQueue image_operations_;
+ GpuMemoryBufferOperationQueue gpu_memory_buffer_operations_;
+ scoped_ptr<GpuMemoryBufferFactory> gpu_memory_buffer_factory_;
DISALLOW_COPY_AND_ASSIGN(GpuChannelManager);
};
« no previous file with comments | « content/common/gpu/gpu_channel.cc ('k') | content/common/gpu/gpu_channel_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698