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

Unified Diff: content/browser/android/in_process/synchronous_compositor_impl.cc

Issue 240163005: Deliver IPC messages together with SwapCompositorFrame (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: don't use unknown to break the promise on deletion Created 6 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/android/in_process/synchronous_compositor_impl.cc
diff --git a/content/browser/android/in_process/synchronous_compositor_impl.cc b/content/browser/android/in_process/synchronous_compositor_impl.cc
index 0a0be1cd16ebf452a0c54c037c5828b6b9c3d4e5..def1a78cd2003a1e90c116a21e1d62931ca32ec5 100644
--- a/content/browser/android/in_process/synchronous_compositor_impl.cc
+++ b/content/browser/android/in_process/synchronous_compositor_impl.cc
@@ -129,6 +129,7 @@ scoped_ptr<cc::CompositorFrame> SynchronousCompositorImpl::DemandDrawHw(
surface_size, transform, viewport, clip, stencil_enabled);
if (frame.get())
UpdateFrameMetaData(frame->metadata);
+
return frame.Pass();
}
@@ -163,6 +164,7 @@ void SynchronousCompositorImpl::UpdateFrameMetaData(
contents_->GetRenderWidgetHostView());
if (rwhv)
rwhv->SynchronousFrameMetadata(frame_metadata);
+ DeliverMessages();
}
void SynchronousCompositorImpl::SetMemoryPolicy(
@@ -242,6 +244,17 @@ InputEventAckState SynchronousCompositorImpl::HandleInputEvent(
contents_->GetRoutingID(), input_event);
}
+void SynchronousCompositorImpl::DeliverMessages() {
+ std::vector<IPC::Message> messages;
+ output_surface_->GetMessagesToDeliver(&messages);
+ RenderProcessHost* rph = contents_->GetRenderProcessHost();
+ for (std::vector<IPC::Message>::const_iterator i = messages.begin();
+ i != messages.end();
+ ++i) {
+ rph->OnMessageReceived(*i);
+ }
+}
+
void SynchronousCompositorImpl::DidActivatePendingTree() {
if (compositor_client_)
compositor_client_->DidUpdateContent();

Powered by Google App Engine
This is Rietveld 408576698