Chromium Code Reviews| 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" |
| 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 { | 25 struct SyncCompositorCommonBrowserParams { |
| 26 SyncCompositorCommonBrowserParams(); | 26 SyncCompositorCommonBrowserParams(); |
| 27 ~SyncCompositorCommonBrowserParams(); | 27 ~SyncCompositorCommonBrowserParams(); |
| 28 | 28 |
| 29 uint32_t bytes_limit; | |
| 30 gfx::ScrollOffset root_scroll_offset; | 29 gfx::ScrollOffset root_scroll_offset; |
| 31 bool update_root_scroll_offset; | 30 bool update_root_scroll_offset; |
| 32 bool begin_frame_source_paused; | 31 bool begin_frame_source_paused; |
| 33 }; | 32 }; |
| 34 | 33 |
| 35 struct SyncCompositorDemandDrawHwParams { | 34 struct SyncCompositorDemandDrawHwParams { |
| 36 SyncCompositorDemandDrawHwParams(); | 35 SyncCompositorDemandDrawHwParams(); |
| 37 SyncCompositorDemandDrawHwParams( | 36 SyncCompositorDemandDrawHwParams( |
| 38 const gfx::Size& surface_size, | 37 const gfx::Size& surface_size, |
| 39 const gfx::Transform& transform, | 38 const gfx::Transform& transform, |
| (...skipping 24 matching lines...) Expand all Loading... | |
| 64 | 63 |
| 65 gfx::Size size; | 64 gfx::Size size; |
| 66 gfx::Rect clip; | 65 gfx::Rect clip; |
| 67 gfx::Transform transform; | 66 gfx::Transform transform; |
| 68 }; | 67 }; |
| 69 | 68 |
| 70 struct SyncCompositorCommonRendererParams { | 69 struct SyncCompositorCommonRendererParams { |
| 71 SyncCompositorCommonRendererParams(); | 70 SyncCompositorCommonRendererParams(); |
| 72 ~SyncCompositorCommonRendererParams(); | 71 ~SyncCompositorCommonRendererParams(); |
| 73 | 72 |
| 74 unsigned int version; | 73 unsigned int version; |
|
hush (inactive)
2016/05/12 19:23:03
now that we're here, let's change unsigned int to
boliu
2016/05/12 20:16:45
again, int is fine for cross-bit on all hardware p
| |
| 75 gfx::ScrollOffset total_scroll_offset; | 74 gfx::ScrollOffset total_scroll_offset; |
| 76 gfx::ScrollOffset max_scroll_offset; | 75 gfx::ScrollOffset max_scroll_offset; |
| 77 gfx::SizeF scrollable_size; | 76 gfx::SizeF scrollable_size; |
| 78 float page_scale_factor; | 77 float page_scale_factor; |
| 79 float min_page_scale_factor; | 78 float min_page_scale_factor; |
| 80 float max_page_scale_factor; | 79 float max_page_scale_factor; |
| 81 bool need_animate_scroll; | 80 bool need_animate_scroll; |
| 82 uint32_t need_invalidate_count; | 81 uint32_t need_invalidate_count; |
| 83 bool need_begin_frame; | 82 bool need_begin_frame; |
| 84 uint32_t did_activate_pending_tree_count; | 83 uint32_t did_activate_pending_tree_count; |
| 85 }; | 84 }; |
| 86 | 85 |
| 87 } // namespace content | 86 } // namespace content |
| 88 | 87 |
| 89 #endif // CONTENT_COMMON_ANDROID_SYNC_COMPOSITOR_MESSAGES_H_ | 88 #endif // CONTENT_COMMON_ANDROID_SYNC_COMPOSITOR_MESSAGES_H_ |
| 90 | 89 |
| 91 // Multiply-included message file, hence no include guard. | 90 // Multiply-included message file, hence no include guard. |
| 92 | 91 |
| 93 #undef IPC_MESSAGE_EXPORT | 92 #undef IPC_MESSAGE_EXPORT |
| 94 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | 93 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
| 95 #define IPC_MESSAGE_START SyncCompositorMsgStart | 94 #define IPC_MESSAGE_START SyncCompositorMsgStart |
| 96 | 95 |
| 97 IPC_STRUCT_TRAITS_BEGIN(content::SyncCompositorCommonBrowserParams) | 96 IPC_STRUCT_TRAITS_BEGIN(content::SyncCompositorCommonBrowserParams) |
| 98 IPC_STRUCT_TRAITS_MEMBER(bytes_limit) | |
| 99 IPC_STRUCT_TRAITS_MEMBER(root_scroll_offset) | 97 IPC_STRUCT_TRAITS_MEMBER(root_scroll_offset) |
| 100 IPC_STRUCT_TRAITS_MEMBER(update_root_scroll_offset) | 98 IPC_STRUCT_TRAITS_MEMBER(update_root_scroll_offset) |
| 101 IPC_STRUCT_TRAITS_MEMBER(begin_frame_source_paused) | 99 IPC_STRUCT_TRAITS_MEMBER(begin_frame_source_paused) |
| 102 IPC_STRUCT_TRAITS_END() | 100 IPC_STRUCT_TRAITS_END() |
| 103 | 101 |
| 104 IPC_STRUCT_TRAITS_BEGIN(content::SyncCompositorDemandDrawHwParams) | 102 IPC_STRUCT_TRAITS_BEGIN(content::SyncCompositorDemandDrawHwParams) |
| 105 IPC_STRUCT_TRAITS_MEMBER(surface_size) | 103 IPC_STRUCT_TRAITS_MEMBER(surface_size) |
| 106 IPC_STRUCT_TRAITS_MEMBER(transform) | 104 IPC_STRUCT_TRAITS_MEMBER(transform) |
| 107 IPC_STRUCT_TRAITS_MEMBER(viewport) | 105 IPC_STRUCT_TRAITS_MEMBER(viewport) |
| 108 IPC_STRUCT_TRAITS_MEMBER(clip) | 106 IPC_STRUCT_TRAITS_MEMBER(clip) |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 178 | 176 |
| 179 IPC_MESSAGE_ROUTED1(SyncCompositorMsg_UpdateState, | 177 IPC_MESSAGE_ROUTED1(SyncCompositorMsg_UpdateState, |
| 180 content::SyncCompositorCommonBrowserParams) | 178 content::SyncCompositorCommonBrowserParams) |
| 181 | 179 |
| 182 IPC_SYNC_MESSAGE_ROUTED3_1(SyncCompositorMsg_ZoomBy, | 180 IPC_SYNC_MESSAGE_ROUTED3_1(SyncCompositorMsg_ZoomBy, |
| 183 content::SyncCompositorCommonBrowserParams, | 181 content::SyncCompositorCommonBrowserParams, |
| 184 float /* delta */, | 182 float /* delta */, |
| 185 gfx::Point /* anchor */, | 183 gfx::Point /* anchor */, |
| 186 content::SyncCompositorCommonRendererParams) | 184 content::SyncCompositorCommonRendererParams) |
| 187 | 185 |
| 186 IPC_MESSAGE_ROUTED1(SyncCompositorMsg_SetMemoryPolicy, | |
| 187 uint32_t /* bytes_limit */); | |
| 188 | |
| 188 IPC_MESSAGE_ROUTED2(SyncCompositorMsg_ReclaimResources, | 189 IPC_MESSAGE_ROUTED2(SyncCompositorMsg_ReclaimResources, |
| 189 uint32_t /* output_surface_id */, | 190 uint32_t /* output_surface_id */, |
| 190 cc::CompositorFrameAck); | 191 cc::CompositorFrameAck); |
| 191 | 192 |
| 192 // ----------------------------------------------------------------------------- | 193 // ----------------------------------------------------------------------------- |
| 193 // Messages sent from the renderer to the browser. | 194 // Messages sent from the renderer to the browser. |
| 194 | 195 |
| 196 IPC_MESSAGE_ROUTED0(SyncCompositorHostMsg_OutputSurfaceCreated); | |
| 197 | |
| 195 IPC_MESSAGE_ROUTED1(SyncCompositorHostMsg_UpdateState, | 198 IPC_MESSAGE_ROUTED1(SyncCompositorHostMsg_UpdateState, |
| 196 content::SyncCompositorCommonRendererParams) | 199 content::SyncCompositorCommonRendererParams) |
| 197 | 200 |
| 198 IPC_MESSAGE_ROUTED2(SyncCompositorHostMsg_OverScroll, | 201 IPC_MESSAGE_ROUTED2(SyncCompositorHostMsg_OverScroll, |
| 199 content::SyncCompositorCommonRendererParams, | 202 content::SyncCompositorCommonRendererParams, |
| 200 content::DidOverscrollParams) | 203 content::DidOverscrollParams) |
| OLD | NEW |