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

Side by Side Diff: content/renderer/android/synchronous_compositor_output_surface.cc

Issue 2096493002: Make cc::CompositorFrames movable [Part 1 of 2] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Dana's nits Created 4 years, 6 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/renderer/android/synchronous_compositor_output_surface.h" 5 #include "content/renderer/android/synchronous_compositor_output_surface.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 CancelFallbackTick(); 148 CancelFallbackTick();
149 } 149 }
150 150
151 void SynchronousCompositorOutputSurface::Reshape(const gfx::Size& size, 151 void SynchronousCompositorOutputSurface::Reshape(const gfx::Size& size,
152 float scale_factor, 152 float scale_factor,
153 bool has_alpha) { 153 bool has_alpha) {
154 // Intentional no-op: surface size is controlled by the embedder. 154 // Intentional no-op: surface size is controlled by the embedder.
155 } 155 }
156 156
157 void SynchronousCompositorOutputSurface::SwapBuffers( 157 void SynchronousCompositorOutputSurface::SwapBuffers(
158 cc::CompositorFrame* frame) { 158 cc::CompositorFrame frame) {
159 DCHECK(CalledOnValidThread()); 159 DCHECK(CalledOnValidThread());
160 DCHECK(sync_client_); 160 DCHECK(sync_client_);
161 if (!fallback_tick_running_) { 161 if (!fallback_tick_running_) {
162 sync_client_->SwapBuffers(output_surface_id_, frame); 162 sync_client_->SwapBuffers(output_surface_id_, std::move(frame));
163 DeliverMessages(); 163 DeliverMessages();
164 } 164 }
165 client_->DidSwapBuffers(); 165 client_->DidSwapBuffers();
166 did_swap_ = true; 166 did_swap_ = true;
167 } 167 }
168 168
169 void SynchronousCompositorOutputSurface::CancelFallbackTick() { 169 void SynchronousCompositorOutputSurface::CancelFallbackTick() {
170 fallback_tick_.Cancel(); 170 fallback_tick_.Cancel();
171 fallback_tick_pending_ = false; 171 fallback_tick_pending_ = false;
172 } 172 }
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 bool SynchronousCompositorOutputSurface::Send(IPC::Message* message) { 317 bool SynchronousCompositorOutputSurface::Send(IPC::Message* message) {
318 DCHECK(CalledOnValidThread()); 318 DCHECK(CalledOnValidThread());
319 return sender_->Send(message); 319 return sender_->Send(message);
320 } 320 }
321 321
322 bool SynchronousCompositorOutputSurface::CalledOnValidThread() const { 322 bool SynchronousCompositorOutputSurface::CalledOnValidThread() const {
323 return thread_checker_.CalledOnValidThread(); 323 return thread_checker_.CalledOnValidThread();
324 } 324 }
325 325
326 } // namespace content 326 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698