| 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; | |
| 297 scoped_refptr<ThreadSafeSender> sender( | 296 scoped_refptr<ThreadSafeSender> sender( |
| 298 RenderThreadImpl::current()->thread_safe_sender()); | 297 RenderThreadImpl::current()->thread_safe_sender()); |
| 299 cc::SurfaceLayer::SatisfyCallback satisfy_callback = | 298 cc::SurfaceLayer::SatisfyCallback satisfy_callback = |
| 300 render_frame_proxy_ | 299 render_frame_proxy_ |
| 301 ? base::Bind(&ChildFrameCompositingHelper::SatisfyCallback, sender, | 300 ? base::Bind(&ChildFrameCompositingHelper::SatisfyCallback, sender, |
| 302 host_routing_id_) | 301 host_routing_id_) |
| 303 : base::Bind( | 302 : base::Bind( |
| 304 &ChildFrameCompositingHelper::SatisfyCallbackBrowserPlugin, | 303 &ChildFrameCompositingHelper::SatisfyCallbackBrowserPlugin, |
| 305 sender, host_routing_id_, | 304 sender, host_routing_id_, |
| 306 browser_plugin_->browser_plugin_instance_id()); | 305 browser_plugin_->browser_plugin_instance_id()); |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 ¶ms.ack.resources); | 356 ¶ms.ack.resources); |
| 358 DCHECK(!params.ack.resources.empty()); | 357 DCHECK(!params.ack.resources.empty()); |
| 359 | 358 |
| 360 params.route_id = last_route_id_; | 359 params.route_id = last_route_id_; |
| 361 params.output_surface_id = last_output_surface_id_; | 360 params.output_surface_id = last_output_surface_id_; |
| 362 params.renderer_host_id = last_host_id_; | 361 params.renderer_host_id = last_host_id_; |
| 363 SendReclaimCompositorResourcesToBrowser(params); | 362 SendReclaimCompositorResourcesToBrowser(params); |
| 364 } | 363 } |
| 365 | 364 |
| 366 } // namespace content | 365 } // namespace content |
| OLD | NEW |