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

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: disable browsertest for android for realz this time Created 6 years, 5 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 1b5ccb74ab51e59ae0aba6902dd8f951dc8a0321..bb8c5217bb29bcf91bb37f60c536550eaa1b95a9 100644
--- a/content/browser/android/in_process/synchronous_compositor_impl.cc
+++ b/content/browser/android/in_process/synchronous_compositor_impl.cc
@@ -132,6 +132,7 @@ scoped_ptr<cc::CompositorFrame> SynchronousCompositorImpl::DemandDrawHw(
output_surface_->DemandDrawHw(surface_size, transform, viewport, clip);
if (frame.get())
UpdateFrameMetaData(frame->metadata);
+
return frame.Pass();
}
@@ -157,6 +158,7 @@ void SynchronousCompositorImpl::UpdateFrameMetaData(
contents_->GetRenderWidgetHostView());
if (rwhv)
rwhv->SynchronousFrameMetadata(frame_metadata);
+ DeliverMessages();
}
void SynchronousCompositorImpl::SetMemoryPolicy(
@@ -236,6 +238,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