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

Unified Diff: content/browser/frame_host/render_widget_host_view_child_frame.cc

Issue 2147873003: cc: Dedup IPCs to return resources to client (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add bool is_swap_ack + remove CompositorFrameAck Created 4 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/frame_host/render_widget_host_view_child_frame.cc
diff --git a/content/browser/frame_host/render_widget_host_view_child_frame.cc b/content/browser/frame_host/render_widget_host_view_child_frame.cc
index 7da5da6163405d8c36623d1d54195793631c244a..f29be396b9f60e2cea191e1013d320e80674c172 100644
--- a/content/browser/frame_host/render_widget_host_view_child_frame.cc
+++ b/content/browser/frame_host/render_widget_host_view_child_frame.cc
@@ -338,14 +338,12 @@ void RenderWidgetHostViewChildFrame::GestureEventAck(
void RenderWidgetHostViewChildFrame::SurfaceDrawn(uint32_t output_surface_id,
cc::SurfaceDrawStatus drawn) {
- cc::CompositorFrameAck ack;
DCHECK_GT(ack_pending_count_, 0U);
-
- if (!surface_returned_resources_.empty())
- ack.resources.swap(surface_returned_resources_);
if (host_) {
- host_->Send(new ViewMsg_SwapCompositorFrameAck(host_->GetRoutingID(),
- output_surface_id, ack));
+ host_->Send(new ViewMsg_ReclaimCompositorResources(
+ host_->GetRoutingID(), output_surface_id, true /* is_swap_ack */,
+ surface_returned_resources_));
+ surface_returned_resources_.clear();
}
ack_pending_count_--;
}
@@ -611,11 +609,9 @@ void RenderWidgetHostViewChildFrame::ReturnResources(
return;
if (!ack_pending_count_ && host_) {
- cc::CompositorFrameAck ack;
- std::copy(resources.begin(), resources.end(),
- std::back_inserter(ack.resources));
host_->Send(new ViewMsg_ReclaimCompositorResources(
- host_->GetRoutingID(), last_output_surface_id_, ack));
+ host_->GetRoutingID(), last_output_surface_id_, true /* is_swap_ack */,
+ resources));
return;
}

Powered by Google App Engine
This is Rietveld 408576698