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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 ~SyncCompositorDemandDrawHwParams(); | 43 ~SyncCompositorDemandDrawHwParams(); |
44 | 44 |
45 gfx::Size surface_size; | 45 gfx::Size surface_size; |
46 gfx::Transform transform; | 46 gfx::Transform transform; |
47 gfx::Rect viewport; | 47 gfx::Rect viewport; |
48 gfx::Rect clip; | 48 gfx::Rect clip; |
49 gfx::Rect viewport_rect_for_tile_priority; | 49 gfx::Rect viewport_rect_for_tile_priority; |
50 gfx::Transform transform_for_tile_priority; | 50 gfx::Transform transform_for_tile_priority; |
51 }; | 51 }; |
52 | 52 |
| 53 struct SyncCompositorSetSharedMemoryParams { |
| 54 SyncCompositorSetSharedMemoryParams(); |
| 55 |
| 56 size_t buffer_size; |
| 57 base::SharedMemoryHandle shm_handle; |
| 58 }; |
| 59 |
53 struct SyncCompositorDemandDrawSwParams { | 60 struct SyncCompositorDemandDrawSwParams { |
54 SyncCompositorDemandDrawSwParams(); | 61 SyncCompositorDemandDrawSwParams(); |
55 ~SyncCompositorDemandDrawSwParams(); | 62 ~SyncCompositorDemandDrawSwParams(); |
56 | 63 |
57 gfx::Size size; | 64 gfx::Size size; |
58 gfx::Rect clip; | 65 gfx::Rect clip; |
59 gfx::Transform transform; | 66 gfx::Transform transform; |
60 base::SharedMemoryHandle shm_handle; | |
61 }; | 67 }; |
62 | 68 |
63 struct SyncCompositorCommonRendererParams { | 69 struct SyncCompositorCommonRendererParams { |
64 SyncCompositorCommonRendererParams(); | 70 SyncCompositorCommonRendererParams(); |
65 ~SyncCompositorCommonRendererParams(); | 71 ~SyncCompositorCommonRendererParams(); |
66 | 72 |
67 unsigned int version; | 73 unsigned int version; |
68 gfx::ScrollOffset total_scroll_offset; | 74 gfx::ScrollOffset total_scroll_offset; |
69 gfx::ScrollOffset max_scroll_offset; | 75 gfx::ScrollOffset max_scroll_offset; |
70 gfx::SizeF scrollable_size; | 76 gfx::SizeF scrollable_size; |
(...skipping 25 matching lines...) Expand all Loading... |
96 | 102 |
97 IPC_STRUCT_TRAITS_BEGIN(content::SyncCompositorDemandDrawHwParams) | 103 IPC_STRUCT_TRAITS_BEGIN(content::SyncCompositorDemandDrawHwParams) |
98 IPC_STRUCT_TRAITS_MEMBER(surface_size) | 104 IPC_STRUCT_TRAITS_MEMBER(surface_size) |
99 IPC_STRUCT_TRAITS_MEMBER(transform) | 105 IPC_STRUCT_TRAITS_MEMBER(transform) |
100 IPC_STRUCT_TRAITS_MEMBER(viewport) | 106 IPC_STRUCT_TRAITS_MEMBER(viewport) |
101 IPC_STRUCT_TRAITS_MEMBER(clip) | 107 IPC_STRUCT_TRAITS_MEMBER(clip) |
102 IPC_STRUCT_TRAITS_MEMBER(viewport_rect_for_tile_priority) | 108 IPC_STRUCT_TRAITS_MEMBER(viewport_rect_for_tile_priority) |
103 IPC_STRUCT_TRAITS_MEMBER(transform_for_tile_priority) | 109 IPC_STRUCT_TRAITS_MEMBER(transform_for_tile_priority) |
104 IPC_STRUCT_TRAITS_END() | 110 IPC_STRUCT_TRAITS_END() |
105 | 111 |
| 112 IPC_STRUCT_TRAITS_BEGIN(content::SyncCompositorSetSharedMemoryParams) |
| 113 IPC_STRUCT_TRAITS_MEMBER(buffer_size) |
| 114 IPC_STRUCT_TRAITS_MEMBER(shm_handle) |
| 115 IPC_STRUCT_TRAITS_END() |
| 116 |
106 IPC_STRUCT_TRAITS_BEGIN(content::SyncCompositorDemandDrawSwParams) | 117 IPC_STRUCT_TRAITS_BEGIN(content::SyncCompositorDemandDrawSwParams) |
107 IPC_STRUCT_TRAITS_MEMBER(size) | 118 IPC_STRUCT_TRAITS_MEMBER(size) |
108 IPC_STRUCT_TRAITS_MEMBER(clip) | 119 IPC_STRUCT_TRAITS_MEMBER(clip) |
109 IPC_STRUCT_TRAITS_MEMBER(transform) | 120 IPC_STRUCT_TRAITS_MEMBER(transform) |
110 IPC_STRUCT_TRAITS_MEMBER(shm_handle) | |
111 IPC_STRUCT_TRAITS_END() | 121 IPC_STRUCT_TRAITS_END() |
112 | 122 |
113 IPC_STRUCT_TRAITS_BEGIN(content::SyncCompositorCommonRendererParams) | 123 IPC_STRUCT_TRAITS_BEGIN(content::SyncCompositorCommonRendererParams) |
114 IPC_STRUCT_TRAITS_MEMBER(version) | 124 IPC_STRUCT_TRAITS_MEMBER(version) |
115 IPC_STRUCT_TRAITS_MEMBER(total_scroll_offset) | 125 IPC_STRUCT_TRAITS_MEMBER(total_scroll_offset) |
116 IPC_STRUCT_TRAITS_MEMBER(max_scroll_offset) | 126 IPC_STRUCT_TRAITS_MEMBER(max_scroll_offset) |
117 IPC_STRUCT_TRAITS_MEMBER(scrollable_size) | 127 IPC_STRUCT_TRAITS_MEMBER(scrollable_size) |
118 IPC_STRUCT_TRAITS_MEMBER(page_scale_factor) | 128 IPC_STRUCT_TRAITS_MEMBER(page_scale_factor) |
119 IPC_STRUCT_TRAITS_MEMBER(min_page_scale_factor) | 129 IPC_STRUCT_TRAITS_MEMBER(min_page_scale_factor) |
120 IPC_STRUCT_TRAITS_MEMBER(max_page_scale_factor) | 130 IPC_STRUCT_TRAITS_MEMBER(max_page_scale_factor) |
(...skipping 20 matching lines...) Expand all Loading... |
141 content::SyncCompositorCommonBrowserParams, | 151 content::SyncCompositorCommonBrowserParams, |
142 base::TimeTicks, | 152 base::TimeTicks, |
143 content::SyncCompositorCommonRendererParams) | 153 content::SyncCompositorCommonRendererParams) |
144 | 154 |
145 IPC_SYNC_MESSAGE_ROUTED2_2(SyncCompositorMsg_DemandDrawHw, | 155 IPC_SYNC_MESSAGE_ROUTED2_2(SyncCompositorMsg_DemandDrawHw, |
146 content::SyncCompositorCommonBrowserParams, | 156 content::SyncCompositorCommonBrowserParams, |
147 content::SyncCompositorDemandDrawHwParams, | 157 content::SyncCompositorDemandDrawHwParams, |
148 content::SyncCompositorCommonRendererParams, | 158 content::SyncCompositorCommonRendererParams, |
149 cc::CompositorFrame) | 159 cc::CompositorFrame) |
150 | 160 |
| 161 IPC_SYNC_MESSAGE_ROUTED2_2(SyncCompositorMsg_SetSharedMemory, |
| 162 content::SyncCompositorCommonBrowserParams, |
| 163 content::SyncCompositorSetSharedMemoryParams, |
| 164 bool /* success */, |
| 165 content::SyncCompositorCommonRendererParams); |
| 166 |
| 167 IPC_MESSAGE_ROUTED0(SyncCompositorMsg_ZeroSharedMemory); |
| 168 |
151 IPC_SYNC_MESSAGE_ROUTED2_3(SyncCompositorMsg_DemandDrawSw, | 169 IPC_SYNC_MESSAGE_ROUTED2_3(SyncCompositorMsg_DemandDrawSw, |
152 content::SyncCompositorCommonBrowserParams, | 170 content::SyncCompositorCommonBrowserParams, |
153 content::SyncCompositorDemandDrawSwParams, | 171 content::SyncCompositorDemandDrawSwParams, |
154 bool /* result */, | 172 bool /* result */, |
155 content::SyncCompositorCommonRendererParams, | 173 content::SyncCompositorCommonRendererParams, |
156 cc::CompositorFrame) | 174 cc::CompositorFrame) |
157 | 175 |
158 IPC_MESSAGE_ROUTED1(SyncCompositorMsg_UpdateState, | 176 IPC_MESSAGE_ROUTED1(SyncCompositorMsg_UpdateState, |
159 content::SyncCompositorCommonBrowserParams) | 177 content::SyncCompositorCommonBrowserParams) |
160 | 178 |
161 // ----------------------------------------------------------------------------- | 179 // ----------------------------------------------------------------------------- |
162 // Messages sent from the renderer to the browser. | 180 // Messages sent from the renderer to the browser. |
163 | 181 |
164 IPC_MESSAGE_ROUTED1(SyncCompositorHostMsg_UpdateState, | 182 IPC_MESSAGE_ROUTED1(SyncCompositorHostMsg_UpdateState, |
165 content::SyncCompositorCommonRendererParams) | 183 content::SyncCompositorCommonRendererParams) |
166 | 184 |
167 IPC_MESSAGE_ROUTED2(SyncCompositorHostMsg_OverScroll, | 185 IPC_MESSAGE_ROUTED2(SyncCompositorHostMsg_OverScroll, |
168 content::SyncCompositorCommonRendererParams, | 186 content::SyncCompositorCommonRendererParams, |
169 content::DidOverscrollParams) | 187 content::DidOverscrollParams) |
OLD | NEW |