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

Side by Side Diff: content/common/android/sync_compositor_messages.h

Issue 1969263004: sync compositor: Remove begin frame source (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase onto https://codereview.chromium.org/1974133002/ Created 4 years, 6 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 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"
11 #include "content/common/content_export.h" 11 #include "content/common/content_export.h"
12 #include "content/common/content_param_traits.h" 12 #include "content/common/content_param_traits.h"
13 #include "content/common/input/did_overscroll_params.h" 13 #include "content/common/input/did_overscroll_params.h"
14 #include "content/common/input/input_event_ack_state.h" 14 #include "content/common/input/input_event_ack_state.h"
15 #include "ipc/ipc_message_macros.h" 15 #include "ipc/ipc_message_macros.h"
16 #include "third_party/WebKit/public/web/WebInputEvent.h" 16 #include "third_party/WebKit/public/web/WebInputEvent.h"
17 #include "ui/gfx/geometry/point.h" 17 #include "ui/gfx/geometry/point.h"
18 #include "ui/gfx/geometry/scroll_offset.h" 18 #include "ui/gfx/geometry/scroll_offset.h"
19 19
20 #ifndef CONTENT_COMMON_ANDROID_SYNC_COMPOSITOR_MESSAGES_H_ 20 #ifndef CONTENT_COMMON_ANDROID_SYNC_COMPOSITOR_MESSAGES_H_
21 #define CONTENT_COMMON_ANDROID_SYNC_COMPOSITOR_MESSAGES_H_ 21 #define CONTENT_COMMON_ANDROID_SYNC_COMPOSITOR_MESSAGES_H_
22 22
23 namespace content { 23 namespace content {
24 24
25 struct SyncCompositorCommonBrowserParams {
26 SyncCompositorCommonBrowserParams();
27 ~SyncCompositorCommonBrowserParams();
28
29 bool begin_frame_source_paused;
30 };
31
32 struct SyncCompositorDemandDrawHwParams { 25 struct SyncCompositorDemandDrawHwParams {
33 SyncCompositorDemandDrawHwParams(); 26 SyncCompositorDemandDrawHwParams();
34 SyncCompositorDemandDrawHwParams( 27 SyncCompositorDemandDrawHwParams(
35 const gfx::Size& surface_size, 28 const gfx::Size& surface_size,
36 const gfx::Transform& transform, 29 const gfx::Transform& transform,
37 const gfx::Rect& viewport, 30 const gfx::Rect& viewport,
38 const gfx::Rect& clip, 31 const gfx::Rect& clip,
39 const gfx::Rect& viewport_rect_for_tile_priority, 32 const gfx::Rect& viewport_rect_for_tile_priority,
40 const gfx::Transform& transform_for_tile_priority); 33 const gfx::Transform& transform_for_tile_priority);
41 ~SyncCompositorDemandDrawHwParams(); 34 ~SyncCompositorDemandDrawHwParams();
(...skipping 28 matching lines...) Expand all
70 63
71 unsigned int version; 64 unsigned int version;
72 gfx::ScrollOffset total_scroll_offset; 65 gfx::ScrollOffset total_scroll_offset;
73 gfx::ScrollOffset max_scroll_offset; 66 gfx::ScrollOffset max_scroll_offset;
74 gfx::SizeF scrollable_size; 67 gfx::SizeF scrollable_size;
75 float page_scale_factor; 68 float page_scale_factor;
76 float min_page_scale_factor; 69 float min_page_scale_factor;
77 float max_page_scale_factor; 70 float max_page_scale_factor;
78 bool need_animate_scroll; 71 bool need_animate_scroll;
79 uint32_t need_invalidate_count; 72 uint32_t need_invalidate_count;
80 bool need_begin_frame;
81 uint32_t did_activate_pending_tree_count; 73 uint32_t did_activate_pending_tree_count;
82 }; 74 };
83 75
84 } // namespace content 76 } // namespace content
85 77
86 #endif // CONTENT_COMMON_ANDROID_SYNC_COMPOSITOR_MESSAGES_H_ 78 #endif // CONTENT_COMMON_ANDROID_SYNC_COMPOSITOR_MESSAGES_H_
87 79
88 // Multiply-included message file, hence no include guard. 80 // Multiply-included message file, hence no include guard.
89 81
90 #undef IPC_MESSAGE_EXPORT 82 #undef IPC_MESSAGE_EXPORT
91 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT 83 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
92 #define IPC_MESSAGE_START SyncCompositorMsgStart 84 #define IPC_MESSAGE_START SyncCompositorMsgStart
93 85
94 IPC_STRUCT_TRAITS_BEGIN(content::SyncCompositorCommonBrowserParams)
95 IPC_STRUCT_TRAITS_MEMBER(begin_frame_source_paused)
96 IPC_STRUCT_TRAITS_END()
97
98 IPC_STRUCT_TRAITS_BEGIN(content::SyncCompositorDemandDrawHwParams) 86 IPC_STRUCT_TRAITS_BEGIN(content::SyncCompositorDemandDrawHwParams)
99 IPC_STRUCT_TRAITS_MEMBER(surface_size) 87 IPC_STRUCT_TRAITS_MEMBER(surface_size)
100 IPC_STRUCT_TRAITS_MEMBER(transform) 88 IPC_STRUCT_TRAITS_MEMBER(transform)
101 IPC_STRUCT_TRAITS_MEMBER(viewport) 89 IPC_STRUCT_TRAITS_MEMBER(viewport)
102 IPC_STRUCT_TRAITS_MEMBER(clip) 90 IPC_STRUCT_TRAITS_MEMBER(clip)
103 IPC_STRUCT_TRAITS_MEMBER(viewport_rect_for_tile_priority) 91 IPC_STRUCT_TRAITS_MEMBER(viewport_rect_for_tile_priority)
104 IPC_STRUCT_TRAITS_MEMBER(transform_for_tile_priority) 92 IPC_STRUCT_TRAITS_MEMBER(transform_for_tile_priority)
105 IPC_STRUCT_TRAITS_END() 93 IPC_STRUCT_TRAITS_END()
106 94
107 IPC_STRUCT_TRAITS_BEGIN(content::SyncCompositorSetSharedMemoryParams) 95 IPC_STRUCT_TRAITS_BEGIN(content::SyncCompositorSetSharedMemoryParams)
(...skipping 10 matching lines...) Expand all
118 IPC_STRUCT_TRAITS_BEGIN(content::SyncCompositorCommonRendererParams) 106 IPC_STRUCT_TRAITS_BEGIN(content::SyncCompositorCommonRendererParams)
119 IPC_STRUCT_TRAITS_MEMBER(version) 107 IPC_STRUCT_TRAITS_MEMBER(version)
120 IPC_STRUCT_TRAITS_MEMBER(total_scroll_offset) 108 IPC_STRUCT_TRAITS_MEMBER(total_scroll_offset)
121 IPC_STRUCT_TRAITS_MEMBER(max_scroll_offset) 109 IPC_STRUCT_TRAITS_MEMBER(max_scroll_offset)
122 IPC_STRUCT_TRAITS_MEMBER(scrollable_size) 110 IPC_STRUCT_TRAITS_MEMBER(scrollable_size)
123 IPC_STRUCT_TRAITS_MEMBER(page_scale_factor) 111 IPC_STRUCT_TRAITS_MEMBER(page_scale_factor)
124 IPC_STRUCT_TRAITS_MEMBER(min_page_scale_factor) 112 IPC_STRUCT_TRAITS_MEMBER(min_page_scale_factor)
125 IPC_STRUCT_TRAITS_MEMBER(max_page_scale_factor) 113 IPC_STRUCT_TRAITS_MEMBER(max_page_scale_factor)
126 IPC_STRUCT_TRAITS_MEMBER(need_animate_scroll) 114 IPC_STRUCT_TRAITS_MEMBER(need_animate_scroll)
127 IPC_STRUCT_TRAITS_MEMBER(need_invalidate_count) 115 IPC_STRUCT_TRAITS_MEMBER(need_invalidate_count)
128 IPC_STRUCT_TRAITS_MEMBER(need_begin_frame)
129 IPC_STRUCT_TRAITS_MEMBER(did_activate_pending_tree_count) 116 IPC_STRUCT_TRAITS_MEMBER(did_activate_pending_tree_count)
130 IPC_STRUCT_TRAITS_END() 117 IPC_STRUCT_TRAITS_END()
131 118
132 // Messages sent from the browser to the renderer. 119 // Messages sent from the browser to the renderer.
133 // Synchronous IPCs are allowed here to the renderer compositor thread. See 120 // Synchronous IPCs are allowed here to the renderer compositor thread. See
134 // design doc https://goo.gl/Tn81FW and crbug.com/526842 for details. 121 // design doc https://goo.gl/Tn81FW and crbug.com/526842 for details.
135 122
136 IPC_SYNC_MESSAGE_ROUTED2_1(SyncCompositorMsg_BeginFrame, 123 IPC_SYNC_MESSAGE_ROUTED0_1(SyncCompositorMsg_SynchronizeRendererState,
137 content::SyncCompositorCommonBrowserParams,
138 cc::BeginFrameArgs,
139 content::SyncCompositorCommonRendererParams) 124 content::SyncCompositorCommonRendererParams)
140 125
141 IPC_MESSAGE_ROUTED2(SyncCompositorMsg_ComputeScroll, 126 IPC_MESSAGE_ROUTED1(SyncCompositorMsg_ComputeScroll,
142 content::SyncCompositorCommonBrowserParams,
143 base::TimeTicks); 127 base::TimeTicks);
144 128
145 IPC_SYNC_MESSAGE_ROUTED2_3(SyncCompositorMsg_DemandDrawHw, 129 IPC_SYNC_MESSAGE_ROUTED1_3(SyncCompositorMsg_DemandDrawHw,
146 content::SyncCompositorCommonBrowserParams,
147 content::SyncCompositorDemandDrawHwParams, 130 content::SyncCompositorDemandDrawHwParams,
148 content::SyncCompositorCommonRendererParams, 131 content::SyncCompositorCommonRendererParams,
149 uint32_t /* output_surface_id */, 132 uint32_t /* output_surface_id */,
150 cc::CompositorFrame) 133 cc::CompositorFrame)
151 134
152 IPC_SYNC_MESSAGE_ROUTED2_2(SyncCompositorMsg_SetSharedMemory, 135 IPC_SYNC_MESSAGE_ROUTED1_2(SyncCompositorMsg_SetSharedMemory,
153 content::SyncCompositorCommonBrowserParams,
154 content::SyncCompositorSetSharedMemoryParams, 136 content::SyncCompositorSetSharedMemoryParams,
155 bool /* success */, 137 bool /* success */,
156 content::SyncCompositorCommonRendererParams); 138 content::SyncCompositorCommonRendererParams);
157 139
158 IPC_MESSAGE_ROUTED0(SyncCompositorMsg_ZeroSharedMemory); 140 IPC_MESSAGE_ROUTED0(SyncCompositorMsg_ZeroSharedMemory);
159 141
160 IPC_SYNC_MESSAGE_ROUTED2_3(SyncCompositorMsg_DemandDrawSw, 142 IPC_SYNC_MESSAGE_ROUTED1_3(SyncCompositorMsg_DemandDrawSw,
161 content::SyncCompositorCommonBrowserParams,
162 content::SyncCompositorDemandDrawSwParams, 143 content::SyncCompositorDemandDrawSwParams,
163 bool /* result */, 144 bool /* result */,
164 content::SyncCompositorCommonRendererParams, 145 content::SyncCompositorCommonRendererParams,
165 cc::CompositorFrame) 146 cc::CompositorFrame)
166 147
167 IPC_MESSAGE_ROUTED1(SyncCompositorMsg_UpdateState, 148 IPC_SYNC_MESSAGE_ROUTED2_1(SyncCompositorMsg_ZoomBy,
168 content::SyncCompositorCommonBrowserParams)
169
170 IPC_SYNC_MESSAGE_ROUTED3_1(SyncCompositorMsg_ZoomBy,
171 content::SyncCompositorCommonBrowserParams,
172 float /* delta */, 149 float /* delta */,
173 gfx::Point /* anchor */, 150 gfx::Point /* anchor */,
174 content::SyncCompositorCommonRendererParams) 151 content::SyncCompositorCommonRendererParams)
175 152
176 IPC_MESSAGE_ROUTED1(SyncCompositorMsg_SetMemoryPolicy, 153 IPC_MESSAGE_ROUTED1(SyncCompositorMsg_SetMemoryPolicy,
177 uint32_t /* bytes_limit */); 154 uint32_t /* bytes_limit */);
178 155
179 IPC_MESSAGE_ROUTED2(SyncCompositorMsg_ReclaimResources, 156 IPC_MESSAGE_ROUTED2(SyncCompositorMsg_ReclaimResources,
180 uint32_t /* output_surface_id */, 157 uint32_t /* output_surface_id */,
181 cc::CompositorFrameAck); 158 cc::CompositorFrameAck);
182 159
183 IPC_MESSAGE_ROUTED1(SyncCompositorMsg_SetScroll, gfx::ScrollOffset); 160 IPC_MESSAGE_ROUTED1(SyncCompositorMsg_SetScroll, gfx::ScrollOffset);
184 161
185 // ----------------------------------------------------------------------------- 162 // -----------------------------------------------------------------------------
186 // Messages sent from the renderer to the browser. 163 // Messages sent from the renderer to the browser.
187 164
188 IPC_MESSAGE_ROUTED0(SyncCompositorHostMsg_OutputSurfaceCreated); 165 IPC_MESSAGE_ROUTED0(SyncCompositorHostMsg_OutputSurfaceCreated);
189 166
190 IPC_MESSAGE_ROUTED1(SyncCompositorHostMsg_UpdateState, 167 IPC_MESSAGE_ROUTED1(SyncCompositorHostMsg_UpdateState,
191 content::SyncCompositorCommonRendererParams) 168 content::SyncCompositorCommonRendererParams)
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_android.cc ('k') | content/common/android/sync_compositor_messages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698