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

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: more style fixes 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 d7b3eb7a21469f586a93d35a3dceedf72c4cd8dc..531cf1c28d5a7574f320737ca0992d35dbf6341b 100644
--- a/content/browser/android/in_process/synchronous_compositor_impl.cc
+++ b/content/browser/android/in_process/synchronous_compositor_impl.cc
@@ -127,6 +127,7 @@ scoped_ptr<cc::CompositorFrame> SynchronousCompositorImpl::DemandDrawHw(
output_surface_->DemandDrawHw(surface_size, transform, viewport, clip);
if (frame.get())
UpdateFrameMetaData(frame->metadata);
+
return frame.Pass();
}
@@ -152,6 +153,7 @@ void SynchronousCompositorImpl::UpdateFrameMetaData(
contents_->GetRenderWidgetHostView());
if (rwhv)
rwhv->SynchronousFrameMetadata(frame_metadata);
+ DeliverMessages();
}
void SynchronousCompositorImpl::SetMemoryPolicy(
@@ -231,6 +233,17 @@ InputEventAckState SynchronousCompositorImpl::HandleInputEvent(
contents_->GetRoutingID(), input_event);
}
+void SynchronousCompositorImpl::DeliverMessages() {
+ ScopedVector<IPC::Message> messages;
+ output_surface_->GetMessagesToDeliver(&messages);
+ RenderProcessHost* rph = contents_->GetRenderProcessHost();
+ for (ScopedVector<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