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

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

Issue 14999012: Move cc/debug/latency_info to ui/base. (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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "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/compositor_frame.h" 10 #include "cc/output/compositor_frame.h"
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 } 131 }
132 132
133 void SynchronousCompositorOutputSurface::SetNeedsBeginFrame( 133 void SynchronousCompositorOutputSurface::SetNeedsBeginFrame(
134 bool enable) { 134 bool enable) {
135 DCHECK(CalledOnValidThread()); 135 DCHECK(CalledOnValidThread());
136 needs_begin_frame_ = enable; 136 needs_begin_frame_ = enable;
137 UpdateCompositorClientSettings(); 137 UpdateCompositorClientSettings();
138 } 138 }
139 139
140 void SynchronousCompositorOutputSurface::SwapBuffers( 140 void SynchronousCompositorOutputSurface::SwapBuffers(
141 const cc::LatencyInfo& info) { 141 const ui::LatencyInfo& info) {
142 context3d()->shallowFlushCHROMIUM(); 142 context3d()->shallowFlushCHROMIUM();
143 did_swap_buffer_ = true; 143 did_swap_buffer_ = true;
144 } 144 }
145 145
146 void SynchronousCompositorOutputSurface::SetClient( 146 void SynchronousCompositorOutputSurface::SetClient(
147 SynchronousCompositorClient* compositor_client) { 147 SynchronousCompositorClient* compositor_client) {
148 DCHECK(CalledOnValidThread()); 148 DCHECK(CalledOnValidThread());
149 compositor_client_ = compositor_client; 149 compositor_client_ = compositor_client;
150 UpdateCompositorClientSettings(); 150 UpdateCompositorClientSettings();
151 } 151 }
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 // Not using base::NonThreadSafe as we want to enforce a more exacting threading 211 // Not using base::NonThreadSafe as we want to enforce a more exacting threading
212 // requirement: SynchronousCompositorOutputSurface() must only be used by 212 // requirement: SynchronousCompositorOutputSurface() must only be used by
213 // embedders that supply their own compositor loop via 213 // embedders that supply their own compositor loop via
214 // OverrideCompositorMessageLoop(). 214 // OverrideCompositorMessageLoop().
215 bool SynchronousCompositorOutputSurface::CalledOnValidThread() const { 215 bool SynchronousCompositorOutputSurface::CalledOnValidThread() const {
216 return base::MessageLoop::current() && (base::MessageLoop::current() == 216 return base::MessageLoop::current() && (base::MessageLoop::current() ==
217 GetContentClient()->renderer()->OverrideCompositorMessageLoop()); 217 GetContentClient()->renderer()->OverrideCompositorMessageLoop());
218 } 218 }
219 219
220 } // namespace content 220 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/android/synchronous_compositor_output_surface.h ('k') | content/renderer/gpu/compositor_output_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698