| 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 "cc/output/begin_frame_args.h" | 6 #include "cc/output/begin_frame_args.h" |
| 6 #include "cc/output/compositor_frame.h" | 7 #include "cc/output/compositor_frame.h" |
| 7 #include "cc/output/compositor_frame_ack.h" | 8 #include "cc/output/compositor_frame_ack.h" |
| 8 #include "content/common/content_export.h" | 9 #include "content/common/content_export.h" |
| 9 #include "content/common/content_param_traits.h" | 10 #include "content/common/content_param_traits.h" |
| 10 #include "content/common/input/did_overscroll_params.h" | 11 #include "content/common/input/did_overscroll_params.h" |
| 11 #include "content/common/input/input_event_ack_state.h" | 12 #include "content/common/input/input_event_ack_state.h" |
| 12 #include "ipc/ipc_message_macros.h" | 13 #include "ipc/ipc_message_macros.h" |
| 13 #include "third_party/WebKit/public/web/WebInputEvent.h" | 14 #include "third_party/WebKit/public/web/WebInputEvent.h" |
| 14 #include "ui/gfx/geometry/scroll_offset.h" | 15 #include "ui/gfx/geometry/scroll_offset.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 39 ~SyncCompositorDemandDrawHwParams(); | 40 ~SyncCompositorDemandDrawHwParams(); |
| 40 | 41 |
| 41 gfx::Size surface_size; | 42 gfx::Size surface_size; |
| 42 gfx::Transform transform; | 43 gfx::Transform transform; |
| 43 gfx::Rect viewport; | 44 gfx::Rect viewport; |
| 44 gfx::Rect clip; | 45 gfx::Rect clip; |
| 45 gfx::Rect viewport_rect_for_tile_priority; | 46 gfx::Rect viewport_rect_for_tile_priority; |
| 46 gfx::Transform transform_for_tile_priority; | 47 gfx::Transform transform_for_tile_priority; |
| 47 }; | 48 }; |
| 48 | 49 |
| 50 struct SyncCompositorDemandDrawSwParams { |
| 51 SyncCompositorDemandDrawSwParams(); |
| 52 ~SyncCompositorDemandDrawSwParams(); |
| 53 |
| 54 gfx::Size size; |
| 55 gfx::Rect clip; |
| 56 gfx::Transform transform; |
| 57 base::SharedMemoryHandle shm_handle; |
| 58 }; |
| 59 |
| 49 struct SyncCompositorCommonRendererParams { | 60 struct SyncCompositorCommonRendererParams { |
| 50 SyncCompositorCommonRendererParams(); | 61 SyncCompositorCommonRendererParams(); |
| 51 ~SyncCompositorCommonRendererParams(); | 62 ~SyncCompositorCommonRendererParams(); |
| 52 | 63 |
| 53 unsigned int version; | 64 unsigned int version; |
| 54 gfx::ScrollOffset total_scroll_offset; | 65 gfx::ScrollOffset total_scroll_offset; |
| 55 gfx::ScrollOffset max_scroll_offset; | 66 gfx::ScrollOffset max_scroll_offset; |
| 56 gfx::SizeF scrollable_size; | 67 gfx::SizeF scrollable_size; |
| 57 float page_scale_factor; | 68 float page_scale_factor; |
| 58 float min_page_scale_factor; | 69 float min_page_scale_factor; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 81 | 92 |
| 82 IPC_STRUCT_TRAITS_BEGIN(content::SyncCompositorDemandDrawHwParams) | 93 IPC_STRUCT_TRAITS_BEGIN(content::SyncCompositorDemandDrawHwParams) |
| 83 IPC_STRUCT_TRAITS_MEMBER(surface_size) | 94 IPC_STRUCT_TRAITS_MEMBER(surface_size) |
| 84 IPC_STRUCT_TRAITS_MEMBER(transform) | 95 IPC_STRUCT_TRAITS_MEMBER(transform) |
| 85 IPC_STRUCT_TRAITS_MEMBER(viewport) | 96 IPC_STRUCT_TRAITS_MEMBER(viewport) |
| 86 IPC_STRUCT_TRAITS_MEMBER(clip) | 97 IPC_STRUCT_TRAITS_MEMBER(clip) |
| 87 IPC_STRUCT_TRAITS_MEMBER(viewport_rect_for_tile_priority) | 98 IPC_STRUCT_TRAITS_MEMBER(viewport_rect_for_tile_priority) |
| 88 IPC_STRUCT_TRAITS_MEMBER(transform_for_tile_priority) | 99 IPC_STRUCT_TRAITS_MEMBER(transform_for_tile_priority) |
| 89 IPC_STRUCT_TRAITS_END() | 100 IPC_STRUCT_TRAITS_END() |
| 90 | 101 |
| 102 IPC_STRUCT_TRAITS_BEGIN(content::SyncCompositorDemandDrawSwParams) |
| 103 IPC_STRUCT_TRAITS_MEMBER(size) |
| 104 IPC_STRUCT_TRAITS_MEMBER(clip) |
| 105 IPC_STRUCT_TRAITS_MEMBER(transform) |
| 106 IPC_STRUCT_TRAITS_MEMBER(shm_handle) |
| 107 IPC_STRUCT_TRAITS_END() |
| 108 |
| 91 IPC_STRUCT_TRAITS_BEGIN(content::SyncCompositorCommonRendererParams) | 109 IPC_STRUCT_TRAITS_BEGIN(content::SyncCompositorCommonRendererParams) |
| 92 IPC_STRUCT_TRAITS_MEMBER(version) | 110 IPC_STRUCT_TRAITS_MEMBER(version) |
| 93 IPC_STRUCT_TRAITS_MEMBER(total_scroll_offset) | 111 IPC_STRUCT_TRAITS_MEMBER(total_scroll_offset) |
| 94 IPC_STRUCT_TRAITS_MEMBER(max_scroll_offset) | 112 IPC_STRUCT_TRAITS_MEMBER(max_scroll_offset) |
| 95 IPC_STRUCT_TRAITS_MEMBER(scrollable_size) | 113 IPC_STRUCT_TRAITS_MEMBER(scrollable_size) |
| 96 IPC_STRUCT_TRAITS_MEMBER(page_scale_factor) | 114 IPC_STRUCT_TRAITS_MEMBER(page_scale_factor) |
| 97 IPC_STRUCT_TRAITS_MEMBER(min_page_scale_factor) | 115 IPC_STRUCT_TRAITS_MEMBER(min_page_scale_factor) |
| 98 IPC_STRUCT_TRAITS_MEMBER(max_page_scale_factor) | 116 IPC_STRUCT_TRAITS_MEMBER(max_page_scale_factor) |
| 99 IPC_STRUCT_TRAITS_MEMBER(need_animate_scroll) | 117 IPC_STRUCT_TRAITS_MEMBER(need_animate_scroll) |
| 100 IPC_STRUCT_TRAITS_MEMBER(need_invalidate) | 118 IPC_STRUCT_TRAITS_MEMBER(need_invalidate) |
| 101 IPC_STRUCT_TRAITS_MEMBER(need_begin_frame) | 119 IPC_STRUCT_TRAITS_MEMBER(need_begin_frame) |
| 102 IPC_STRUCT_TRAITS_MEMBER(did_activate_pending_tree) | 120 IPC_STRUCT_TRAITS_MEMBER(did_activate_pending_tree) |
| 103 IPC_STRUCT_TRAITS_END() | 121 IPC_STRUCT_TRAITS_END() |
| 104 | 122 |
| 123 // Messages sent from the browser to the renderer. |
| 124 |
| 105 IPC_SYNC_MESSAGE_ROUTED2_2(SyncCompositorMsg_HandleInputEvent, | 125 IPC_SYNC_MESSAGE_ROUTED2_2(SyncCompositorMsg_HandleInputEvent, |
| 106 content::SyncCompositorCommonBrowserParams, | 126 content::SyncCompositorCommonBrowserParams, |
| 107 IPC::WebInputEventPointer, | 127 IPC::WebInputEventPointer, |
| 108 content::SyncCompositorCommonRendererParams, | 128 content::SyncCompositorCommonRendererParams, |
| 109 content::InputEventAckState) | 129 content::InputEventAckState) |
| 110 | 130 |
| 111 IPC_SYNC_MESSAGE_ROUTED2_1(SyncCompositorMsg_BeginFrame, | 131 IPC_SYNC_MESSAGE_ROUTED2_1(SyncCompositorMsg_BeginFrame, |
| 112 content::SyncCompositorCommonBrowserParams, | 132 content::SyncCompositorCommonBrowserParams, |
| 113 cc::BeginFrameArgs, | 133 cc::BeginFrameArgs, |
| 114 content::SyncCompositorCommonRendererParams) | 134 content::SyncCompositorCommonRendererParams) |
| 115 | 135 |
| 116 IPC_SYNC_MESSAGE_ROUTED2_1(SyncCompositorMsg_ComputeScroll, | 136 IPC_SYNC_MESSAGE_ROUTED2_1(SyncCompositorMsg_ComputeScroll, |
| 117 content::SyncCompositorCommonBrowserParams, | 137 content::SyncCompositorCommonBrowserParams, |
| 118 base::TimeTicks, | 138 base::TimeTicks, |
| 119 content::SyncCompositorCommonRendererParams) | 139 content::SyncCompositorCommonRendererParams) |
| 120 | 140 |
| 121 IPC_SYNC_MESSAGE_ROUTED2_2(SyncCompositorMsg_DemandDrawHw, | 141 IPC_SYNC_MESSAGE_ROUTED2_2(SyncCompositorMsg_DemandDrawHw, |
| 122 content::SyncCompositorCommonBrowserParams, | 142 content::SyncCompositorCommonBrowserParams, |
| 123 content::SyncCompositorDemandDrawHwParams, | 143 content::SyncCompositorDemandDrawHwParams, |
| 124 content::SyncCompositorCommonRendererParams, | 144 content::SyncCompositorCommonRendererParams, |
| 125 cc::CompositorFrame) | 145 cc::CompositorFrame) |
| 126 | 146 |
| 147 IPC_SYNC_MESSAGE_ROUTED2_3(SyncCompositorMsg_DemandDrawSw, |
| 148 content::SyncCompositorCommonBrowserParams, |
| 149 content::SyncCompositorDemandDrawSwParams, |
| 150 bool /* result */, |
| 151 content::SyncCompositorCommonRendererParams, |
| 152 cc::CompositorFrame) |
| 153 |
| 127 IPC_MESSAGE_ROUTED1(SyncCompositorMsg_UpdateState, | 154 IPC_MESSAGE_ROUTED1(SyncCompositorMsg_UpdateState, |
| 128 content::SyncCompositorCommonBrowserParams) | 155 content::SyncCompositorCommonBrowserParams) |
| 129 | 156 |
| 157 // ----------------------------------------------------------------------------- |
| 158 // Messages sent from the renderer to the browser. |
| 159 |
| 130 IPC_MESSAGE_ROUTED1(SyncCompositorHostMsg_UpdateState, | 160 IPC_MESSAGE_ROUTED1(SyncCompositorHostMsg_UpdateState, |
| 131 content::SyncCompositorCommonRendererParams) | 161 content::SyncCompositorCommonRendererParams) |
| 132 | 162 |
| 133 IPC_MESSAGE_ROUTED2(SyncCompositorHostMsg_OverScroll, | 163 IPC_MESSAGE_ROUTED2(SyncCompositorHostMsg_OverScroll, |
| 134 content::SyncCompositorCommonRendererParams, | 164 content::SyncCompositorCommonRendererParams, |
| 135 content::DidOverscrollParams) | 165 content::DidOverscrollParams) |
| OLD | NEW |