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 #ifndef CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_PROXY_H_ | 5 #ifndef CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_PROXY_H_ |
6 #define CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_PROXY_H_ | 6 #define CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_PROXY_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 void UpdateRootLayerState(const gfx::ScrollOffset& total_scroll_offset, | 52 void UpdateRootLayerState(const gfx::ScrollOffset& total_scroll_offset, |
53 const gfx::ScrollOffset& max_scroll_offset, | 53 const gfx::ScrollOffset& max_scroll_offset, |
54 const gfx::SizeF& scrollable_size, | 54 const gfx::SizeF& scrollable_size, |
55 float page_scale_factor, | 55 float page_scale_factor, |
56 float min_page_scale_factor, | 56 float min_page_scale_factor, |
57 float max_page_scale_factor) override; | 57 float max_page_scale_factor) override; |
58 | 58 |
59 // SynchronousCompositorFrameSinkClient overrides. | 59 // SynchronousCompositorFrameSinkClient overrides. |
60 void DidActivatePendingTree() override; | 60 void DidActivatePendingTree() override; |
61 void Invalidate() override; | 61 void Invalidate() override; |
62 void SwapBuffers(uint32_t compositor_frame_sink_id, | 62 void SubmitCompositorFrame(uint32_t compositor_frame_sink_id, |
63 cc::CompositorFrame frame) override; | 63 cc::CompositorFrame frame) override; |
64 | 64 |
65 void SetCompositorFrameSink( | 65 void SetCompositorFrameSink( |
66 SynchronousCompositorFrameSink* compositor_frame_sink); | 66 SynchronousCompositorFrameSink* compositor_frame_sink); |
67 void OnMessageReceived(const IPC::Message& message); | 67 void OnMessageReceived(const IPC::Message& message); |
68 bool Send(IPC::Message* message); | 68 bool Send(IPC::Message* message); |
69 void PopulateCommonParams(SyncCompositorCommonRendererParams* params) const; | 69 void PopulateCommonParams(SyncCompositorCommonRendererParams* params) const; |
70 | 70 |
71 private: | 71 private: |
72 struct SharedMemoryWithSize; | 72 struct SharedMemoryWithSize; |
73 | 73 |
74 // IPC handlers. | 74 // IPC handlers. |
75 void OnComputeScroll(base::TimeTicks animation_time); | 75 void OnComputeScroll(base::TimeTicks animation_time); |
76 void DemandDrawHwAsync(const SyncCompositorDemandDrawHwParams& params); | 76 void DemandDrawHwAsync(const SyncCompositorDemandDrawHwParams& params); |
77 void DemandDrawHw(const SyncCompositorDemandDrawHwParams& params, | 77 void DemandDrawHw(const SyncCompositorDemandDrawHwParams& params, |
78 IPC::Message* reply_message); | 78 IPC::Message* reply_message); |
79 void SetSharedMemory( | 79 void SetSharedMemory( |
80 const SyncCompositorSetSharedMemoryParams& params, | 80 const SyncCompositorSetSharedMemoryParams& params, |
81 bool* success, | 81 bool* success, |
82 SyncCompositorCommonRendererParams* common_renderer_params); | 82 SyncCompositorCommonRendererParams* common_renderer_params); |
83 void ZeroSharedMemory(); | 83 void ZeroSharedMemory(); |
84 void DemandDrawSw(const SyncCompositorDemandDrawSwParams& params, | 84 void DemandDrawSw(const SyncCompositorDemandDrawSwParams& params, |
85 IPC::Message* reply_message); | 85 IPC::Message* reply_message); |
86 void SynchronouslyZoomBy( | 86 void SynchronouslyZoomBy( |
87 float zoom_delta, | 87 float zoom_delta, |
88 const gfx::Point& anchor, | 88 const gfx::Point& anchor, |
89 SyncCompositorCommonRendererParams* common_renderer_params); | 89 SyncCompositorCommonRendererParams* common_renderer_params); |
90 void SetScroll(const gfx::ScrollOffset& total_scroll_offset); | 90 void SetScroll(const gfx::ScrollOffset& total_scroll_offset); |
91 | 91 |
92 void SwapBuffersHwAsync(uint32_t compositor_frame_sink_id, | 92 void SubmitCompositorFrameHwAsync(uint32_t compositor_frame_sink_id, |
93 cc::CompositorFrame frame); | 93 cc::CompositorFrame frame); |
94 void SwapBuffersHw(uint32_t compositor_frame_sink_id, | 94 void SubmitCompositorFrameHw(uint32_t compositor_frame_sink_id, |
95 cc::CompositorFrame frame); | 95 cc::CompositorFrame frame); |
96 void SendDemandDrawHwReply(cc::CompositorFrame frame, | 96 void SendDemandDrawHwReply(cc::CompositorFrame frame, |
97 uint32_t compositor_frame_sink_id, | 97 uint32_t compositor_frame_sink_id, |
98 IPC::Message* reply_message); | 98 IPC::Message* reply_message); |
99 void SendDemandDrawHwReplyAsync(cc::CompositorFrame frame, | 99 void SendDemandDrawHwReplyAsync(cc::CompositorFrame frame, |
100 uint32_t compositor_frame_sink_id); | 100 uint32_t compositor_frame_sink_id); |
101 void DoDemandDrawSw(const SyncCompositorDemandDrawSwParams& params); | 101 void DoDemandDrawSw(const SyncCompositorDemandDrawSwParams& params); |
102 void SwapBuffersSw(cc::CompositorFrame frame); | 102 void SubmitCompositorFrameSw(cc::CompositorFrame frame); |
103 void SendDemandDrawSwReply(bool success, | 103 void SendDemandDrawSwReply(bool success, |
104 cc::CompositorFrame frame, | 104 cc::CompositorFrame frame, |
105 IPC::Message* reply_message); | 105 IPC::Message* reply_message); |
106 void SendAsyncRendererStateIfNeeded(); | 106 void SendAsyncRendererStateIfNeeded(); |
107 void DoDemandDrawHw(const SyncCompositorDemandDrawHwParams& params, | 107 void DoDemandDrawHw(const SyncCompositorDemandDrawHwParams& params, |
108 IPC::Message* reply_message); | 108 IPC::Message* reply_message); |
109 | 109 |
110 const int routing_id_; | 110 const int routing_id_; |
111 IPC::Sender* const sender_; | 111 IPC::Sender* const sender_; |
112 ui::SynchronousInputHandlerProxy* const input_handler_proxy_; | 112 ui::SynchronousInputHandlerProxy* const input_handler_proxy_; |
(...skipping 18 matching lines...) Expand all Loading... |
131 bool need_animate_scroll_; | 131 bool need_animate_scroll_; |
132 uint32_t need_invalidate_count_; | 132 uint32_t need_invalidate_count_; |
133 uint32_t did_activate_pending_tree_count_; | 133 uint32_t did_activate_pending_tree_count_; |
134 | 134 |
135 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorProxy); | 135 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorProxy); |
136 }; | 136 }; |
137 | 137 |
138 } // namespace content | 138 } // namespace content |
139 | 139 |
140 #endif // CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_PROXY_H_ | 140 #endif // CONTENT_RENDERER_ANDROID_SYNCHRONOUS_COMPOSITOR_PROXY_H_ |
OLD | NEW |