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

Unified Diff: cc/surfaces/surface.cc

Issue 903273002: Update from https://crrev.com/315085 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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
« no previous file with comments | « cc/scheduler/scheduler_state_machine.h ('k') | cc/surfaces/surface_display_output_surface.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 25f3114d51c32dcaab3da485f3d359453e4d6bee..065aa3822895dec4fdd64bb8d520c1aa80d45b58 100644
--- a/cc/surfaces/surface.cc
+++ b/cc/surfaces/surface.cc
@@ -46,7 +46,11 @@ void Surface::QueueFrame(scoped_ptr<CompositorFrame> frame,
current_frame_ = frame.Pass();
factory_->ReceiveFromChild(
current_frame_->delegated_frame_data->resource_list);
- ++frame_index_;
+ // Empty frames shouldn't be drawn and shouldn't contribute damage, so don't
+ // increment frame index for them.
+ if (!current_frame_ ||
+ !current_frame_->delegated_frame_data->render_pass_list.empty())
+ ++frame_index_;
if (previous_frame) {
ReturnedResourceArray previous_resources;
« no previous file with comments | « cc/scheduler/scheduler_state_machine.h ('k') | cc/surfaces/surface_display_output_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698