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

Side by Side Diff: cc/trees/proxy.cc

Issue 266353003: aw: Ubercomp mega patch (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | « cc/trees/layer_tree_host_impl.cc ('k') | cc/trees/single_thread_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 "cc/trees/proxy.h" 5 #include "cc/trees/proxy.h"
6 6
7 #include "base/message_loop/message_loop_proxy.h" 7 #include "base/message_loop/message_loop_proxy.h"
8 #include "base/single_thread_task_runner.h" 8 #include "base/single_thread_task_runner.h"
9 9
10 namespace cc { 10 namespace cc {
11 11
12 base::SingleThreadTaskRunner* Proxy::MainThreadTaskRunner() const { 12 base::SingleThreadTaskRunner* Proxy::MainThreadTaskRunner() const {
13 return main_task_runner_.get(); 13 return main_task_runner_.get();
14 } 14 }
15 15
16 bool Proxy::HasImplThread() const { return !!impl_task_runner_.get(); } 16 bool Proxy::HasImplThread() const { return !!impl_task_runner_.get(); }
17 17
18 base::SingleThreadTaskRunner* Proxy::ImplThreadTaskRunner() const { 18 base::SingleThreadTaskRunner* Proxy::ImplThreadTaskRunner() const {
19 return impl_task_runner_.get(); 19 return impl_task_runner_.get();
20 } 20 }
21 21
22 bool Proxy::IsMainThread() const { 22 bool Proxy::IsMainThread() const {
23 /*
23 #if DCHECK_IS_ON 24 #if DCHECK_IS_ON
24 DCHECK(main_task_runner_.get()); 25 DCHECK(main_task_runner_.get());
25 if (impl_thread_is_overridden_) 26 if (impl_thread_is_overridden_)
26 return false; 27 return false;
27 return main_task_runner_->BelongsToCurrentThread(); 28 return main_task_runner_->BelongsToCurrentThread();
28 #else 29 #else
30 */
29 return true; 31 return true;
30 #endif 32 // #endif
31 } 33 }
32 34
33 bool Proxy::IsImplThread() const { 35 bool Proxy::IsImplThread() const {
34 #if DCHECK_IS_ON 36 #if DCHECK_IS_ON
35 if (impl_thread_is_overridden_) 37 if (impl_thread_is_overridden_)
36 return true; 38 return true;
37 if (!impl_task_runner_.get()) 39 if (!impl_task_runner_.get())
38 return false; 40 return false;
39 return impl_task_runner_->BelongsToCurrentThread(); 41 return impl_task_runner_->BelongsToCurrentThread();
40 #else 42 #else
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 77
76 Proxy::~Proxy() { 78 Proxy::~Proxy() {
77 DCHECK(IsMainThread()); 79 DCHECK(IsMainThread());
78 } 80 }
79 81
80 scoped_ptr<base::Value> Proxy::SchedulerAsValueForTesting() { 82 scoped_ptr<base::Value> Proxy::SchedulerAsValueForTesting() {
81 return make_scoped_ptr(base::Value::CreateNullValue()); 83 return make_scoped_ptr(base::Value::CreateNullValue());
82 } 84 }
83 85
84 } // namespace cc 86 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | cc/trees/single_thread_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698