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

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

Issue 2757953002: DisplayCompositor should enforce invariant that frame size and device scale factor are fixed (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 9
10 #include "cc/output/compositor_frame.h" 10 #include "cc/output/compositor_frame.h"
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 UpdateNeedsBeginFramesInternal(); 197 UpdateNeedsBeginFramesInternal();
198 } 198 }
199 199
200 void CompositorFrameSinkSupport::WillDrawSurface( 200 void CompositorFrameSinkSupport::WillDrawSurface(
201 const LocalSurfaceId& local_surface_id, 201 const LocalSurfaceId& local_surface_id,
202 const gfx::Rect& damage_rect) { 202 const gfx::Rect& damage_rect) {
203 if (client_) 203 if (client_)
204 client_->WillDrawSurface(local_surface_id, damage_rect); 204 client_->WillDrawSurface(local_surface_id, damage_rect);
205 } 205 }
206 206
207 void CompositorFrameSinkSupport::OnBadFrameReceived() {
208 if (client_)
209 client_->OnBadFrameReceived();
210 }
211
207 void CompositorFrameSinkSupport::OnBeginFrame(const BeginFrameArgs& args) { 212 void CompositorFrameSinkSupport::OnBeginFrame(const BeginFrameArgs& args) {
208 UpdateNeedsBeginFramesInternal(); 213 UpdateNeedsBeginFramesInternal();
209 last_begin_frame_args_ = args; 214 last_begin_frame_args_ = args;
210 if (client_) 215 if (client_)
211 client_->OnBeginFrame(args); 216 client_->OnBeginFrame(args);
212 } 217 }
213 218
214 const BeginFrameArgs& CompositorFrameSinkSupport::LastUsedBeginFrameArgs() 219 const BeginFrameArgs& CompositorFrameSinkSupport::LastUsedBeginFrameArgs()
215 const { 220 const {
216 return last_begin_frame_args_; 221 return last_begin_frame_args_;
(...skipping 14 matching lines...) Expand all
231 else 236 else
232 begin_frame_source_->RemoveObserver(this); 237 begin_frame_source_->RemoveObserver(this);
233 } 238 }
234 239
235 void CompositorFrameSinkSupport::RequestCopyOfSurface( 240 void CompositorFrameSinkSupport::RequestCopyOfSurface(
236 std::unique_ptr<CopyOutputRequest> request) { 241 std::unique_ptr<CopyOutputRequest> request) {
237 surface_factory_.RequestCopyOfSurface(std::move(request)); 242 surface_factory_.RequestCopyOfSurface(std::move(request));
238 } 243 }
239 244
240 } // namespace cc 245 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698