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

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 comments. 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
« no previous file with comments | « services/ui/public/cpp/window_compositor_frame_sink.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 void WindowCompositorFrameSink::WillDrawSurface( 119 void WindowCompositorFrameSink::WillDrawSurface(
120 const cc::LocalSurfaceId& local_surface_id, 120 const cc::LocalSurfaceId& local_surface_id,
121 const gfx::Rect& damage_rect) { 121 const gfx::Rect& damage_rect) {
122 // TODO(fsamuel, staraz): Implement this. 122 // TODO(fsamuel, staraz): Implement this.
123 } 123 }
124 124
125 void WindowCompositorFrameSink::OnNeedsBeginFrames(bool needs_begin_frames) { 125 void WindowCompositorFrameSink::OnNeedsBeginFrames(bool needs_begin_frames) {
126 compositor_frame_sink_->SetNeedsBeginFrame(needs_begin_frames); 126 compositor_frame_sink_->SetNeedsBeginFrame(needs_begin_frames);
127 } 127 }
128 128
129 void WindowCompositorFrameSink::OnDidFinishFrame(const cc::BeginFrameAck& ack) {
130 // TODO(eseckler): Pass on the ack to compositor_frame_sink_.
131 }
132
129 WindowCompositorFrameSinkBinding::~WindowCompositorFrameSinkBinding() {} 133 WindowCompositorFrameSinkBinding::~WindowCompositorFrameSinkBinding() {}
130 134
131 WindowCompositorFrameSinkBinding::WindowCompositorFrameSinkBinding( 135 WindowCompositorFrameSinkBinding::WindowCompositorFrameSinkBinding(
132 cc::mojom::MojoCompositorFrameSinkRequest compositor_frame_sink_request, 136 cc::mojom::MojoCompositorFrameSinkRequest compositor_frame_sink_request,
133 cc::mojom::MojoCompositorFrameSinkClientPtrInfo 137 cc::mojom::MojoCompositorFrameSinkClientPtrInfo
134 compositor_frame_sink_client) 138 compositor_frame_sink_client)
135 : compositor_frame_sink_request_(std::move(compositor_frame_sink_request)), 139 : compositor_frame_sink_request_(std::move(compositor_frame_sink_request)),
136 compositor_frame_sink_client_(std::move(compositor_frame_sink_client)) {} 140 compositor_frame_sink_client_(std::move(compositor_frame_sink_client)) {}
137 141
138 cc::mojom::MojoCompositorFrameSinkRequest 142 cc::mojom::MojoCompositorFrameSinkRequest
139 WindowCompositorFrameSinkBinding::TakeFrameSinkRequest() { 143 WindowCompositorFrameSinkBinding::TakeFrameSinkRequest() {
140 return std::move(compositor_frame_sink_request_); 144 return std::move(compositor_frame_sink_request_);
141 } 145 }
142 146
143 cc::mojom::MojoCompositorFrameSinkClientPtrInfo 147 cc::mojom::MojoCompositorFrameSinkClientPtrInfo
144 WindowCompositorFrameSinkBinding::TakeFrameSinkClient() { 148 WindowCompositorFrameSinkBinding::TakeFrameSinkClient() {
145 return std::move(compositor_frame_sink_client_); 149 return std::move(compositor_frame_sink_client_);
146 } 150 }
147 151
148 } // namespace ui 152 } // namespace ui
OLDNEW
« no previous file with comments | « 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