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 "content/renderer/android/synchronous_compositor_proxy.h" | 5 #include "content/renderer/android/synchronous_compositor_proxy.h" |
6 | 6 |
7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/memory/shared_memory.h" | 9 #include "base/memory/shared_memory.h" |
10 #include "cc/ipc/cc_param_traits.h" | 10 #include "cc/ipc/cc_param_traits.h" |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 const SyncCompositorDemandDrawHwParams& params, | 154 const SyncCompositorDemandDrawHwParams& params, |
155 IPC::Message* reply_message) { | 155 IPC::Message* reply_message) { |
156 DCHECK(!inside_receive_); | 156 DCHECK(!inside_receive_); |
157 DCHECK(reply_message); | 157 DCHECK(reply_message); |
158 | 158 |
159 inside_receive_ = true; | 159 inside_receive_ = true; |
160 | 160 |
161 if (output_surface_) { | 161 if (output_surface_) { |
162 base::AutoReset<IPC::Message*> scoped_hardware_draw_reply( | 162 base::AutoReset<IPC::Message*> scoped_hardware_draw_reply( |
163 &hardware_draw_reply_, reply_message); | 163 &hardware_draw_reply_, reply_message); |
164 output_surface_->DemandDrawHw(params.surface_size, params.transform, | 164 output_surface_->DemandDrawHw(params.viewport, |
165 params.viewport, params.clip, | |
166 params.viewport_rect_for_tile_priority, | 165 params.viewport_rect_for_tile_priority, |
167 params.transform_for_tile_priority); | 166 params.transform_for_tile_priority); |
168 } | 167 } |
169 | 168 |
170 if (inside_receive_) { | 169 if (inside_receive_) { |
171 // Did not swap. | 170 // Did not swap. |
172 SendDemandDrawHwReply(cc::CompositorFrame(), 0u, reply_message); | 171 SendDemandDrawHwReply(cc::CompositorFrame(), 0u, reply_message); |
173 inside_receive_ = false; | 172 inside_receive_ = false; |
174 } | 173 } |
175 } | 174 } |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 | 328 |
330 void SynchronousCompositorProxy::SetScroll( | 329 void SynchronousCompositorProxy::SetScroll( |
331 const gfx::ScrollOffset& new_total_scroll_offset) { | 330 const gfx::ScrollOffset& new_total_scroll_offset) { |
332 if (total_scroll_offset_ == new_total_scroll_offset) | 331 if (total_scroll_offset_ == new_total_scroll_offset) |
333 return; | 332 return; |
334 total_scroll_offset_ = new_total_scroll_offset; | 333 total_scroll_offset_ = new_total_scroll_offset; |
335 input_handler_proxy_->SynchronouslySetRootScrollOffset(total_scroll_offset_); | 334 input_handler_proxy_->SynchronouslySetRootScrollOffset(total_scroll_offset_); |
336 } | 335 } |
337 | 336 |
338 } // namespace content | 337 } // namespace content |
OLD | NEW |