OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_external_beg
in_frame_source.h" | 5 #include "content/browser/android/in_process/synchronous_compositor_external_beg
in_frame_source.h" |
6 | 6 |
7 #include "cc/output/begin_frame_args.h" | 7 #include "cc/output/begin_frame_args.h" |
8 #include "content/browser/android/in_process/synchronous_compositor_impl.h" | 8 #include "content/browser/android/in_process/synchronous_compositor_impl.h" |
9 #include "content/browser/android/in_process/synchronous_compositor_registry.h" | 9 #include "content/browser/android/in_process/synchronous_compositor_registry.h" |
10 #include "content/public/browser/browser_thread.h" | 10 #include "content/public/browser/browser_thread.h" |
11 #include "ui/gfx/frame_time.h" | |
12 | 11 |
13 namespace content { | 12 namespace content { |
14 | 13 |
15 SynchronousCompositorExternalBeginFrameSource:: | 14 SynchronousCompositorExternalBeginFrameSource:: |
16 SynchronousCompositorExternalBeginFrameSource(int routing_id) | 15 SynchronousCompositorExternalBeginFrameSource(int routing_id) |
17 : routing_id_(routing_id), | 16 : routing_id_(routing_id), |
18 registered_(false), | 17 registered_(false), |
19 compositor_(nullptr) { | 18 compositor_(nullptr) { |
20 } | 19 } |
21 | 20 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 | 57 |
59 // Not using base::NonThreadSafe as we want to enforce a more exacting threading | 58 // Not using base::NonThreadSafe as we want to enforce a more exacting threading |
60 // requirement: SynchronousCompositorExternalBeginFrameSource() must only be | 59 // requirement: SynchronousCompositorExternalBeginFrameSource() must only be |
61 // used on the UI thread. | 60 // used on the UI thread. |
62 bool | 61 bool |
63 SynchronousCompositorExternalBeginFrameSource::CalledOnValidThread() const { | 62 SynchronousCompositorExternalBeginFrameSource::CalledOnValidThread() const { |
64 return BrowserThread::CurrentlyOn(BrowserThread::UI); | 63 return BrowserThread::CurrentlyOn(BrowserThread::UI); |
65 } | 64 } |
66 | 65 |
67 } // namespace content | 66 } // namespace content |
OLD | NEW |