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

Side by Side Diff: services/ui/public/cpp/window_compositor_frame_sink.cc

Issue 2691453002: [cc] Track observer status in ExternalBeginFrameSource. (Closed)
Patch Set: Fix android compile errors. Created 3 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 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 "services/ui/public/cpp/window_compositor_frame_sink.h" 5 #include "services/ui/public/cpp/window_compositor_frame_sink.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "cc/output/compositor_frame.h" 9 #include "cc/output/compositor_frame.h"
10 #include "cc/output/compositor_frame_sink_client.h" 10 #include "cc/output/compositor_frame_sink_client.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 } 117 }
118 118
119 void WindowCompositorFrameSink::WillDrawSurface() { 119 void WindowCompositorFrameSink::WillDrawSurface() {
120 // TODO(fsamuel, staraz): Implement this. 120 // TODO(fsamuel, staraz): Implement this.
121 } 121 }
122 122
123 void WindowCompositorFrameSink::OnNeedsBeginFrames(bool needs_begin_frames) { 123 void WindowCompositorFrameSink::OnNeedsBeginFrames(bool needs_begin_frames) {
124 compositor_frame_sink_->SetNeedsBeginFrame(needs_begin_frames); 124 compositor_frame_sink_->SetNeedsBeginFrame(needs_begin_frames);
125 } 125 }
126 126
127 void WindowCompositorFrameSink::OnDidFinishFrame(const cc::BeginFrameAck& ack) {
128 // TODO(eseckler): Pass on the ack to compositor_frame_sink_.
129 }
130
127 WindowCompositorFrameSinkBinding::~WindowCompositorFrameSinkBinding() {} 131 WindowCompositorFrameSinkBinding::~WindowCompositorFrameSinkBinding() {}
128 132
129 WindowCompositorFrameSinkBinding::WindowCompositorFrameSinkBinding( 133 WindowCompositorFrameSinkBinding::WindowCompositorFrameSinkBinding(
130 cc::mojom::MojoCompositorFrameSinkRequest compositor_frame_sink_request, 134 cc::mojom::MojoCompositorFrameSinkRequest compositor_frame_sink_request,
131 cc::mojom::MojoCompositorFrameSinkClientPtrInfo 135 cc::mojom::MojoCompositorFrameSinkClientPtrInfo
132 compositor_frame_sink_client) 136 compositor_frame_sink_client)
133 : compositor_frame_sink_request_(std::move(compositor_frame_sink_request)), 137 : compositor_frame_sink_request_(std::move(compositor_frame_sink_request)),
134 compositor_frame_sink_client_(std::move(compositor_frame_sink_client)) {} 138 compositor_frame_sink_client_(std::move(compositor_frame_sink_client)) {}
135 139
136 cc::mojom::MojoCompositorFrameSinkRequest 140 cc::mojom::MojoCompositorFrameSinkRequest
137 WindowCompositorFrameSinkBinding::TakeFrameSinkRequest() { 141 WindowCompositorFrameSinkBinding::TakeFrameSinkRequest() {
138 return std::move(compositor_frame_sink_request_); 142 return std::move(compositor_frame_sink_request_);
139 } 143 }
140 144
141 cc::mojom::MojoCompositorFrameSinkClientPtrInfo 145 cc::mojom::MojoCompositorFrameSinkClientPtrInfo
142 WindowCompositorFrameSinkBinding::TakeFrameSinkClient() { 146 WindowCompositorFrameSinkBinding::TakeFrameSinkClient() {
143 return std::move(compositor_frame_sink_client_); 147 return std::move(compositor_frame_sink_client_);
144 } 148 }
145 149
146 } // namespace ui 150 } // namespace ui
OLDNEW
« cc/scheduler/begin_frame_source.cc ('K') | « services/ui/public/cpp/window_compositor_frame_sink.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698