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

Side by Side Diff: chrome/browser/gpu_process_host.h

Issue 5317007: Add flow control between renderer and GPU processes, and, on Mac OS X,... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_GPU_PROCESS_HOST_H_ 5 #ifndef CHROME_BROWSER_GPU_PROCESS_HOST_H_
6 #define CHROME_BROWSER_GPU_PROCESS_HOST_H_ 6 #define CHROME_BROWSER_GPU_PROCESS_HOST_H_
7 #pragma once 7 #pragma once
8 8
9 #include <queue> 9 #include <queue>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/non_thread_safe.h" 12 #include "base/non_thread_safe.h"
13 #include "base/ref_counted.h" 13 #include "base/ref_counted.h"
14 #include "chrome/browser/browser_child_process_host.h" 14 #include "chrome/browser/browser_child_process_host.h"
15 #include "gfx/native_widget_types.h" 15 #include "gfx/native_widget_types.h"
16 16
17 struct GpuHostMsg_AcceleratedSurfaceSetIOSurface_Params; 17 struct GpuHostMsg_AcceleratedSurfaceSetIOSurface_Params;
18 struct GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params;
18 class GPUInfo; 19 class GPUInfo;
19 class ResourceMessageFilter; 20 class ResourceMessageFilter;
20 21
21 namespace IPC { 22 namespace IPC {
22 struct ChannelHandle; 23 struct ChannelHandle;
23 class Message; 24 class Message;
24 } 25 }
25 26
26 class GpuProcessHost : public BrowserChildProcessHost, public NonThreadSafe { 27 class GpuProcessHost : public BrowserChildProcessHost, public NonThreadSafe {
27 public: 28 public:
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 79
79 // Message handlers. 80 // Message handlers.
80 void OnChannelEstablished(const IPC::ChannelHandle& channel_handle, 81 void OnChannelEstablished(const IPC::ChannelHandle& channel_handle,
81 const GPUInfo& gpu_info); 82 const GPUInfo& gpu_info);
82 void OnSynchronizeReply(); 83 void OnSynchronizeReply();
83 #if defined(OS_LINUX) 84 #if defined(OS_LINUX)
84 void OnGetViewXID(gfx::NativeViewId id, IPC::Message* reply_msg); 85 void OnGetViewXID(gfx::NativeViewId id, IPC::Message* reply_msg);
85 #elif defined(OS_MACOSX) 86 #elif defined(OS_MACOSX)
86 void OnAcceleratedSurfaceSetIOSurface( 87 void OnAcceleratedSurfaceSetIOSurface(
87 const GpuHostMsg_AcceleratedSurfaceSetIOSurface_Params& params); 88 const GpuHostMsg_AcceleratedSurfaceSetIOSurface_Params& params);
88 void OnAcceleratedSurfaceBuffersSwapped(int32 renderer_id, 89 void OnAcceleratedSurfaceBuffersSwapped(
89 int32 render_view_id, 90 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params);
90 gfx::PluginWindowHandle window,
91 uint64 surface_id);
92 #endif 91 #endif
93 92
94 // Sends the response for establish channel request to the renderer. 93 // Sends the response for establish channel request to the renderer.
95 void SendEstablishChannelReply(const IPC::ChannelHandle& channel, 94 void SendEstablishChannelReply(const IPC::ChannelHandle& channel,
96 const GPUInfo& gpu_info, 95 const GPUInfo& gpu_info,
97 ResourceMessageFilter* filter); 96 ResourceMessageFilter* filter);
98 // Sends the response for synchronization request to the renderer. 97 // Sends the response for synchronization request to the renderer.
99 void SendSynchronizationReply(IPC::Message* reply, 98 void SendSynchronizationReply(IPC::Message* reply,
100 ResourceMessageFilter* filter); 99 ResourceMessageFilter* filter);
101 100
(...skipping 15 matching lines...) Expand all
117 // the GPU process, but haven't heard back about yet. 116 // the GPU process, but haven't heard back about yet.
118 std::queue<ChannelRequest> sent_requests_; 117 std::queue<ChannelRequest> sent_requests_;
119 118
120 // The pending synchronization requests we need to reply to. 119 // The pending synchronization requests we need to reply to.
121 std::queue<SynchronizationRequest> queued_synchronization_replies_; 120 std::queue<SynchronizationRequest> queued_synchronization_replies_;
122 121
123 DISALLOW_COPY_AND_ASSIGN(GpuProcessHost); 122 DISALLOW_COPY_AND_ASSIGN(GpuProcessHost);
124 }; 123 };
125 124
126 #endif // CHROME_BROWSER_GPU_PROCESS_HOST_H_ 125 #endif // CHROME_BROWSER_GPU_PROCESS_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698