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

Unified Diff: cc/surfaces/surface.cc

Issue 2855723002: Don't submit frames with no render passes in cc tests (Closed)
Patch Set: c Created 3 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
« no previous file with comments | « cc/surfaces/display.cc ('k') | cc/surfaces/surface_aggregator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/surface.cc
diff --git a/cc/surfaces/surface.cc b/cc/surfaces/surface.cc
index 2ceae59329081c2295c5aadac3d04fb171d0742e..7902a9696ed2e08727d20cbf6c1e8233a5ded17c 100644
--- a/cc/surfaces/surface.cc
+++ b/cc/surfaces/surface.cc
@@ -84,8 +84,7 @@ void Surface::QueueFrame(CompositorFrame frame,
void Surface::RequestCopyOfOutput(
std::unique_ptr<CopyOutputRequest> copy_request) {
- if (!active_frame_data_ ||
- active_frame_data_->frame.render_pass_list.empty()) {
+ if (!active_frame_data_) {
copy_request->SendEmptyResult();
return;
}
@@ -167,8 +166,7 @@ void Surface::ActivateFrame(FrameData frame_data) {
// Save root pass copy requests.
std::vector<std::unique_ptr<CopyOutputRequest>> old_copy_requests;
- if (active_frame_data_ &&
- !active_frame_data_->frame.render_pass_list.empty()) {
+ if (active_frame_data_) {
std::swap(old_copy_requests,
active_frame_data_->frame.render_pass_list.back()->copy_requests);
}
@@ -184,10 +182,7 @@ void Surface::ActivateFrame(FrameData frame_data) {
for (auto& copy_request : old_copy_requests)
RequestCopyOfOutput(std::move(copy_request));
- // Empty frames shouldn't be drawn and shouldn't contribute damage, so don't
- // increment frame index for them.
- if (!active_frame_data_->frame.render_pass_list.empty())
- ++frame_index_;
+ ++frame_index_;
previous_frame_surface_id_ = surface_id();
« no previous file with comments | « cc/surfaces/display.cc ('k') | cc/surfaces/surface_aggregator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698