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

Unified Diff: cc/surfaces/compositor_frame_sink_support.cc

Issue 2734783006: CompositorFrameSinkSupport should return resources before sending an ack (Closed)
Patch Set: Use MakeCompositorFrameWithResources Created 3 years, 9 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
« no previous file with comments | « no previous file | cc/surfaces/compositor_frame_sink_support_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/compositor_frame_sink_support.cc
diff --git a/cc/surfaces/compositor_frame_sink_support.cc b/cc/surfaces/compositor_frame_sink_support.cc
index 0d2e90bd0a37b42e852d75af9227b41b43b93c09..23e44813919b4d5a33cb8af29376fe25663acfe2 100644
--- a/cc/surfaces/compositor_frame_sink_support.cc
+++ b/cc/surfaces/compositor_frame_sink_support.cc
@@ -134,11 +134,14 @@ void CompositorFrameSinkSupport::DidReceiveCompositorFrameAck() {
if (!client_)
return;
- client_->DidReceiveCompositorFrameAck();
+
+ // We return the resources before sending an ack so they can be reused in
+ // making the next CompositorFrame.
if (!surface_returned_resources_.empty()) {
client_->ReclaimResources(surface_returned_resources_);
surface_returned_resources_.clear();
}
+ client_->DidReceiveCompositorFrameAck();
}
void CompositorFrameSinkSupport::ForceReclaimResources() {
« no previous file with comments | « no previous file | cc/surfaces/compositor_frame_sink_support_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698