Index: chrome/browser/gpu_process_host.h |
diff --git a/chrome/browser/gpu_process_host.h b/chrome/browser/gpu_process_host.h |
index 8339f10739dc43f0598812b7b39244f74d332163..f7c17b01521d680399f6dd79c66df73039d4aeba 100644 |
--- a/chrome/browser/gpu_process_host.h |
+++ b/chrome/browser/gpu_process_host.h |
@@ -15,6 +15,7 @@ |
#include "gfx/native_widget_types.h" |
class GpuBlacklist; |
+struct GPUCreateCommandBufferConfig; |
class GPUInfo; |
class RenderMessageFilter; |
@@ -43,6 +44,19 @@ class GpuProcessHost : public BrowserChildProcessHost, |
// in. |
void Synchronize(IPC::Message* reply, RenderMessageFilter* filter); |
+ // Tells the GPU process to create a new command buffer that draws into the |
+ // window associated with the given renderer. |
+ void CreateViewCommandBuffer( |
+ int32 render_view_id, |
+ int32 renderer_id, |
+ const GPUCreateCommandBufferConfig& init_params, |
+ IPC::Message* reply, |
+ RenderMessageFilter* filter); |
+ |
+ // We need to hop threads when creating the command buffer. |
+ // Let these tasks access our internals. |
+ friend class CVCBThreadHopping; |
+ |
private: |
// Used to queue pending channel requests. |
struct ChannelRequest { |
@@ -53,10 +67,9 @@ class GpuProcessHost : public BrowserChildProcessHost, |
scoped_refptr<RenderMessageFilter> filter; |
}; |
- // Used to queue pending synchronization requests. |
- struct SynchronizationRequest { |
- SynchronizationRequest(IPC::Message* reply, RenderMessageFilter* filter); |
- ~SynchronizationRequest(); |
+ struct DelayedReply { |
+ DelayedReply(IPC::Message* reply, RenderMessageFilter* filter); |
+ ~DelayedReply(); |
// The delayed reply message which needs to be sent to the |
// renderer. |
@@ -78,14 +91,12 @@ class GpuProcessHost : public BrowserChildProcessHost, |
void OnChannelEstablished(const IPC::ChannelHandle& channel_handle, |
const GPUInfo& gpu_info); |
void OnSynchronizeReply(); |
+ void OnCommandBufferCreated(const int32 route_id); |
// Sends the response for establish channel request to the renderer. |
void SendEstablishChannelReply(const IPC::ChannelHandle& channel, |
const GPUInfo& gpu_info, |
RenderMessageFilter* filter); |
- // Sends the response for synchronization request to the renderer. |
- void SendSynchronizationReply(IPC::Message* reply, |
- RenderMessageFilter* filter); |
// Sends outstanding replies to renderer processes. This is only called |
// in error situations like the GPU process crashing -- but is necessary |
@@ -113,9 +124,13 @@ class GpuProcessHost : public BrowserChildProcessHost, |
std::queue<ChannelRequest> sent_requests_; |
// The pending synchronization requests we need to reply to. |
- std::queue<SynchronizationRequest> queued_synchronization_replies_; |
+ std::queue<DelayedReply> queued_synchronization_replies_; |
+ |
+ // The pending create command buffer requests we need to reply to. |
+ std::queue<DelayedReply> create_command_buffer_replies_; |
DISALLOW_COPY_AND_ASSIGN(GpuProcessHost); |
}; |
+ |
#endif // CHROME_BROWSER_GPU_PROCESS_HOST_H_ |