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

Unified Diff: content/common/gpu/gpu_channel_manager.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 | « content/common/gpu/client/gpu_memory_buffer_impl_win.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 65eb1f1340f5415acb202a46b7a14e0dcdae31a8..4d18306a38f297bad502ebbb4429438b8d3a4443 100644
--- a/content/common/gpu/gpu_channel_manager.h
+++ b/content/common/gpu/gpu_channel_manager.h
@@ -41,6 +41,8 @@ class ShaderTranslatorCache;
namespace IPC {
struct ChannelHandle;
+class SyncChannel;
+class MessageFilter;
}
struct GPUCreateCommandBufferConfig;
@@ -61,7 +63,8 @@ class GpuChannelManager : public IPC::Listener,
GpuChannelManager(MessageRouter* router,
GpuWatchdog* watchdog,
base::MessageLoopProxy* io_message_loop,
- base::WaitableEvent* shutdown_event);
+ base::WaitableEvent* shutdown_event,
+ IPC::SyncChannel* channel);
virtual ~GpuChannelManager();
// Remove the channel for a particular renderer.
@@ -104,15 +107,7 @@ class GpuChannelManager : public IPC::Listener,
}
private:
- 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<GpuMemoryBufferOperation*> GpuMemoryBufferOperationQueue;
// Message handlers.
void OnEstablishChannel(int client_id,
@@ -128,19 +123,10 @@ class GpuChannelManager : public IPC::Listener,
const GPUCreateCommandBufferConfig& init_params,
int32 route_id);
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 DestroyGpuMemoryBufferOnIO(const gfx::GpuMemoryBufferHandle& handle);
void OnDestroyGpuMemoryBuffer(const gfx::GpuMemoryBufferHandle& handle,
int32 sync_point);
- void OnDestroyGpuMemoryBufferSyncPointRetired(
- GpuMemoryBufferOperation* gpu_memory_buffer_operation);
void OnLoseAllContexts();
@@ -163,8 +149,9 @@ 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_;
- GpuMemoryBufferOperationQueue gpu_memory_buffer_operations_;
scoped_ptr<GpuMemoryBufferFactory> gpu_memory_buffer_factory_;
+ IPC::SyncChannel* channel_;
+ scoped_refptr<IPC::MessageFilter> filter_;
DISALLOW_COPY_AND_ASSIGN(GpuChannelManager);
};
« no previous file with comments | « content/common/gpu/client/gpu_memory_buffer_impl_win.cc ('k') | content/common/gpu/gpu_channel_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698