diff options
6 files changed, 33 insertions, 6 deletions
diff --git a/content/browser/compositor/delegated_frame_host.cc b/content/browser/compositor/delegated_frame_host.cc index e30af30..903f7a0 100644 --- a/content/browser/compositor/delegated_frame_host.cc +++ b/content/browser/compositor/delegated_frame_host.cc @@ -299,7 +299,8 @@ void DelegatedFrameHost::SwapDelegatedFrame( uint32 output_surface_id, scoped_ptr<cc::DelegatedFrameData> frame_data, float frame_device_scale_factor, - const std::vector<ui::LatencyInfo>& latency_info) { + const std::vector<ui::LatencyInfo>& latency_info, + std::vector<uint32_t>* satisfies_sequences) { DCHECK(!frame_data->render_pass_list.empty()); cc::RenderPass* root_pass = frame_data->render_pass_list.back(); @@ -400,6 +401,7 @@ void DelegatedFrameHost::SwapDelegatedFrame( compositor_frame->metadata.latency_info.end(), latency_info.begin(), latency_info.end()); + compositor_frame->metadata.satisfies_sequences.swap(*satisfies_sequences); gfx::Size desired_size = client_->DelegatedFrameHostDesiredSizeInDIP(); if (desired_size != frame_size_in_dip && !desired_size.IsEmpty()) diff --git a/content/browser/compositor/delegated_frame_host.h b/content/browser/compositor/delegated_frame_host.h index 0d90612..bfde8f2 100644 --- a/content/browser/compositor/delegated_frame_host.h +++ b/content/browser/compositor/delegated_frame_host.h @@ -119,11 +119,14 @@ class CONTENT_EXPORT DelegatedFrameHost bool CanCopyToBitmap() const; // Public interface exposed to RenderWidgetHostView. + + // Note: |satisfies_sequences| is cleared in calls to this function. void SwapDelegatedFrame( uint32 output_surface_id, scoped_ptr<cc::DelegatedFrameData> frame_data, float frame_device_scale_factor, - const std::vector<ui::LatencyInfo>& latency_info); + const std::vector<ui::LatencyInfo>& latency_info, + std::vector<uint32_t>* satifies_sequences); void WasHidden(); void WasShown(const ui::LatencyInfo& latency_info); void WasResized(); diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc index 009ce15..ae83db3 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc @@ -1176,7 +1176,8 @@ void RenderWidgetHostViewAura::OnSwapCompositorFrame( output_surface_id, frame->delegated_frame_data.Pass(), frame->metadata.device_scale_factor, - frame->metadata.latency_info); + frame->metadata.latency_info, + &frame->metadata.satisfies_sequences); return; } diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm index 91c9fd9..b060993 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm @@ -1506,7 +1506,8 @@ void RenderWidgetHostViewMac::OnSwapCompositorFrame( output_surface_id, frame->delegated_frame_data.Pass(), frame->metadata.device_scale_factor, - frame->metadata.latency_info); + frame->metadata.latency_info, + &frame->metadata.satisfies_sequences); } else { DLOG(ERROR) << "Received unexpected frame type."; bad_message::ReceivedBadMessage(render_widget_host_->GetProcess(), diff --git a/content/renderer/child_frame_compositing_helper.cc b/content/renderer/child_frame_compositing_helper.cc index e6a3fab..adec05b 100644 --- a/content/renderer/child_frame_compositing_helper.cc +++ b/content/renderer/child_frame_compositing_helper.cc @@ -279,6 +279,16 @@ void ChildFrameCompositingHelper::SatisfyCallback( } // static +void ChildFrameCompositingHelper::SatisfyCallbackBrowserPlugin( + scoped_refptr<ThreadSafeSender> sender, + int host_routing_id, + int browser_plugin_instance_id, + cc::SurfaceSequence sequence) { + sender->Send(new BrowserPluginHostMsg_SatisfySequence( + host_routing_id, browser_plugin_instance_id, sequence)); +} + +// static void ChildFrameCompositingHelper::RequireCallback( scoped_refptr<ThreadSafeSender> sender, int host_routing_id, @@ -316,8 +326,13 @@ void ChildFrameCompositingHelper::OnSetSurface( scoped_refptr<ThreadSafeSender> sender( RenderThreadImpl::current()->thread_safe_sender()); cc::SurfaceLayer::SatisfyCallback satisfy_callback = - base::Bind(&ChildFrameCompositingHelper::SatisfyCallback, sender, - host_routing_id_); + render_frame_proxy_ + ? base::Bind(&ChildFrameCompositingHelper::SatisfyCallback, sender, + host_routing_id_) + : base::Bind( + &ChildFrameCompositingHelper::SatisfyCallbackBrowserPlugin, + sender, host_routing_id_, + browser_plugin_->browser_plugin_instance_id()); cc::SurfaceLayer::RequireCallback require_callback = render_frame_proxy_ ? base::Bind(&ChildFrameCompositingHelper::RequireCallback, sender, diff --git a/content/renderer/child_frame_compositing_helper.h b/content/renderer/child_frame_compositing_helper.h index a6fb0f03..ffd34be 100644 --- a/content/renderer/child_frame_compositing_helper.h +++ b/content/renderer/child_frame_compositing_helper.h @@ -110,6 +110,11 @@ class CONTENT_EXPORT ChildFrameCompositingHelper static void SatisfyCallback(scoped_refptr<ThreadSafeSender> sender, int host_routing_id, cc::SurfaceSequence sequence); + static void SatisfyCallbackBrowserPlugin( + scoped_refptr<ThreadSafeSender> sender, + int host_routing_id, + int browser_plugin_instance_id, + cc::SurfaceSequence sequence); static void RequireCallback(scoped_refptr<ThreadSafeSender> sender, int host_routing_id, cc::SurfaceId id, |