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

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

Issue 2755463002: [cc] Fix CompositorFrameSinkSupport BeginFrameAck interface. (Closed)
Patch Set: pass on acks to MojoCFSs in clients. 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/direct_compositor_frame_sink.h" 5 #include "cc/surfaces/direct_compositor_frame_sink.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "cc/output/compositor_frame.h" 8 #include "cc/output/compositor_frame.h"
9 #include "cc/output/compositor_frame_sink_client.h" 9 #include "cc/output/compositor_frame_sink_client.h"
10 #include "cc/surfaces/display.h" 10 #include "cc/surfaces/display.h"
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 const LocalSurfaceId& local_surface_id, 144 const LocalSurfaceId& local_surface_id,
145 const gfx::Rect& damage_rect) { 145 const gfx::Rect& damage_rect) {
146 // TODO(staraz): Implement this. 146 // TODO(staraz): Implement this.
147 } 147 }
148 148
149 void DirectCompositorFrameSink::OnNeedsBeginFrames(bool needs_begin_frame) { 149 void DirectCompositorFrameSink::OnNeedsBeginFrames(bool needs_begin_frame) {
150 support_->SetNeedsBeginFrame(needs_begin_frame); 150 support_->SetNeedsBeginFrame(needs_begin_frame);
151 } 151 }
152 152
153 void DirectCompositorFrameSink::OnDidFinishFrame(const BeginFrameAck& ack) { 153 void DirectCompositorFrameSink::OnDidFinishFrame(const BeginFrameAck& ack) {
154 support_->DidFinishFrame(ack); 154 // If there was damage, SubmitCompositorFrame includes the ack.
piman 2017/03/17 18:12:01 nit: is this something we should DCHECK in SubmitC
Eric Seckler 2017/03/20 11:54:03 Added a DCHECK. Yes, whenever there's a Composito
155 if (!ack.has_damage)
156 support_->BeginFrameDidNotSwap(ack);
155 } 157 }
156 158
157 } // namespace cc 159 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698