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

Unified Diff: cc/surfaces/surface_aggregator.cc

Issue 2695243006: Don't delete CopyOutputRequests when queueing a new Surface frame. (Closed)
Patch Set: add test Created 3 years, 10 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: cc/surfaces/surface_aggregator.cc
diff --git a/cc/surfaces/surface_aggregator.cc b/cc/surfaces/surface_aggregator.cc
index fd51529b35923581504757f67c2fd139d701c78f..7d2a86bbadcceb33c3b9489cc88273d9cc9a3f68 100644
--- a/cc/surfaces/surface_aggregator.cc
+++ b/cc/surfaces/surface_aggregator.cc
@@ -710,6 +710,12 @@ gfx::Rect SurfaceAggregator::PrewalkTree(const SurfaceId& surface_id,
}
CHECK(debug_weak_this.get());
+ if (surface->HasRootCopyRequests() && !frame.render_pass_list.empty()) {
+ int remapped_pass_id =
+ RemapPassId(frame.render_pass_list.back()->id, surface_id);
+ copy_request_passes_.insert(remapped_pass_id);
+ }
+
for (const auto& render_pass : frame.render_pass_list) {
if (!render_pass->copy_requests.empty()) {
int remapped_pass_id = RemapPassId(render_pass->id, surface_id);
@@ -740,7 +746,7 @@ void SurfaceAggregator::CopyUndrawnSurfaces(PrewalkResult* prewalk_result) {
if (!surface->HasActiveFrame())
continue;
const CompositorFrame& frame = surface->GetActiveFrame();
- bool surface_has_copy_requests = false;
+ bool surface_has_copy_requests = surface->HasRootCopyRequests();
for (const auto& render_pass : frame.render_pass_list) {
surface_has_copy_requests |= !render_pass->copy_requests.empty();
}

Powered by Google App Engine
This is Rietveld 408576698