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

Unified Diff: content/renderer/android/synchronous_compositor_proxy.cc

Issue 1976803003: sync compositor: Move DeliverMessages to OutputSurface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: unregister activation callback Created 4 years, 7 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/renderer/android/synchronous_compositor_proxy.cc
diff --git a/content/renderer/android/synchronous_compositor_proxy.cc b/content/renderer/android/synchronous_compositor_proxy.cc
index 975d9472d31a6c4b5f118d0e4908c2828895f817..10fcf90a4ea1d01a7caf6642faccbd1c27df0c0f 100644
--- a/content/renderer/android/synchronous_compositor_proxy.cc
+++ b/content/renderer/android/synchronous_compositor_proxy.cc
@@ -66,14 +66,10 @@ void SynchronousCompositorProxy::SetOutputSurface(
DCHECK_NE(output_surface_, output_surface);
if (output_surface_) {
output_surface_->SetSyncClient(nullptr);
- output_surface_->SetTreeActivationCallback(base::Closure());
}
output_surface_ = output_surface;
if (output_surface_) {
output_surface_->SetSyncClient(this);
- output_surface_->SetTreeActivationCallback(
- base::Bind(&SynchronousCompositorProxy::DidActivatePendingTree,
- base::Unretained(this)));
}
}
@@ -122,16 +118,6 @@ void SynchronousCompositorProxy::Invalidate() {
void SynchronousCompositorProxy::DidActivatePendingTree() {
++did_activate_pending_tree_count_;
SendAsyncRendererStateIfNeeded();
- DeliverMessages();
-}
-
-void SynchronousCompositorProxy::DeliverMessages() {
- DCHECK(output_surface_);
- std::vector<std::unique_ptr<IPC::Message>> messages;
- output_surface_->GetMessagesToDeliver(&messages);
- for (auto& msg : messages) {
- Send(msg.release());
- }
}
void SynchronousCompositorProxy::SendAsyncRendererStateIfNeeded() {
@@ -235,8 +221,6 @@ void SynchronousCompositorProxy::DemandDrawHw(
cc::CompositorFrame empty_frame;
SendDemandDrawHwReply(&empty_frame, 0u, reply_message);
inside_receive_ = false;
- } else {
- DeliverMessages();
}
}
@@ -321,8 +305,6 @@ void SynchronousCompositorProxy::DemandDrawSw(
cc::CompositorFrame empty_frame;
SendDemandDrawSwReply(false, &empty_frame, reply_message);
inside_receive_ = false;
- } else {
- DeliverMessages();
}
}

Powered by Google App Engine
This is Rietveld 408576698