Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 29 matching lines...) Expand all Loading... | |
| 40 #elif defined(OS_MACOSX) | 40 #elif defined(OS_MACOSX) |
| 41 #include "ui/base/cocoa/remote_layer_api.h" | 41 #include "ui/base/cocoa/remote_layer_api.h" |
| 42 #include "ui/gfx/mac/io_surface.h" | 42 #include "ui/gfx/mac/io_surface.h" |
| 43 #endif | 43 #endif |
| 44 | 44 |
| 45 #undef IPC_MESSAGE_EXPORT | 45 #undef IPC_MESSAGE_EXPORT |
| 46 #define IPC_MESSAGE_EXPORT GPU_EXPORT | 46 #define IPC_MESSAGE_EXPORT GPU_EXPORT |
| 47 | 47 |
| 48 #define IPC_MESSAGE_START GpuChannelMsgStart | 48 #define IPC_MESSAGE_START GpuChannelMsgStart |
| 49 | 49 |
| 50 // Singly-included section for typedefs. | |
| 51 #ifndef GPU_IPC_COMMON_GPU_MESSAGES_H_ | |
| 52 #define GPU_IPC_COMMON_GPU_MESSAGES_H_ | |
| 53 | |
| 54 using SwapBuffersCompletedIOSurfaceInUseQuery = std::pair<uint32_t, bool>; | |
|
piman
2016/06/14 00:58:56
nit: may I suggest an actual struct:
IPC_STRUCT_B
erikchen
2016/06/14 01:47:51
good point. done.
| |
| 55 | |
| 56 #endif // GPU_IPC_COMMON_GPU_MESSAGES_H_ | |
| 57 | |
| 50 IPC_STRUCT_BEGIN(GPUCommandBufferConsoleMessage) | 58 IPC_STRUCT_BEGIN(GPUCommandBufferConsoleMessage) |
| 51 IPC_STRUCT_MEMBER(int32_t, id) | 59 IPC_STRUCT_MEMBER(int32_t, id) |
| 52 IPC_STRUCT_MEMBER(std::string, message) | 60 IPC_STRUCT_MEMBER(std::string, message) |
| 53 IPC_STRUCT_END() | 61 IPC_STRUCT_END() |
| 54 | 62 |
| 55 IPC_STRUCT_BEGIN(GPUCreateCommandBufferConfig) | 63 IPC_STRUCT_BEGIN(GPUCreateCommandBufferConfig) |
| 56 IPC_STRUCT_MEMBER(gpu::SurfaceHandle, surface_handle) | 64 IPC_STRUCT_MEMBER(gpu::SurfaceHandle, surface_handle) |
| 57 IPC_STRUCT_MEMBER(gfx::Size, size) | 65 IPC_STRUCT_MEMBER(gfx::Size, size) |
| 58 IPC_STRUCT_MEMBER(int32_t, share_group_id) | 66 IPC_STRUCT_MEMBER(int32_t, share_group_id) |
| 59 IPC_STRUCT_MEMBER(int32_t, stream_id) | 67 IPC_STRUCT_MEMBER(int32_t, stream_id) |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 79 // the browser process. | 87 // the browser process. |
| 80 // https://crbug.com/604052 | 88 // https://crbug.com/604052 |
| 81 IPC_STRUCT_MEMBER(gpu::SurfaceHandle, surface_handle) | 89 IPC_STRUCT_MEMBER(gpu::SurfaceHandle, surface_handle) |
| 82 // Only one of ca_context_id or io_surface may be non-0. | 90 // Only one of ca_context_id or io_surface may be non-0. |
| 83 IPC_STRUCT_MEMBER(CAContextID, ca_context_id) | 91 IPC_STRUCT_MEMBER(CAContextID, ca_context_id) |
| 84 IPC_STRUCT_MEMBER(bool, fullscreen_low_power_ca_context_valid) | 92 IPC_STRUCT_MEMBER(bool, fullscreen_low_power_ca_context_valid) |
| 85 IPC_STRUCT_MEMBER(CAContextID, fullscreen_low_power_ca_context_id) | 93 IPC_STRUCT_MEMBER(CAContextID, fullscreen_low_power_ca_context_id) |
| 86 IPC_STRUCT_MEMBER(gfx::ScopedRefCountedIOSurfaceMachPort, io_surface) | 94 IPC_STRUCT_MEMBER(gfx::ScopedRefCountedIOSurfaceMachPort, io_surface) |
| 87 IPC_STRUCT_MEMBER(gfx::Size, pixel_size) | 95 IPC_STRUCT_MEMBER(gfx::Size, pixel_size) |
| 88 IPC_STRUCT_MEMBER(float, scale_factor) | 96 IPC_STRUCT_MEMBER(float, scale_factor) |
| 97 IPC_STRUCT_MEMBER(std::vector<SwapBuffersCompletedIOSurfaceInUseQuery>, | |
| 98 in_use_queries) | |
| 89 #endif | 99 #endif |
| 90 IPC_STRUCT_MEMBER(std::vector<ui::LatencyInfo>, latency_info) | 100 IPC_STRUCT_MEMBER(std::vector<ui::LatencyInfo>, latency_info) |
| 91 IPC_STRUCT_MEMBER(gfx::SwapResult, result) | 101 IPC_STRUCT_MEMBER(gfx::SwapResult, result) |
| 92 IPC_STRUCT_END() | 102 IPC_STRUCT_END() |
| 93 | 103 |
| 94 //------------------------------------------------------------------------------ | 104 //------------------------------------------------------------------------------ |
| 95 // GPU Channel Messages | 105 // GPU Channel Messages |
| 96 // These are messages from a renderer process to the GPU process. | 106 // These are messages from a renderer process to the GPU process. |
| 97 | 107 |
| 98 // Tells the GPU process to create a new command buffer. A corresponding | 108 // Tells the GPU process to create a new command buffer. A corresponding |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 240 GpuCommandBufferMsg_CreateImage_Params /* params */) | 250 GpuCommandBufferMsg_CreateImage_Params /* params */) |
| 241 | 251 |
| 242 // Destroy a previously created image. | 252 // Destroy a previously created image. |
| 243 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_DestroyImage, int32_t /* id */) | 253 IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_DestroyImage, int32_t /* id */) |
| 244 | 254 |
| 245 // Attaches an external image stream to the client texture. | 255 // Attaches an external image stream to the client texture. |
| 246 IPC_SYNC_MESSAGE_ROUTED2_1(GpuCommandBufferMsg_CreateStreamTexture, | 256 IPC_SYNC_MESSAGE_ROUTED2_1(GpuCommandBufferMsg_CreateStreamTexture, |
| 247 uint32_t, /* client_texture_id */ | 257 uint32_t, /* client_texture_id */ |
| 248 int32_t, /* stream_id */ | 258 int32_t, /* stream_id */ |
| 249 bool /* succeeded */) | 259 bool /* succeeded */) |
| OLD | NEW |