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

Side by Side Diff: content/common/gpu/gpu_messages.h

Issue 7129006: Make EstablishGpuChannel synchronous. Remove obsolete Synchronize msg. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: fix indentation and rebase Created 9 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/common/gpu/gpu_channel_manager.cc ('k') | content/renderer/render_thread.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include <vector> 5 #include <vector>
6 #include <string> 6 #include <string>
7 7
8 8
9 #include "base/shared_memory.h" 9 #include "base/shared_memory.h"
10 #include "content/common/common_param_traits.h" 10 #include "content/common/common_param_traits.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 // the GPU process reuses an existing channel to that process if it exists. 91 // the GPU process reuses an existing channel to that process if it exists.
92 // This ID is a unique opaque identifier generated by the browser process. 92 // This ID is a unique opaque identifier generated by the browser process.
93 IPC_MESSAGE_CONTROL1(GpuMsg_EstablishChannel, 93 IPC_MESSAGE_CONTROL1(GpuMsg_EstablishChannel,
94 int /* renderer_id */) 94 int /* renderer_id */)
95 95
96 // Tells the GPU process to close the channel identified by IPC channel 96 // Tells the GPU process to close the channel identified by IPC channel
97 // handle. If no channel can be identified, do nothing. 97 // handle. If no channel can be identified, do nothing.
98 IPC_MESSAGE_CONTROL1(GpuMsg_CloseChannel, 98 IPC_MESSAGE_CONTROL1(GpuMsg_CloseChannel,
99 IPC::ChannelHandle /* channel_handle */) 99 IPC::ChannelHandle /* channel_handle */)
100 100
101 // Provides a synchronization point to guarantee that the processing of
102 // previous asynchronous messages (i.e., GpuMsg_EstablishChannel) has
103 // completed. (This message can't be synchronous because the
104 // GpuProcessHost uses an IPC::ChannelProxy, which sends all messages
105 // asynchronously.) Results in a GpuHostMsg_SynchronizeReply.
106 IPC_MESSAGE_CONTROL0(GpuMsg_Synchronize)
107
108 IPC_MESSAGE_CONTROL3(GpuMsg_VisibilityChanged, 101 IPC_MESSAGE_CONTROL3(GpuMsg_VisibilityChanged,
109 int32, /*render_view_id */ 102 int32, /*render_view_id */
110 int32, /* renderer_id */ 103 int32, /* renderer_id */
111 bool /* is_visible */) 104 bool /* is_visible */)
112 105
113 // Tells the GPU process to create a new command buffer that renders directly 106 // Tells the GPU process to create a new command buffer that renders directly
114 // to a native view. A corresponding GpuCommandBufferStub is created. 107 // to a native view. A corresponding GpuCommandBufferStub is created.
115 IPC_MESSAGE_CONTROL4(GpuMsg_CreateViewCommandBuffer, 108 IPC_MESSAGE_CONTROL4(GpuMsg_CreateViewCommandBuffer,
116 gfx::PluginWindowHandle, /* compositing_surface */ 109 gfx::PluginWindowHandle, /* compositing_surface */
117 int32, /* render_view_id */ 110 int32, /* render_view_id */
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 142
150 // Tells the GPU process to remove all contexts. 143 // Tells the GPU process to remove all contexts.
151 IPC_MESSAGE_CONTROL0(GpuMsg_Clean) 144 IPC_MESSAGE_CONTROL0(GpuMsg_Clean)
152 145
153 // Tells the GPU process to crash. 146 // Tells the GPU process to crash.
154 IPC_MESSAGE_CONTROL0(GpuMsg_Crash) 147 IPC_MESSAGE_CONTROL0(GpuMsg_Crash)
155 148
156 // Tells the GPU process to hang. 149 // Tells the GPU process to hang.
157 IPC_MESSAGE_CONTROL0(GpuMsg_Hang) 150 IPC_MESSAGE_CONTROL0(GpuMsg_Hang)
158 151
159 // The browser sends this to a renderer process in response to a
160 // GpuHostMsg_EstablishGpuChannel message.
161 IPC_MESSAGE_CONTROL3(GpuMsg_GpuChannelEstablished,
162 IPC::ChannelHandle /* handle to channel */,
163 base::ProcessHandle /* renderer_process_for_gpu */,
164 GPUInfo /* stats about GPU process*/)
165
166 //------------------------------------------------------------------------------ 152 //------------------------------------------------------------------------------
167 // GPU Host Messages 153 // GPU Host Messages
168 // These are messages to the browser. 154 // These are messages to the browser.
169 155
170 // A renderer sends this when it wants to create a connection to the GPU 156 // A renderer sends this when it wants to create a connection to the GPU
171 // process. The browser will create the GPU process if necessary, and will 157 // process. The browser will create the GPU process if necessary, and will
172 // return a handle to the channel via a GpuChannelEstablished message. 158 // return a handle to the channel via a GpuChannelEstablished message.
173 IPC_MESSAGE_CONTROL1(GpuHostMsg_EstablishGpuChannel, 159 IPC_SYNC_MESSAGE_CONTROL1_3(GpuHostMsg_EstablishGpuChannel,
174 content::CauseForGpuLaunch) 160 content::CauseForGpuLaunch,
175 161 IPC::ChannelHandle /* handle to channel */,
176 // A renderer sends this to the browser process to provide a synchronization 162 base::ProcessHandle /* renderer_process_for_gpu */,
177 // point for GPU operations, in particular to make sure the GPU channel has 163 GPUInfo /* stats about GPU process*/)
178 // been established.
179 IPC_SYNC_MESSAGE_CONTROL0_0(GpuHostMsg_SynchronizeGpu)
180 164
181 // A renderer sends this to the browser process when it wants to 165 // A renderer sends this to the browser process when it wants to
182 // create a GL context associated with the given view_id. 166 // create a GL context associated with the given view_id.
183 IPC_SYNC_MESSAGE_CONTROL3_1(GpuHostMsg_CreateViewCommandBuffer, 167 IPC_SYNC_MESSAGE_CONTROL3_1(GpuHostMsg_CreateViewCommandBuffer,
184 gfx::PluginWindowHandle, /* view */ 168 gfx::PluginWindowHandle, /* view */
185 int32, /* render_view_id */ 169 int32, /* render_view_id */
186 GPUCreateCommandBufferConfig, /* init_params */ 170 GPUCreateCommandBufferConfig, /* init_params */
187 int32 /* route_id */) 171 int32 /* route_id */)
188 172
189 // Response from GPU to a GpuHostMsg_EstablishChannel message. 173 // Response from GPU to a GpuHostMsg_EstablishChannel message.
(...skipping 14 matching lines...) Expand all
204 // Response from GPU to a GpuMsg_CollectGraphicsInfo. 188 // Response from GPU to a GpuMsg_CollectGraphicsInfo.
205 IPC_MESSAGE_CONTROL1(GpuHostMsg_GraphicsInfoCollected, 189 IPC_MESSAGE_CONTROL1(GpuHostMsg_GraphicsInfoCollected,
206 GPUInfo /* GPU logging stats */) 190 GPUInfo /* GPU logging stats */)
207 191
208 // Message from GPU to add a GPU log message to the about:gpu page. 192 // Message from GPU to add a GPU log message to the about:gpu page.
209 IPC_MESSAGE_CONTROL3(GpuHostMsg_OnLogMessage, 193 IPC_MESSAGE_CONTROL3(GpuHostMsg_OnLogMessage,
210 int /*severity*/, 194 int /*severity*/,
211 std::string /* header */, 195 std::string /* header */,
212 std::string /* message */) 196 std::string /* message */)
213 197
214 // Response from GPU to a GpuMsg_Synchronize message.
215 IPC_MESSAGE_CONTROL0(GpuHostMsg_SynchronizeReply)
216
217 #if defined(TOOLKIT_USES_GTK) && !defined(TOUCH_UI) || defined(OS_WIN) 198 #if defined(TOOLKIT_USES_GTK) && !defined(TOUCH_UI) || defined(OS_WIN)
218 // Resize the window that is being drawn into. It's important that this 199 // Resize the window that is being drawn into. It's important that this
219 // resize be synchronized with the swapping of the front and back buffers. 200 // resize be synchronized with the swapping of the front and back buffers.
220 IPC_MESSAGE_CONTROL4(GpuHostMsg_ResizeView, 201 IPC_MESSAGE_CONTROL4(GpuHostMsg_ResizeView,
221 int32 /* renderer_id */, 202 int32 /* renderer_id */,
222 int32 /* render_view_id */, 203 int32 /* render_view_id */,
223 int32 /* command_buffer_route_id */, 204 int32 /* command_buffer_route_id */,
224 gfx::Size /* size */) 205 gfx::Size /* size */)
225 #elif defined(OS_MACOSX) 206 #elif defined(OS_MACOSX)
226 // This message, used on Mac OS X 10.6 and later (where IOSurface is 207 // This message, used on Mac OS X 10.6 and later (where IOSurface is
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 489
509 // Confirm decoder has been aborted. 490 // Confirm decoder has been aborted.
510 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_AbortDone) 491 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_AbortDone)
511 492
512 // Decoder has faced end of stream marker in the stream. 493 // Decoder has faced end of stream marker in the stream.
513 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_EndOfStream) 494 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_EndOfStream)
514 495
515 // Video decoder has encountered an error. 496 // Video decoder has encountered an error.
516 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_ErrorNotification, 497 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_ErrorNotification,
517 uint32) /* Error ID */ 498 uint32) /* Error ID */
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_channel_manager.cc ('k') | content/renderer/render_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698