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

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

Issue 1962493002: Make Mac swap code like other platforms (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Incorporate review feedback Created 4 years, 7 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // Multiply-included message file, hence no include guard here, but see below 5 // Multiply-included message file, hence no include guard here, but see below
6 // for a much smaller-than-usual include guard section. 6 // for a much smaller-than-usual include guard section.
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 IPC_STRUCT_BEGIN(GpuCommandBufferMsg_CreateImage_Params) 64 IPC_STRUCT_BEGIN(GpuCommandBufferMsg_CreateImage_Params)
65 IPC_STRUCT_MEMBER(int32_t, id) 65 IPC_STRUCT_MEMBER(int32_t, id)
66 IPC_STRUCT_MEMBER(gfx::GpuMemoryBufferHandle, gpu_memory_buffer) 66 IPC_STRUCT_MEMBER(gfx::GpuMemoryBufferHandle, gpu_memory_buffer)
67 IPC_STRUCT_MEMBER(gfx::Size, size) 67 IPC_STRUCT_MEMBER(gfx::Size, size)
68 IPC_STRUCT_MEMBER(gfx::BufferFormat, format) 68 IPC_STRUCT_MEMBER(gfx::BufferFormat, format)
69 IPC_STRUCT_MEMBER(uint32_t, internal_format) 69 IPC_STRUCT_MEMBER(uint32_t, internal_format)
70 IPC_STRUCT_MEMBER(uint64_t, image_release_count) 70 IPC_STRUCT_MEMBER(uint64_t, image_release_count)
71 IPC_STRUCT_END() 71 IPC_STRUCT_END()
72 72
73 IPC_STRUCT_BEGIN(GpuCommandBufferMsg_SwapBuffersCompleted_Params)
74 #if defined(OS_MACOSX)
75 // Mac-specific parameters used to present CALayers hosted in the GPU process.
76 // TODO(ccameron): Remove these parameters once the CALayer tree is hosted in
77 // the browser process.
78 // https://crbug.com/604052
79 IPC_STRUCT_MEMBER(gpu::SurfaceHandle, surface_handle)
80 // Only one of ca_context_id or io_surface may be non-0.
81 IPC_STRUCT_MEMBER(CAContextID, ca_context_id)
82 IPC_STRUCT_MEMBER(bool, fullscreen_low_power_ca_context_valid)
83 IPC_STRUCT_MEMBER(CAContextID, fullscreen_low_power_ca_context_id)
84 IPC_STRUCT_MEMBER(gfx::ScopedRefCountedIOSurfaceMachPort, io_surface)
85 IPC_STRUCT_MEMBER(gfx::Size, pixel_size)
86 IPC_STRUCT_MEMBER(float, scale_factor)
87 #endif
88 IPC_STRUCT_MEMBER(std::vector<ui::LatencyInfo>, latency_info)
89 IPC_STRUCT_MEMBER(gfx::SwapResult, result)
90 IPC_STRUCT_END()
91
73 //------------------------------------------------------------------------------ 92 //------------------------------------------------------------------------------
74 // GPU Channel Messages 93 // GPU Channel Messages
75 // These are messages from a renderer process to the GPU process. 94 // These are messages from a renderer process to the GPU process.
76 95
77 // Tells the GPU process to create a new command buffer. A corresponding 96 // Tells the GPU process to create a new command buffer. A corresponding
78 // GpuCommandBufferStub is created. if |surface_handle| is non-null, |size| is 97 // GpuCommandBufferStub is created. if |surface_handle| is non-null, |size| is
79 // ignored, and it will render directly to the native surface (only the browser 98 // ignored, and it will render directly to the native surface (only the browser
80 // process is allowed to create those). Otherwise it will create an offscreen 99 // process is allowed to create those). Otherwise it will create an offscreen
81 // backbuffer of dimensions |size|. 100 // backbuffer of dimensions |size|.
82 IPC_SYNC_MESSAGE_CONTROL4_1(GpuChannelMsg_CreateCommandBuffer, 101 IPC_SYNC_MESSAGE_CONTROL4_1(GpuChannelMsg_CreateCommandBuffer,
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 // Destroy a previously created transfer buffer. 203 // Destroy a previously created transfer buffer.
185 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_DestroyTransferBuffer, int32_t /* id */) 204 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_DestroyTransferBuffer, int32_t /* id */)
186 205
187 // Tells the proxy that there was an error and the command buffer had to be 206 // Tells the proxy that there was an error and the command buffer had to be
188 // destroyed for some reason. 207 // destroyed for some reason.
189 IPC_MESSAGE_ROUTED2(GpuCommandBufferMsg_Destroyed, 208 IPC_MESSAGE_ROUTED2(GpuCommandBufferMsg_Destroyed,
190 gpu::error::ContextLostReason, /* reason */ 209 gpu::error::ContextLostReason, /* reason */
191 gpu::error::Error /* error */) 210 gpu::error::Error /* error */)
192 211
193 // Tells the browser that SwapBuffers returned and passes latency info 212 // Tells the browser that SwapBuffers returned and passes latency info
194 IPC_MESSAGE_ROUTED2(GpuCommandBufferMsg_SwapBuffersCompleted, 213 IPC_MESSAGE_ROUTED1(
195 std::vector<ui::LatencyInfo> /* latency_info */, 214 GpuCommandBufferMsg_SwapBuffersCompleted,
196 gfx::SwapResult /* result */) 215 GpuCommandBufferMsg_SwapBuffersCompleted_Params /* params */)
197 216
198 // Tells the browser about updated parameters for vsync alignment. 217 // Tells the browser about updated parameters for vsync alignment.
199 IPC_MESSAGE_ROUTED2(GpuCommandBufferMsg_UpdateVSyncParameters, 218 IPC_MESSAGE_ROUTED2(GpuCommandBufferMsg_UpdateVSyncParameters,
200 base::TimeTicks /* timebase */, 219 base::TimeTicks /* timebase */,
201 base::TimeDelta /* interval */) 220 base::TimeDelta /* interval */)
202 221
203 // The receiver will stop processing messages until the Synctoken is signaled. 222 // The receiver will stop processing messages until the Synctoken is signaled.
204 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_WaitSyncToken, 223 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_WaitSyncToken,
205 gpu::SyncToken /* sync_token */) 224 gpu::SyncToken /* sync_token */)
206 225
(...skipping 19 matching lines...) Expand all
226 GpuCommandBufferMsg_CreateImage_Params /* params */) 245 GpuCommandBufferMsg_CreateImage_Params /* params */)
227 246
228 // Destroy a previously created image. 247 // Destroy a previously created image.
229 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_DestroyImage, int32_t /* id */) 248 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_DestroyImage, int32_t /* id */)
230 249
231 // Attaches an external image stream to the client texture. 250 // Attaches an external image stream to the client texture.
232 IPC_SYNC_MESSAGE_ROUTED2_1(GpuCommandBufferMsg_CreateStreamTexture, 251 IPC_SYNC_MESSAGE_ROUTED2_1(GpuCommandBufferMsg_CreateStreamTexture,
233 uint32_t, /* client_texture_id */ 252 uint32_t, /* client_texture_id */
234 int32_t, /* stream_id */ 253 int32_t, /* stream_id */
235 bool /* succeeded */) 254 bool /* succeeded */)
OLDNEW
« no previous file with comments | « gpu/ipc/client/gpu_process_hosted_ca_layer_tree_params.cc ('k') | gpu/ipc/service/gpu_channel_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698