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

Side by Side Diff: content/browser/android/in_process/synchronous_compositor_output_surface.cc

Issue 17520002: Disable retroactive begin frame for synchronous compositor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « content/browser/android/in_process/synchronous_compositor_output_surface.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 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/browser/android/in_process/synchronous_compositor_output_surfa ce.h" 5 #include "content/browser/android/in_process/synchronous_compositor_output_surfa ce.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "cc/output/begin_frame_args.h" 10 #include "cc/output/begin_frame_args.h"
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 gfx::Size damage_size) { 220 gfx::Size damage_size) {
221 did_swap_buffer_ = false; 221 did_swap_buffer_ = false;
222 SetNeedsRedrawRect(gfx::Rect(damage_size)); 222 SetNeedsRedrawRect(gfx::Rect(damage_size));
223 if (needs_begin_frame_) 223 if (needs_begin_frame_)
224 BeginFrame(cc::BeginFrameArgs::CreateForSynchronousCompositor()); 224 BeginFrame(cc::BeginFrameArgs::CreateForSynchronousCompositor());
225 225
226 if (did_swap_buffer_) 226 if (did_swap_buffer_)
227 OnSwapBuffersComplete(NULL); 227 OnSwapBuffersComplete(NULL);
228 } 228 }
229 229
230 void SynchronousCompositorOutputSurface::PostCheckForRetroactiveBeginFrame() {
231 // Synchronous compositor cannot perform retroactive begin frames, so
232 // intentionally no-op here.
233 }
234
230 // Not using base::NonThreadSafe as we want to enforce a more exacting threading 235 // Not using base::NonThreadSafe as we want to enforce a more exacting threading
231 // requirement: SynchronousCompositorOutputSurface() must only be used on the UI 236 // requirement: SynchronousCompositorOutputSurface() must only be used on the UI
232 // thread. 237 // thread.
233 bool SynchronousCompositorOutputSurface::CalledOnValidThread() const { 238 bool SynchronousCompositorOutputSurface::CalledOnValidThread() const {
234 return BrowserThread::CurrentlyOn(BrowserThread::UI); 239 return BrowserThread::CurrentlyOn(BrowserThread::UI);
235 } 240 }
236 241
237 SynchronousCompositorOutputSurfaceDelegate* 242 SynchronousCompositorOutputSurfaceDelegate*
238 SynchronousCompositorOutputSurface::GetDelegate() { 243 SynchronousCompositorOutputSurface::GetDelegate() {
239 return SynchronousCompositorImpl::FromRoutingID(routing_id_); 244 return SynchronousCompositorImpl::FromRoutingID(routing_id_);
240 } 245 }
241 246
242 } // namespace content 247 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/android/in_process/synchronous_compositor_output_surface.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698