OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 <stddef.h> | 5 #include <stddef.h> |
6 | 6 |
7 #include "base/memory/shared_memory_handle.h" | 7 #include "base/memory/shared_memory_handle.h" |
8 #include "cc/output/begin_frame_args.h" | 8 #include "cc/output/begin_frame_args.h" |
9 #include "cc/output/compositor_frame.h" | 9 #include "cc/output/compositor_frame.h" |
10 #include "cc/output/compositor_frame_ack.h" | 10 #include "cc/output/compositor_frame_ack.h" |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 IPC_STRUCT_TRAITS_MEMBER(page_scale_factor) | 132 IPC_STRUCT_TRAITS_MEMBER(page_scale_factor) |
133 IPC_STRUCT_TRAITS_MEMBER(min_page_scale_factor) | 133 IPC_STRUCT_TRAITS_MEMBER(min_page_scale_factor) |
134 IPC_STRUCT_TRAITS_MEMBER(max_page_scale_factor) | 134 IPC_STRUCT_TRAITS_MEMBER(max_page_scale_factor) |
135 IPC_STRUCT_TRAITS_MEMBER(need_animate_scroll) | 135 IPC_STRUCT_TRAITS_MEMBER(need_animate_scroll) |
136 IPC_STRUCT_TRAITS_MEMBER(need_invalidate_count) | 136 IPC_STRUCT_TRAITS_MEMBER(need_invalidate_count) |
137 IPC_STRUCT_TRAITS_MEMBER(need_begin_frame) | 137 IPC_STRUCT_TRAITS_MEMBER(need_begin_frame) |
138 IPC_STRUCT_TRAITS_MEMBER(did_activate_pending_tree_count) | 138 IPC_STRUCT_TRAITS_MEMBER(did_activate_pending_tree_count) |
139 IPC_STRUCT_TRAITS_END() | 139 IPC_STRUCT_TRAITS_END() |
140 | 140 |
141 // Messages sent from the browser to the renderer. | 141 // Messages sent from the browser to the renderer. |
| 142 // Synchronous IPCs are allowed here to the renderer compositor thread. See |
| 143 // design doc https://goo.gl/Tn81FW and crbug.com/526842 for details. |
142 | 144 |
143 IPC_SYNC_MESSAGE_ROUTED2_2(SyncCompositorMsg_HandleInputEvent, | 145 IPC_SYNC_MESSAGE_ROUTED2_2(SyncCompositorMsg_HandleInputEvent, |
144 content::SyncCompositorCommonBrowserParams, | 146 content::SyncCompositorCommonBrowserParams, |
145 IPC::WebInputEventPointer, | 147 IPC::WebInputEventPointer, |
146 content::SyncCompositorCommonRendererParams, | 148 content::SyncCompositorCommonRendererParams, |
147 content::InputEventAckState) | 149 content::InputEventAckState) |
148 | 150 |
149 IPC_SYNC_MESSAGE_ROUTED2_1(SyncCompositorMsg_BeginFrame, | 151 IPC_SYNC_MESSAGE_ROUTED2_1(SyncCompositorMsg_BeginFrame, |
150 content::SyncCompositorCommonBrowserParams, | 152 content::SyncCompositorCommonBrowserParams, |
151 cc::BeginFrameArgs, | 153 cc::BeginFrameArgs, |
(...skipping 21 matching lines...) Expand all Loading... |
173 IPC_SYNC_MESSAGE_ROUTED2_3(SyncCompositorMsg_DemandDrawSw, | 175 IPC_SYNC_MESSAGE_ROUTED2_3(SyncCompositorMsg_DemandDrawSw, |
174 content::SyncCompositorCommonBrowserParams, | 176 content::SyncCompositorCommonBrowserParams, |
175 content::SyncCompositorDemandDrawSwParams, | 177 content::SyncCompositorDemandDrawSwParams, |
176 bool /* result */, | 178 bool /* result */, |
177 content::SyncCompositorCommonRendererParams, | 179 content::SyncCompositorCommonRendererParams, |
178 cc::CompositorFrame) | 180 cc::CompositorFrame) |
179 | 181 |
180 IPC_MESSAGE_ROUTED1(SyncCompositorMsg_UpdateState, | 182 IPC_MESSAGE_ROUTED1(SyncCompositorMsg_UpdateState, |
181 content::SyncCompositorCommonBrowserParams) | 183 content::SyncCompositorCommonBrowserParams) |
182 | 184 |
| 185 // The synchronous version is used to synchronize state from an earlier |
| 186 // asynchronous call only. This should be needed rarely so should prefer the |
| 187 // asynchronous version above in general. |
| 188 IPC_SYNC_MESSAGE_ROUTED1_1(SyncCompositorMsg_SynchronousUpdateState, |
| 189 content::SyncCompositorCommonBrowserParams, |
| 190 content::SyncCompositorCommonRendererParams) |
| 191 |
183 // ----------------------------------------------------------------------------- | 192 // ----------------------------------------------------------------------------- |
184 // Messages sent from the renderer to the browser. | 193 // Messages sent from the renderer to the browser. |
185 | 194 |
186 IPC_MESSAGE_ROUTED1(SyncCompositorHostMsg_UpdateState, | 195 IPC_MESSAGE_ROUTED1(SyncCompositorHostMsg_UpdateState, |
187 content::SyncCompositorCommonRendererParams) | 196 content::SyncCompositorCommonRendererParams) |
188 | 197 |
189 IPC_MESSAGE_ROUTED2(SyncCompositorHostMsg_OverScroll, | 198 IPC_MESSAGE_ROUTED2(SyncCompositorHostMsg_OverScroll, |
190 content::SyncCompositorCommonRendererParams, | 199 content::SyncCompositorCommonRendererParams, |
191 content::DidOverscrollParams) | 200 content::DidOverscrollParams) |
OLD | NEW |