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

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

Issue 2727553004: [cc] Forward BeginFrameAcks through DirectCFS and CFSSupport. (Closed)
Patch Set: 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 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 #include <vector> 9 #include <vector>
10 10
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 61
62 void CompositorFrameSinkSupport::EvictFrame() { 62 void CompositorFrameSinkSupport::EvictFrame() {
63 surface_factory_.EvictSurface(); 63 surface_factory_.EvictSurface();
64 } 64 }
65 65
66 void CompositorFrameSinkSupport::SetNeedsBeginFrame(bool needs_begin_frame) { 66 void CompositorFrameSinkSupport::SetNeedsBeginFrame(bool needs_begin_frame) {
67 needs_begin_frame_ = needs_begin_frame; 67 needs_begin_frame_ = needs_begin_frame;
68 UpdateNeedsBeginFramesInternal(); 68 UpdateNeedsBeginFramesInternal();
69 } 69 }
70 70
71 void CompositorFrameSinkSupport::DidFinishFrame(const BeginFrameAck& ack) {
72 if (begin_frame_source_)
73 begin_frame_source_->DidFinishFrame(this, ack);
74 }
75
71 void CompositorFrameSinkSupport::SubmitCompositorFrame( 76 void CompositorFrameSinkSupport::SubmitCompositorFrame(
72 const LocalSurfaceId& local_surface_id, 77 const LocalSurfaceId& local_surface_id,
73 CompositorFrame frame) { 78 CompositorFrame frame) {
74 ++ack_pending_count_; 79 ++ack_pending_count_;
75 80
76 surface_factory_.SubmitCompositorFrame( 81 surface_factory_.SubmitCompositorFrame(
77 local_surface_id, std::move(frame), 82 local_surface_id, std::move(frame),
78 base::Bind(&CompositorFrameSinkSupport::DidReceiveCompositorFrameAck, 83 base::Bind(&CompositorFrameSinkSupport::DidReceiveCompositorFrameAck,
79 weak_factory_.GetWeakPtr())); 84 weak_factory_.GetWeakPtr()));
80 } 85 }
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 else 224 else
220 begin_frame_source_->RemoveObserver(this); 225 begin_frame_source_->RemoveObserver(this);
221 } 226 }
222 227
223 void CompositorFrameSinkSupport::RequestCopyOfSurface( 228 void CompositorFrameSinkSupport::RequestCopyOfSurface(
224 std::unique_ptr<CopyOutputRequest> request) { 229 std::unique_ptr<CopyOutputRequest> request) {
225 surface_factory_.RequestCopyOfSurface(std::move(request)); 230 surface_factory_.RequestCopyOfSurface(std::move(request));
226 } 231 }
227 232
228 } // namespace cc 233 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698