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