OLD | NEW |
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 Loading... |
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 |
OLD | NEW |