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

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

Issue 2160743002: sync compositor: Reduce begin frame sync IPC overhead (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: clang format Created 4 years, 4 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 "content/common/content_export.h" 10 #include "content/common/content_export.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 53
54 gfx::Size size; 54 gfx::Size size;
55 gfx::Rect clip; 55 gfx::Rect clip;
56 gfx::Transform transform; 56 gfx::Transform transform;
57 }; 57 };
58 58
59 struct SyncCompositorCommonRendererParams { 59 struct SyncCompositorCommonRendererParams {
60 SyncCompositorCommonRendererParams(); 60 SyncCompositorCommonRendererParams();
61 ~SyncCompositorCommonRendererParams(); 61 ~SyncCompositorCommonRendererParams();
62 62
63 unsigned int version; 63 // Allow copy.
64 SyncCompositorCommonRendererParams(
65 const SyncCompositorCommonRendererParams& other);
66 SyncCompositorCommonRendererParams& operator=(
67 const SyncCompositorCommonRendererParams& other);
68
69 unsigned int version = 0u;
64 gfx::ScrollOffset total_scroll_offset; 70 gfx::ScrollOffset total_scroll_offset;
65 gfx::ScrollOffset max_scroll_offset; 71 gfx::ScrollOffset max_scroll_offset;
66 gfx::SizeF scrollable_size; 72 gfx::SizeF scrollable_size;
67 float page_scale_factor; 73 float page_scale_factor = 0.f;
68 float min_page_scale_factor; 74 float min_page_scale_factor = 0.f;
69 float max_page_scale_factor; 75 float max_page_scale_factor = 0.f;
70 bool need_animate_scroll; 76 bool need_animate_scroll = false;
71 uint32_t need_invalidate_count; 77 uint32_t need_invalidate_count = 0u;
72 uint32_t did_activate_pending_tree_count; 78 uint32_t did_activate_pending_tree_count = 0u;
73 }; 79 };
74 80
75 } // namespace content 81 } // namespace content
76 82
77 #endif // CONTENT_COMMON_ANDROID_SYNC_COMPOSITOR_MESSAGES_H_ 83 #endif // CONTENT_COMMON_ANDROID_SYNC_COMPOSITOR_MESSAGES_H_
78 84
79 // Multiply-included message file, hence no include guard. 85 // Multiply-included message file, hence no include guard.
80 86
81 #undef IPC_MESSAGE_EXPORT 87 #undef IPC_MESSAGE_EXPORT
82 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT 88 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
(...skipping 29 matching lines...) Expand all
112 IPC_STRUCT_TRAITS_MEMBER(max_page_scale_factor) 118 IPC_STRUCT_TRAITS_MEMBER(max_page_scale_factor)
113 IPC_STRUCT_TRAITS_MEMBER(need_animate_scroll) 119 IPC_STRUCT_TRAITS_MEMBER(need_animate_scroll)
114 IPC_STRUCT_TRAITS_MEMBER(need_invalidate_count) 120 IPC_STRUCT_TRAITS_MEMBER(need_invalidate_count)
115 IPC_STRUCT_TRAITS_MEMBER(did_activate_pending_tree_count) 121 IPC_STRUCT_TRAITS_MEMBER(did_activate_pending_tree_count)
116 IPC_STRUCT_TRAITS_END() 122 IPC_STRUCT_TRAITS_END()
117 123
118 // Messages sent from the browser to the renderer. 124 // Messages sent from the browser to the renderer.
119 // Synchronous IPCs are allowed here to the renderer compositor thread. See 125 // Synchronous IPCs are allowed here to the renderer compositor thread. See
120 // design doc https://goo.gl/Tn81FW and crbug.com/526842 for details. 126 // design doc https://goo.gl/Tn81FW and crbug.com/526842 for details.
121 127
122 IPC_SYNC_MESSAGE_ROUTED0_1(SyncCompositorMsg_SynchronizeRendererState, 128 IPC_SYNC_MESSAGE_CONTROL1_1(
123 content::SyncCompositorCommonRendererParams) 129 SyncCompositorMsg_SynchronizeRendererState,
130 std::vector<int> /* routing ids*/,
131 std::vector<content::SyncCompositorCommonRendererParams>)
124 132
125 IPC_MESSAGE_ROUTED1(SyncCompositorMsg_ComputeScroll, 133 IPC_MESSAGE_ROUTED1(SyncCompositorMsg_ComputeScroll,
126 base::TimeTicks); 134 base::TimeTicks);
127 135
128 IPC_SYNC_MESSAGE_ROUTED1_3(SyncCompositorMsg_DemandDrawHw, 136 IPC_SYNC_MESSAGE_ROUTED1_3(SyncCompositorMsg_DemandDrawHw,
129 content::SyncCompositorDemandDrawHwParams, 137 content::SyncCompositorDemandDrawHwParams,
130 content::SyncCompositorCommonRendererParams, 138 content::SyncCompositorCommonRendererParams,
131 uint32_t /* output_surface_id */, 139 uint32_t /* output_surface_id */,
132 cc::CompositorFrame) 140 cc::CompositorFrame)
133 141
(...skipping 24 matching lines...) Expand all
158 166
159 IPC_MESSAGE_ROUTED1(SyncCompositorMsg_SetScroll, gfx::ScrollOffset); 167 IPC_MESSAGE_ROUTED1(SyncCompositorMsg_SetScroll, gfx::ScrollOffset);
160 168
161 // ----------------------------------------------------------------------------- 169 // -----------------------------------------------------------------------------
162 // Messages sent from the renderer to the browser. 170 // Messages sent from the renderer to the browser.
163 171
164 IPC_MESSAGE_ROUTED0(SyncCompositorHostMsg_OutputSurfaceCreated); 172 IPC_MESSAGE_ROUTED0(SyncCompositorHostMsg_OutputSurfaceCreated);
165 173
166 IPC_MESSAGE_ROUTED1(SyncCompositorHostMsg_UpdateState, 174 IPC_MESSAGE_ROUTED1(SyncCompositorHostMsg_UpdateState,
167 content::SyncCompositorCommonRendererParams) 175 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