Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Side by Side Diff: content/renderer/android/synchronous_compositor_proxy.cc

Issue 1969263004: sync compositor: Remove begin frame source (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
11 #include "content/common/android/sync_compositor_messages.h" 11 #include "content/common/android/sync_compositor_messages.h"
12 #include "content/common/android/sync_compositor_statics.h" 12 #include "content/common/android/sync_compositor_statics.h"
13 #include "content/public/common/content_switches.h" 13 #include "content/public/common/content_switches.h"
14 #include "ipc/ipc_message.h" 14 #include "ipc/ipc_message.h"
15 #include "ipc/ipc_sender.h" 15 #include "ipc/ipc_sender.h"
16 #include "third_party/skia/include/core/SkBitmap.h" 16 #include "third_party/skia/include/core/SkBitmap.h"
17 #include "third_party/skia/include/core/SkCanvas.h" 17 #include "third_party/skia/include/core/SkCanvas.h"
18 #include "third_party/skia/include/core/SkImageInfo.h" 18 #include "third_party/skia/include/core/SkImageInfo.h"
19 #include "third_party/skia/include/core/SkRegion.h" 19 #include "third_party/skia/include/core/SkRegion.h"
20 #include "ui/events/latency_info.h" 20 #include "ui/events/latency_info.h"
21 #include "ui/gfx/skia_util.h" 21 #include "ui/gfx/skia_util.h"
22 22
23 namespace content { 23 namespace content {
24 24
25 SynchronousCompositorProxy::SynchronousCompositorProxy( 25 SynchronousCompositorProxy::SynchronousCompositorProxy(
26 int routing_id, 26 int routing_id,
27 IPC::Sender* sender, 27 IPC::Sender* sender,
28 SynchronousCompositorExternalBeginFrameSource* begin_frame_source,
29 ui::SynchronousInputHandlerProxy* input_handler_proxy, 28 ui::SynchronousInputHandlerProxy* input_handler_proxy,
30 InputHandlerManagerClient::Handler* handler) 29 InputHandlerManagerClient::Handler* handler)
31 : routing_id_(routing_id), 30 : routing_id_(routing_id),
32 sender_(sender), 31 sender_(sender),
33 begin_frame_source_(begin_frame_source),
34 input_handler_proxy_(input_handler_proxy), 32 input_handler_proxy_(input_handler_proxy),
35 input_handler_(handler), 33 input_handler_(handler),
36 use_in_process_zero_copy_software_draw_( 34 use_in_process_zero_copy_software_draw_(
37 base::CommandLine::ForCurrentProcess()->HasSwitch( 35 base::CommandLine::ForCurrentProcess()->HasSwitch(
38 switches::kSingleProcess)), 36 switches::kSingleProcess)),
39 output_surface_(nullptr), 37 output_surface_(nullptr),
40 inside_receive_(false), 38 inside_receive_(false),
41 hardware_draw_reply_(nullptr), 39 hardware_draw_reply_(nullptr),
42 software_draw_reply_(nullptr), 40 software_draw_reply_(nullptr),
43 version_(0u), 41 version_(0u),
44 page_scale_factor_(0.f), 42 page_scale_factor_(0.f),
45 min_page_scale_factor_(0.f), 43 min_page_scale_factor_(0.f),
46 max_page_scale_factor_(0.f), 44 max_page_scale_factor_(0.f),
47 need_animate_scroll_(false), 45 need_animate_scroll_(false),
48 need_invalidate_count_(0u), 46 need_invalidate_count_(0u),
49 need_begin_frame_(false),
50 did_activate_pending_tree_count_(0u) { 47 did_activate_pending_tree_count_(0u) {
51 DCHECK(begin_frame_source_);
52 DCHECK(input_handler_proxy_); 48 DCHECK(input_handler_proxy_);
53 DCHECK(input_handler_); 49 DCHECK(input_handler_);
54 begin_frame_source_->SetClient(this);
55 input_handler_proxy_->SetOnlySynchronouslyAnimateRootFlings(this); 50 input_handler_proxy_->SetOnlySynchronouslyAnimateRootFlings(this);
56 } 51 }
57 52
58 SynchronousCompositorProxy::~SynchronousCompositorProxy() { 53 SynchronousCompositorProxy::~SynchronousCompositorProxy() {
59 SetOutputSurface(nullptr); 54 SetOutputSurface(nullptr);
60 begin_frame_source_->SetClient(nullptr);
61 input_handler_proxy_->SetOnlySynchronouslyAnimateRootFlings(nullptr); 55 input_handler_proxy_->SetOnlySynchronouslyAnimateRootFlings(nullptr);
62 } 56 }
63 57
64 void SynchronousCompositorProxy::SetOutputSurface( 58 void SynchronousCompositorProxy::SetOutputSurface(
65 SynchronousCompositorOutputSurface* output_surface) { 59 SynchronousCompositorOutputSurface* output_surface) {
66 DCHECK_NE(output_surface_, output_surface); 60 DCHECK_NE(output_surface_, output_surface);
67 if (output_surface_) { 61 if (output_surface_) {
68 output_surface_->SetSyncClient(nullptr); 62 output_surface_->SetSyncClient(nullptr);
69 } 63 }
70 output_surface_ = output_surface; 64 output_surface_ = output_surface;
(...skipping 24 matching lines...) Expand all
95 max_scroll_offset_ = max_scroll_offset; 89 max_scroll_offset_ = max_scroll_offset;
96 scrollable_size_ = scrollable_size; 90 scrollable_size_ = scrollable_size;
97 page_scale_factor_ = page_scale_factor; 91 page_scale_factor_ = page_scale_factor;
98 min_page_scale_factor_ = min_page_scale_factor; 92 min_page_scale_factor_ = min_page_scale_factor;
99 max_page_scale_factor_ = max_page_scale_factor; 93 max_page_scale_factor_ = max_page_scale_factor;
100 94
101 SendAsyncRendererStateIfNeeded(); 95 SendAsyncRendererStateIfNeeded();
102 } 96 }
103 } 97 }
104 98
105 void SynchronousCompositorProxy::OnNeedsBeginFramesChange(
106 bool needs_begin_frames) {
107 if (need_begin_frame_ == needs_begin_frames)
108 return;
109 need_begin_frame_ = needs_begin_frames;
110 SendAsyncRendererStateIfNeeded();
111 }
112
113 void SynchronousCompositorProxy::Invalidate() { 99 void SynchronousCompositorProxy::Invalidate() {
114 ++need_invalidate_count_; 100 ++need_invalidate_count_;
115 SendAsyncRendererStateIfNeeded(); 101 SendAsyncRendererStateIfNeeded();
116 } 102 }
117 103
118 void SynchronousCompositorProxy::DidActivatePendingTree() { 104 void SynchronousCompositorProxy::DidActivatePendingTree() {
119 ++did_activate_pending_tree_count_; 105 ++did_activate_pending_tree_count_;
120 SendAsyncRendererStateIfNeeded(); 106 SendAsyncRendererStateIfNeeded();
121 } 107 }
122 108
123 void SynchronousCompositorProxy::SendAsyncRendererStateIfNeeded() { 109 void SynchronousCompositorProxy::SendAsyncRendererStateIfNeeded() {
124 if (inside_receive_) 110 if (inside_receive_)
125 return; 111 return;
126 SyncCompositorCommonRendererParams params; 112 SyncCompositorCommonRendererParams params;
127 PopulateCommonParams(&params); 113 PopulateCommonParams(&params);
128 Send(new SyncCompositorHostMsg_UpdateState(routing_id_, params)); 114 Send(new SyncCompositorHostMsg_UpdateState(routing_id_, params));
129 } 115 }
130 116
131 void SynchronousCompositorProxy::PopulateCommonParams( 117 void SynchronousCompositorProxy::PopulateCommonParams(
132 SyncCompositorCommonRendererParams* params) const { 118 SyncCompositorCommonRendererParams* params) const {
133 params->version = ++version_; 119 params->version = ++version_;
134 params->total_scroll_offset = total_scroll_offset_; 120 params->total_scroll_offset = total_scroll_offset_;
135 params->max_scroll_offset = max_scroll_offset_; 121 params->max_scroll_offset = max_scroll_offset_;
136 params->scrollable_size = scrollable_size_; 122 params->scrollable_size = scrollable_size_;
137 params->page_scale_factor = page_scale_factor_; 123 params->page_scale_factor = page_scale_factor_;
138 params->min_page_scale_factor = min_page_scale_factor_; 124 params->min_page_scale_factor = min_page_scale_factor_;
139 params->max_page_scale_factor = max_page_scale_factor_; 125 params->max_page_scale_factor = max_page_scale_factor_;
140 params->need_animate_scroll = need_animate_scroll_; 126 params->need_animate_scroll = need_animate_scroll_;
141 params->need_invalidate_count = need_invalidate_count_; 127 params->need_invalidate_count = need_invalidate_count_;
142 params->need_begin_frame = need_begin_frame_;
143 params->did_activate_pending_tree_count = did_activate_pending_tree_count_; 128 params->did_activate_pending_tree_count = did_activate_pending_tree_count_;
144 } 129 }
145 130
146 void SynchronousCompositorProxy::OnMessageReceived( 131 void SynchronousCompositorProxy::OnMessageReceived(
147 const IPC::Message& message) { 132 const IPC::Message& message) {
148 if (output_surface_ && output_surface_->OnMessageReceived(message)) 133 if (output_surface_ && output_surface_->OnMessageReceived(message))
149 return; 134 return;
150 135
151 IPC_BEGIN_MESSAGE_MAP(SynchronousCompositorProxy, message) 136 IPC_BEGIN_MESSAGE_MAP(SynchronousCompositorProxy, message)
137 IPC_MESSAGE_HANDLER(SyncCompositorMsg_SynchronizeRendererState,
138 PopulateCommonParams)
152 IPC_MESSAGE_HANDLER(SyncCompositorMsg_HandleInputEvent, HandleInputEvent) 139 IPC_MESSAGE_HANDLER(SyncCompositorMsg_HandleInputEvent, HandleInputEvent)
153 IPC_MESSAGE_HANDLER(SyncCompositorMsg_BeginFrame, BeginFrame)
154 IPC_MESSAGE_HANDLER(SyncCompositorMsg_ComputeScroll, OnComputeScroll) 140 IPC_MESSAGE_HANDLER(SyncCompositorMsg_ComputeScroll, OnComputeScroll)
155 IPC_MESSAGE_HANDLER_DELAY_REPLY(SyncCompositorMsg_DemandDrawHw, 141 IPC_MESSAGE_HANDLER_DELAY_REPLY(SyncCompositorMsg_DemandDrawHw,
156 DemandDrawHw) 142 DemandDrawHw)
157 IPC_MESSAGE_HANDLER(SyncCompositorMsg_SetSharedMemory, SetSharedMemory) 143 IPC_MESSAGE_HANDLER(SyncCompositorMsg_SetSharedMemory, SetSharedMemory)
158 IPC_MESSAGE_HANDLER(SyncCompositorMsg_ZeroSharedMemory, ZeroSharedMemory) 144 IPC_MESSAGE_HANDLER(SyncCompositorMsg_ZeroSharedMemory, ZeroSharedMemory)
159 IPC_MESSAGE_HANDLER_DELAY_REPLY(SyncCompositorMsg_DemandDrawSw, 145 IPC_MESSAGE_HANDLER_DELAY_REPLY(SyncCompositorMsg_DemandDrawSw,
160 DemandDrawSw) 146 DemandDrawSw)
161 IPC_MESSAGE_HANDLER(SyncCompositorMsg_UpdateState, ProcessCommonParams)
162 IPC_MESSAGE_HANDLER(SyncCompositorMsg_ZoomBy, SynchronouslyZoomBy) 147 IPC_MESSAGE_HANDLER(SyncCompositorMsg_ZoomBy, SynchronouslyZoomBy)
163 IPC_MESSAGE_HANDLER(SyncCompositorMsg_SetScroll, SetScroll) 148 IPC_MESSAGE_HANDLER(SyncCompositorMsg_SetScroll, SetScroll)
164 IPC_END_MESSAGE_MAP() 149 IPC_END_MESSAGE_MAP()
165 } 150 }
166 151
167 bool SynchronousCompositorProxy::Send(IPC::Message* message) { 152 bool SynchronousCompositorProxy::Send(IPC::Message* message) {
168 return sender_->Send(message); 153 return sender_->Send(message);
169 } 154 }
170 155
171 void SynchronousCompositorProxy::HandleInputEvent( 156 void SynchronousCompositorProxy::HandleInputEvent(
172 const SyncCompositorCommonBrowserParams& common_params,
173 const blink::WebInputEvent* event, 157 const blink::WebInputEvent* event,
174 SyncCompositorCommonRendererParams* common_renderer_params, 158 SyncCompositorCommonRendererParams* common_renderer_params,
175 InputEventAckState* ack) { 159 InputEventAckState* ack) {
176 DCHECK(!inside_receive_); 160 DCHECK(!inside_receive_);
177 base::AutoReset<bool> scoped_inside_receive(&inside_receive_, true); 161 base::AutoReset<bool> scoped_inside_receive(&inside_receive_, true);
178 162
179 ProcessCommonParams(common_params);
180 DCHECK(!input_handler_->is_null()); 163 DCHECK(!input_handler_->is_null());
181 ui::LatencyInfo latency; 164 ui::LatencyInfo latency;
182 *ack = input_handler_->Run(routing_id_, event, &latency); 165 *ack = input_handler_->Run(routing_id_, event, &latency);
183 PopulateCommonParams(common_renderer_params); 166 PopulateCommonParams(common_renderer_params);
184 } 167 }
185 168
186 void SynchronousCompositorProxy::BeginFrame(
187 const SyncCompositorCommonBrowserParams& common_params,
188 const cc::BeginFrameArgs& args,
189 SyncCompositorCommonRendererParams* common_renderer_params) {
190 DCHECK(!inside_receive_);
191 base::AutoReset<bool> scoped_inside_receive(&inside_receive_, true);
192
193 ProcessCommonParams(common_params);
194 if (need_begin_frame_) {
195 begin_frame_source_->BeginFrame(args);
196 }
197 PopulateCommonParams(common_renderer_params);
198 }
199
200 void SynchronousCompositorProxy::DemandDrawHw( 169 void SynchronousCompositorProxy::DemandDrawHw(
201 const SyncCompositorCommonBrowserParams& common_params,
202 const SyncCompositorDemandDrawHwParams& params, 170 const SyncCompositorDemandDrawHwParams& params,
203 IPC::Message* reply_message) { 171 IPC::Message* reply_message) {
204 DCHECK(!inside_receive_); 172 DCHECK(!inside_receive_);
205 DCHECK(reply_message); 173 DCHECK(reply_message);
206 174
207 inside_receive_ = true; 175 inside_receive_ = true;
208 ProcessCommonParams(common_params);
209 176
210 if (output_surface_) { 177 if (output_surface_) {
211 base::AutoReset<IPC::Message*> scoped_hardware_draw_reply( 178 base::AutoReset<IPC::Message*> scoped_hardware_draw_reply(
212 &hardware_draw_reply_, reply_message); 179 &hardware_draw_reply_, reply_message);
213 output_surface_->DemandDrawHw(params.surface_size, params.transform, 180 output_surface_->DemandDrawHw(params.surface_size, params.transform,
214 params.viewport, params.clip, 181 params.viewport, params.clip,
215 params.viewport_rect_for_tile_priority, 182 params.viewport_rect_for_tile_priority,
216 params.transform_for_tile_priority); 183 params.transform_for_tile_priority);
217 } 184 }
218 185
(...skipping 28 matching lines...) Expand all
247 struct SynchronousCompositorProxy::SharedMemoryWithSize { 214 struct SynchronousCompositorProxy::SharedMemoryWithSize {
248 base::SharedMemory shm; 215 base::SharedMemory shm;
249 const size_t buffer_size; 216 const size_t buffer_size;
250 bool zeroed; 217 bool zeroed;
251 218
252 SharedMemoryWithSize(base::SharedMemoryHandle shm_handle, size_t buffer_size) 219 SharedMemoryWithSize(base::SharedMemoryHandle shm_handle, size_t buffer_size)
253 : shm(shm_handle, false), buffer_size(buffer_size), zeroed(true) {} 220 : shm(shm_handle, false), buffer_size(buffer_size), zeroed(true) {}
254 }; 221 };
255 222
256 void SynchronousCompositorProxy::SetSharedMemory( 223 void SynchronousCompositorProxy::SetSharedMemory(
257 const SyncCompositorCommonBrowserParams& common_params,
258 const SyncCompositorSetSharedMemoryParams& params, 224 const SyncCompositorSetSharedMemoryParams& params,
259 bool* success, 225 bool* success,
260 SyncCompositorCommonRendererParams* common_renderer_params) { 226 SyncCompositorCommonRendererParams* common_renderer_params) {
261 DCHECK(!inside_receive_); 227 DCHECK(!inside_receive_);
262 base::AutoReset<bool> scoped_inside_receive(&inside_receive_, true); 228 base::AutoReset<bool> scoped_inside_receive(&inside_receive_, true);
263 229
264 *success = false; 230 *success = false;
265 ProcessCommonParams(common_params);
266 if (!base::SharedMemory::IsHandleValid(params.shm_handle)) 231 if (!base::SharedMemory::IsHandleValid(params.shm_handle))
267 return; 232 return;
268 233
269 software_draw_shm_.reset( 234 software_draw_shm_.reset(
270 new SharedMemoryWithSize(params.shm_handle, params.buffer_size)); 235 new SharedMemoryWithSize(params.shm_handle, params.buffer_size));
271 if (!software_draw_shm_->shm.Map(params.buffer_size)) 236 if (!software_draw_shm_->shm.Map(params.buffer_size))
272 return; 237 return;
273 DCHECK(software_draw_shm_->shm.memory()); 238 DCHECK(software_draw_shm_->shm.memory());
274 PopulateCommonParams(common_renderer_params); 239 PopulateCommonParams(common_renderer_params);
275 *success = true; 240 *success = true;
276 } 241 }
277 242
278 void SynchronousCompositorProxy::ZeroSharedMemory() { 243 void SynchronousCompositorProxy::ZeroSharedMemory() {
279 DCHECK(!software_draw_shm_->zeroed); 244 // It is possible to get this called twice, eg if draw is called before
no sievers 2016/06/03 20:35:50 nits: 'for this to get called' s/'eg'/'eg.' duplc
boliu 2016/06/03 21:01:06 Done.
245 // the OutputSurface is ready. Just ignore duplciated calls rather than
246 // inventing a complicated system to avoid it.
247 if (software_draw_shm_->zeroed)
248 return;
249
280 memset(software_draw_shm_->shm.memory(), 0, software_draw_shm_->buffer_size); 250 memset(software_draw_shm_->shm.memory(), 0, software_draw_shm_->buffer_size);
281 software_draw_shm_->zeroed = true; 251 software_draw_shm_->zeroed = true;
282 } 252 }
283 253
284 void SynchronousCompositorProxy::DemandDrawSw( 254 void SynchronousCompositorProxy::DemandDrawSw(
285 const SyncCompositorCommonBrowserParams& common_params,
286 const SyncCompositorDemandDrawSwParams& params, 255 const SyncCompositorDemandDrawSwParams& params,
287 IPC::Message* reply_message) { 256 IPC::Message* reply_message) {
288 DCHECK(!inside_receive_); 257 DCHECK(!inside_receive_);
289 inside_receive_ = true; 258 inside_receive_ = true;
290 ProcessCommonParams(common_params);
291 if (output_surface_) { 259 if (output_surface_) {
292 base::AutoReset<IPC::Message*> scoped_software_draw_reply( 260 base::AutoReset<IPC::Message*> scoped_software_draw_reply(
293 &software_draw_reply_, reply_message); 261 &software_draw_reply_, reply_message);
294 SkCanvas* sk_canvas_for_draw = SynchronousCompositorGetSkCanvas(); 262 SkCanvas* sk_canvas_for_draw = SynchronousCompositorGetSkCanvas();
295 if (use_in_process_zero_copy_software_draw_) { 263 if (use_in_process_zero_copy_software_draw_) {
296 DCHECK(sk_canvas_for_draw); 264 DCHECK(sk_canvas_for_draw);
297 output_surface_->DemandDrawSw(sk_canvas_for_draw); 265 output_surface_->DemandDrawSw(sk_canvas_for_draw);
298 } else { 266 } else {
299 DCHECK(!sk_canvas_for_draw); 267 DCHECK(!sk_canvas_for_draw);
300 DoDemandDrawSw(params); 268 DoDemandDrawSw(params);
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 DCHECK(hardware_draw_reply_ || software_draw_reply_); 322 DCHECK(hardware_draw_reply_ || software_draw_reply_);
355 DCHECK(!(hardware_draw_reply_ && software_draw_reply_)); 323 DCHECK(!(hardware_draw_reply_ && software_draw_reply_));
356 if (hardware_draw_reply_) { 324 if (hardware_draw_reply_) {
357 SwapBuffersHw(output_surface_id, frame); 325 SwapBuffersHw(output_surface_id, frame);
358 } else if (software_draw_reply_) { 326 } else if (software_draw_reply_) {
359 SwapBuffersSw(frame); 327 SwapBuffersSw(frame);
360 } 328 }
361 } 329 }
362 330
363 void SynchronousCompositorProxy::OnComputeScroll( 331 void SynchronousCompositorProxy::OnComputeScroll(
364 const SyncCompositorCommonBrowserParams& common_params,
365 base::TimeTicks animation_time) { 332 base::TimeTicks animation_time) {
366 ProcessCommonParams(common_params);
367 if (need_animate_scroll_) { 333 if (need_animate_scroll_) {
368 need_animate_scroll_ = false; 334 need_animate_scroll_ = false;
369 input_handler_proxy_->SynchronouslyAnimate(animation_time); 335 input_handler_proxy_->SynchronouslyAnimate(animation_time);
370 } 336 }
371 } 337 }
372 338
373 void SynchronousCompositorProxy::SynchronouslyZoomBy( 339 void SynchronousCompositorProxy::SynchronouslyZoomBy(
374 const SyncCompositorCommonBrowserParams& common_params,
375 float zoom_delta, 340 float zoom_delta,
376 const gfx::Point& anchor, 341 const gfx::Point& anchor,
377 SyncCompositorCommonRendererParams* common_renderer_params) { 342 SyncCompositorCommonRendererParams* common_renderer_params) {
378 DCHECK(!inside_receive_); 343 DCHECK(!inside_receive_);
379 base::AutoReset<bool> scoped_inside_receive(&inside_receive_, true); 344 base::AutoReset<bool> scoped_inside_receive(&inside_receive_, true);
380 ProcessCommonParams(common_params);
381 input_handler_proxy_->SynchronouslyZoomBy(zoom_delta, anchor); 345 input_handler_proxy_->SynchronouslyZoomBy(zoom_delta, anchor);
382 PopulateCommonParams(common_renderer_params); 346 PopulateCommonParams(common_renderer_params);
383 } 347 }
384 348
385 void SynchronousCompositorProxy::SetScroll( 349 void SynchronousCompositorProxy::SetScroll(
386 const gfx::ScrollOffset& new_total_scroll_offset) { 350 const gfx::ScrollOffset& new_total_scroll_offset) {
387 if (total_scroll_offset_ == new_total_scroll_offset) 351 if (total_scroll_offset_ == new_total_scroll_offset)
388 return; 352 return;
389 total_scroll_offset_ = new_total_scroll_offset; 353 total_scroll_offset_ = new_total_scroll_offset;
390 input_handler_proxy_->SynchronouslySetRootScrollOffset(total_scroll_offset_); 354 input_handler_proxy_->SynchronouslySetRootScrollOffset(total_scroll_offset_);
391 } 355 }
392 356
393 void SynchronousCompositorProxy::DidOverscroll( 357 void SynchronousCompositorProxy::DidOverscroll(
394 const DidOverscrollParams& did_overscroll_params) { 358 const DidOverscrollParams& did_overscroll_params) {
395 SyncCompositorCommonRendererParams params; 359 SyncCompositorCommonRendererParams params;
396 PopulateCommonParams(&params); 360 PopulateCommonParams(&params);
397 Send(new SyncCompositorHostMsg_OverScroll(routing_id_, params, 361 Send(new SyncCompositorHostMsg_OverScroll(routing_id_, params,
398 did_overscroll_params)); 362 did_overscroll_params));
399 } 363 }
400 364
401 void SynchronousCompositorProxy::ProcessCommonParams(
402 const SyncCompositorCommonBrowserParams& common_params) {
403 begin_frame_source_->SetBeginFrameSourcePaused(
404 common_params.begin_frame_source_paused);
405 }
406
407 } // namespace content 365 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698