OLD | NEW |
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 #ifndef CC_TREES_SINGLE_THREAD_PROXY_H_ | 5 #ifndef CC_TREES_SINGLE_THREAD_PROXY_H_ |
6 #define CC_TREES_SINGLE_THREAD_PROXY_H_ | 6 #define CC_TREES_SINGLE_THREAD_PROXY_H_ |
7 | 7 |
8 #include <limits> | 8 #include <limits> |
9 | 9 |
10 #include "base/time.h" | 10 #include "base/time.h" |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 // Used on the Thread, but checked on main thread during | 97 // Used on the Thread, but checked on main thread during |
98 // initialization/shutdown. | 98 // initialization/shutdown. |
99 scoped_ptr<LayerTreeHostImpl> layer_tree_host_impl_; | 99 scoped_ptr<LayerTreeHostImpl> layer_tree_host_impl_; |
100 bool renderer_initialized_; | 100 bool renderer_initialized_; |
101 RendererCapabilities renderer_capabilities_for_main_thread_; | 101 RendererCapabilities renderer_capabilities_for_main_thread_; |
102 | 102 |
103 bool next_frame_is_newly_committed_frame_; | 103 bool next_frame_is_newly_committed_frame_; |
104 | 104 |
105 bool inside_draw_; | 105 bool inside_draw_; |
106 | 106 |
107 base::TimeDelta total_commit_time_; | |
108 size_t total_commit_count_; | |
109 | |
110 DISALLOW_COPY_AND_ASSIGN(SingleThreadProxy); | 107 DISALLOW_COPY_AND_ASSIGN(SingleThreadProxy); |
111 }; | 108 }; |
112 | 109 |
113 // For use in the single-threaded case. In debug builds, it pretends that the | 110 // For use in the single-threaded case. In debug builds, it pretends that the |
114 // code is running on the impl thread to satisfy assertion checks. | 111 // code is running on the impl thread to satisfy assertion checks. |
115 class DebugScopedSetImplThread { | 112 class DebugScopedSetImplThread { |
116 public: | 113 public: |
117 explicit DebugScopedSetImplThread(Proxy* proxy) : proxy_(proxy) { | 114 explicit DebugScopedSetImplThread(Proxy* proxy) : proxy_(proxy) { |
118 #ifndef NDEBUG | 115 #ifndef NDEBUG |
119 previous_value_ = proxy_->impl_thread_is_overridden_; | 116 previous_value_ = proxy_->impl_thread_is_overridden_; |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 private: | 164 private: |
168 DebugScopedSetImplThread impl_thread_; | 165 DebugScopedSetImplThread impl_thread_; |
169 DebugScopedSetMainThreadBlocked main_thread_blocked_; | 166 DebugScopedSetMainThreadBlocked main_thread_blocked_; |
170 | 167 |
171 DISALLOW_COPY_AND_ASSIGN(DebugScopedSetImplThreadAndMainThreadBlocked); | 168 DISALLOW_COPY_AND_ASSIGN(DebugScopedSetImplThreadAndMainThreadBlocked); |
172 }; | 169 }; |
173 | 170 |
174 } // namespace cc | 171 } // namespace cc |
175 | 172 |
176 #endif // CC_TREES_SINGLE_THREAD_PROXY_H_ | 173 #endif // CC_TREES_SINGLE_THREAD_PROXY_H_ |
OLD | NEW |