OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/child_frame_compositing_helper.h" | 5 #include "content/renderer/child_frame_compositing_helper.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "cc/blink/web_layer_impl.h" | 9 #include "cc/blink/web_layer_impl.h" |
10 #include "cc/layers/delegated_frame_provider.h" | 10 #include "cc/layers/delegated_frame_provider.h" |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 // This may be called on either the main or impl thread. | 286 // This may be called on either the main or impl thread. |
287 sender->Send(new BrowserPluginHostMsg_RequireSequence( | 287 sender->Send(new BrowserPluginHostMsg_RequireSequence( |
288 host_routing_id, browser_plugin_instance_id, id, sequence)); | 288 host_routing_id, browser_plugin_instance_id, id, sequence)); |
289 } | 289 } |
290 | 290 |
291 void ChildFrameCompositingHelper::OnSetSurface( | 291 void ChildFrameCompositingHelper::OnSetSurface( |
292 const cc::SurfaceId& surface_id, | 292 const cc::SurfaceId& surface_id, |
293 const gfx::Size& frame_size, | 293 const gfx::Size& frame_size, |
294 float scale_factor, | 294 float scale_factor, |
295 const cc::SurfaceSequence& sequence) { | 295 const cc::SurfaceSequence& sequence) { |
| 296 surface_id_ = surface_id; |
296 scoped_refptr<ThreadSafeSender> sender( | 297 scoped_refptr<ThreadSafeSender> sender( |
297 RenderThreadImpl::current()->thread_safe_sender()); | 298 RenderThreadImpl::current()->thread_safe_sender()); |
298 cc::SurfaceLayer::SatisfyCallback satisfy_callback = | 299 cc::SurfaceLayer::SatisfyCallback satisfy_callback = |
299 render_frame_proxy_ | 300 render_frame_proxy_ |
300 ? base::Bind(&ChildFrameCompositingHelper::SatisfyCallback, sender, | 301 ? base::Bind(&ChildFrameCompositingHelper::SatisfyCallback, sender, |
301 host_routing_id_) | 302 host_routing_id_) |
302 : base::Bind( | 303 : base::Bind( |
303 &ChildFrameCompositingHelper::SatisfyCallbackBrowserPlugin, | 304 &ChildFrameCompositingHelper::SatisfyCallbackBrowserPlugin, |
304 sender, host_routing_id_, | 305 sender, host_routing_id_, |
305 browser_plugin_->browser_plugin_instance_id()); | 306 browser_plugin_->browser_plugin_instance_id()); |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 ¶ms.ack.resources); | 357 ¶ms.ack.resources); |
357 DCHECK(!params.ack.resources.empty()); | 358 DCHECK(!params.ack.resources.empty()); |
358 | 359 |
359 params.route_id = last_route_id_; | 360 params.route_id = last_route_id_; |
360 params.output_surface_id = last_output_surface_id_; | 361 params.output_surface_id = last_output_surface_id_; |
361 params.renderer_host_id = last_host_id_; | 362 params.renderer_host_id = last_host_id_; |
362 SendReclaimCompositorResourcesToBrowser(params); | 363 SendReclaimCompositorResourcesToBrowser(params); |
363 } | 364 } |
364 | 365 |
365 } // namespace content | 366 } // namespace content |
OLD | NEW |