| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "cc/output/begin_frame_args.h" |
| 6 #include "cc/output/compositor_frame.h" |
| 7 #include "cc/resources/returned_resource.h" |
| 8 #include "content/common/content_export.h" |
| 9 #include "content/common/content_param_traits.h" |
| 10 #include "content/common/input/input_event_ack_state.h" |
| 11 #include "ipc/ipc_message_macros.h" |
| 12 #include "third_party/WebKit/public/web/WebInputEvent.h" |
| 13 #include "ui/gfx/geometry/scroll_offset.h" |
| 14 |
| 15 #ifndef CONTENT_COMMON_ANDROID_SYNC_COMPOSITOR_MESSAGES_H_ |
| 16 #define CONTENT_COMMON_ANDROID_SYNC_COMPOSITOR_MESSAGES_H_ |
| 17 |
| 18 namespace content { |
| 19 |
| 20 struct SyncCompositorCommonBrowserParams { |
| 21 SyncCompositorCommonBrowserParams(); |
| 22 SyncCompositorCommonBrowserParams( |
| 23 size_t bytes_limit, |
| 24 const gfx::ScrollOffset& root_scroll_offset); |
| 25 ~SyncCompositorCommonBrowserParams(); |
| 26 |
| 27 size_t bytes_limit; |
| 28 cc::ReturnedResourceArray resources; |
| 29 gfx::ScrollOffset root_scroll_offset; |
| 30 }; |
| 31 |
| 32 struct SyncCompositorDemandDrawHwParams { |
| 33 SyncCompositorDemandDrawHwParams(); |
| 34 SyncCompositorDemandDrawHwParams( |
| 35 const gfx::Size& surface_size, |
| 36 const gfx::Transform& transform, |
| 37 const gfx::Rect& viewport, |
| 38 const gfx::Rect& clip, |
| 39 const gfx::Rect& viewport_rect_for_tile_priority, |
| 40 const gfx::Transform& transform_for_tile_priority); |
| 41 ~SyncCompositorDemandDrawHwParams(); |
| 42 |
| 43 gfx::Size surface_size; |
| 44 gfx::Transform transform; |
| 45 gfx::Rect viewport; |
| 46 gfx::Rect clip; |
| 47 gfx::Rect viewport_rect_for_tile_priority; |
| 48 gfx::Transform transform_for_tile_priority; |
| 49 }; |
| 50 |
| 51 struct SyncCompositorCommonRendererParams { |
| 52 SyncCompositorCommonRendererParams(); |
| 53 SyncCompositorCommonRendererParams( |
| 54 unsigned int version, |
| 55 const gfx::ScrollOffset& total_scroll_offset, |
| 56 const gfx::ScrollOffset& max_scroll_offset, |
| 57 const gfx::SizeF& scrollable_size, |
| 58 float page_scale_factor, |
| 59 float min_page_scale_factor, |
| 60 float max_page_scale_factor, |
| 61 bool need_animate_scroll, |
| 62 bool need_invalidate, |
| 63 bool need_begin_frame, |
| 64 bool did_activate_pending_tree); |
| 65 ~SyncCompositorCommonRendererParams(); |
| 66 |
| 67 unsigned int version; |
| 68 gfx::ScrollOffset total_scroll_offset; |
| 69 gfx::ScrollOffset max_scroll_offset; |
| 70 gfx::SizeF scrollable_size; |
| 71 float page_scale_factor; |
| 72 float min_page_scale_factor; |
| 73 float max_page_scale_factor; |
| 74 bool need_animate_scroll; |
| 75 bool need_invalidate; |
| 76 bool need_begin_frame; |
| 77 bool did_activate_pending_tree; |
| 78 }; |
| 79 |
| 80 } // namespace content |
| 81 |
| 82 #endif // CONTENT_COMMON_ANDROID_SYNC_COMPOSITOR_MESSAGES_H_ |
| 83 |
| 84 // Multiply-included message file, hence no include guard. |
| 85 |
| 86 #undef IPC_MESSAGE_EXPORT |
| 87 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
| 88 #define IPC_MESSAGE_START SyncCompositorMsgStart |
| 89 |
| 90 IPC_STRUCT_TRAITS_BEGIN(content::SyncCompositorCommonBrowserParams) |
| 91 IPC_STRUCT_TRAITS_MEMBER(bytes_limit) |
| 92 IPC_STRUCT_TRAITS_MEMBER(resources) |
| 93 IPC_STRUCT_TRAITS_MEMBER(root_scroll_offset) |
| 94 IPC_STRUCT_TRAITS_END() |
| 95 |
| 96 IPC_STRUCT_TRAITS_BEGIN(content::SyncCompositorDemandDrawHwParams) |
| 97 IPC_STRUCT_TRAITS_MEMBER(surface_size) |
| 98 IPC_STRUCT_TRAITS_MEMBER(transform) |
| 99 IPC_STRUCT_TRAITS_MEMBER(viewport) |
| 100 IPC_STRUCT_TRAITS_MEMBER(clip) |
| 101 IPC_STRUCT_TRAITS_MEMBER(viewport_rect_for_tile_priority) |
| 102 IPC_STRUCT_TRAITS_MEMBER(transform_for_tile_priority) |
| 103 IPC_STRUCT_TRAITS_END() |
| 104 |
| 105 IPC_STRUCT_TRAITS_BEGIN(content::SyncCompositorCommonRendererParams) |
| 106 IPC_STRUCT_TRAITS_MEMBER(version) |
| 107 IPC_STRUCT_TRAITS_MEMBER(total_scroll_offset) |
| 108 IPC_STRUCT_TRAITS_MEMBER(max_scroll_offset) |
| 109 IPC_STRUCT_TRAITS_MEMBER(scrollable_size) |
| 110 IPC_STRUCT_TRAITS_MEMBER(page_scale_factor) |
| 111 IPC_STRUCT_TRAITS_MEMBER(min_page_scale_factor) |
| 112 IPC_STRUCT_TRAITS_MEMBER(max_page_scale_factor) |
| 113 IPC_STRUCT_TRAITS_MEMBER(need_animate_scroll) |
| 114 IPC_STRUCT_TRAITS_MEMBER(need_invalidate) |
| 115 IPC_STRUCT_TRAITS_MEMBER(need_begin_frame) |
| 116 IPC_STRUCT_TRAITS_MEMBER(did_activate_pending_tree) |
| 117 IPC_STRUCT_TRAITS_END() |
| 118 |
| 119 IPC_SYNC_MESSAGE_ROUTED2_2(SyncCompositorMsg_HandleInputEvent, |
| 120 content::SyncCompositorCommonBrowserParams, |
| 121 IPC::WebInputEventPointer, |
| 122 content::SyncCompositorCommonRendererParams, |
| 123 content::InputEventAckState); |
| 124 |
| 125 IPC_SYNC_MESSAGE_ROUTED2_1(SyncCompositorMsg_BeginFrame, |
| 126 content::SyncCompositorCommonBrowserParams, |
| 127 cc::BeginFrameArgs, |
| 128 content::SyncCompositorCommonRendererParams); |
| 129 |
| 130 IPC_SYNC_MESSAGE_ROUTED2_1(SyncCompositorMsg_ComputeScroll, |
| 131 content::SyncCompositorCommonBrowserParams, |
| 132 base::TimeTicks, |
| 133 content::SyncCompositorCommonRendererParams); |
| 134 |
| 135 IPC_SYNC_MESSAGE_ROUTED2_2(SyncCompositorMsg_DemandDrawHw, |
| 136 content::SyncCompositorCommonBrowserParams, |
| 137 content::SyncCompositorDemandDrawHwParams, |
| 138 content::SyncCompositorCommonRendererParams, |
| 139 cc::CompositorFrame); |
| 140 |
| 141 IPC_MESSAGE_ROUTED1(SyncCompositorHostMsg_UpdateState, |
| 142 content::SyncCompositorCommonRendererParams); |
| OLD | NEW |