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

Side by Side Diff: cc/surfaces/compositor_frame_sink_support.cc

Issue 2888043004: [cc] Add and plumb CFS::DidNotProduceFrame. (Closed)
Patch Set: 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/surfaces/compositor_frame_sink_support.h" 5 #include "cc/surfaces/compositor_frame_sink_support.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "cc/output/compositor_frame.h" 10 #include "cc/output/compositor_frame.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 if (!current_surface_) 78 if (!current_surface_)
79 return; 79 return;
80 DestroyCurrentSurface(); 80 DestroyCurrentSurface();
81 } 81 }
82 82
83 void CompositorFrameSinkSupport::SetNeedsBeginFrame(bool needs_begin_frame) { 83 void CompositorFrameSinkSupport::SetNeedsBeginFrame(bool needs_begin_frame) {
84 needs_begin_frame_ = needs_begin_frame; 84 needs_begin_frame_ = needs_begin_frame;
85 UpdateNeedsBeginFramesInternal(); 85 UpdateNeedsBeginFramesInternal();
86 } 86 }
87 87
88 void CompositorFrameSinkSupport::BeginFrameDidNotSwap( 88 void CompositorFrameSinkSupport::BeginFrameDidNotProduceFrame(
89 const BeginFrameAck& ack) { 89 const BeginFrameAck& ack) {
90 // TODO(eseckler): While a pending CompositorFrame exists (see TODO below), we 90 // TODO(eseckler): While a pending CompositorFrame exists (see TODO below), we
91 // should not acknowledge immediately. Instead, we should update the ack that 91 // should not acknowledge immediately. Instead, we should update the ack that
92 // will be sent to DisplayScheduler when the pending frame is activated. 92 // will be sent to DisplayScheduler when the pending frame is activated.
93 DCHECK_GE(ack.sequence_number, BeginFrameArgs::kStartingFrameNumber); 93 DCHECK_GE(ack.sequence_number, BeginFrameArgs::kStartingFrameNumber);
94 94
95 // |has_damage| is not transmitted, but false by default. 95 // |has_damage| is not transmitted, but false by default.
96 DCHECK(!ack.has_damage); 96 DCHECK(!ack.has_damage);
97 if (begin_frame_source_) 97 if (begin_frame_source_)
98 begin_frame_source_->DidFinishFrame(this, ack); 98 begin_frame_source_->DidFinishFrame(this, ack);
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 std::unique_ptr<CopyOutputRequest> copy_request) { 347 std::unique_ptr<CopyOutputRequest> copy_request) {
348 if (!current_surface_) 348 if (!current_surface_)
349 return; 349 return;
350 350
351 DCHECK(current_surface_->compositor_frame_sink_support().get() == this); 351 DCHECK(current_surface_->compositor_frame_sink_support().get() == this);
352 current_surface_->RequestCopyOfOutput(std::move(copy_request)); 352 current_surface_->RequestCopyOfOutput(std::move(copy_request));
353 surface_manager_->SurfaceModified(current_surface_->surface_id()); 353 surface_manager_->SurfaceModified(current_surface_->surface_id());
354 } 354 }
355 355
356 } // namespace cc 356 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698