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_PROXY_H_ | 5 #ifndef CC_TREES_PROXY_H_ |
6 #define CC_TREES_PROXY_H_ | 6 #define CC_TREES_PROXY_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/threading/platform_thread.h" | 14 #include "base/threading/platform_thread.h" |
15 #include "base/time/time.h" | 15 #include "base/time/time.h" |
16 #include "base/values.h" | 16 #include "base/values.h" |
17 #include "cc/base/cc_export.h" | 17 #include "cc/base/cc_export.h" |
18 | 18 |
19 namespace base { class SingleThreadTaskRunner; } | 19 namespace base { |
| 20 namespace debug { |
| 21 class TracedValue; |
| 22 } |
| 23 class SingleThreadTaskRunner; |
| 24 } |
20 | 25 |
21 namespace gfx { | 26 namespace gfx { |
22 class Rect; | 27 class Rect; |
23 class Vector2d; | 28 class Vector2d; |
24 } | 29 } |
25 | 30 |
26 namespace cc { | 31 namespace cc { |
27 | 32 |
28 class LayerTreeDebugState; | 33 class LayerTreeDebugState; |
29 class OutputSurface; | 34 class OutputSurface; |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 | 89 |
85 // Forces 3D commands on all contexts to wait for all previous SwapBuffers | 90 // Forces 3D commands on all contexts to wait for all previous SwapBuffers |
86 // to finish before executing in the GPU process. | 91 // to finish before executing in the GPU process. |
87 virtual void ForceSerializeOnSwapBuffers() = 0; | 92 virtual void ForceSerializeOnSwapBuffers() = 0; |
88 | 93 |
89 // Maximum number of sub-region texture updates supported for each commit. | 94 // Maximum number of sub-region texture updates supported for each commit. |
90 virtual size_t MaxPartialTextureUpdates() const = 0; | 95 virtual size_t MaxPartialTextureUpdates() const = 0; |
91 | 96 |
92 virtual bool SupportsImplScrolling() const = 0; | 97 virtual bool SupportsImplScrolling() const = 0; |
93 | 98 |
94 virtual scoped_ptr<base::Value> AsValue() const = 0; | 99 virtual void AsValueInto(base::debug::TracedValue* value) const = 0; |
95 | 100 |
96 virtual void SetDebugState(const LayerTreeDebugState& debug_state) = 0; | 101 virtual void SetDebugState(const LayerTreeDebugState& debug_state) = 0; |
97 | 102 |
98 // Testing hooks | 103 // Testing hooks |
99 virtual bool CommitPendingForTesting() = 0; | 104 virtual bool CommitPendingForTesting() = 0; |
100 virtual scoped_ptr<base::Value> SchedulerAsValueForTesting(); | |
101 | 105 |
102 protected: | 106 protected: |
103 Proxy(scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, | 107 Proxy(scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, |
104 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner); | 108 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner); |
105 friend class DebugScopedSetImplThread; | 109 friend class DebugScopedSetImplThread; |
106 friend class DebugScopedSetMainThread; | 110 friend class DebugScopedSetMainThread; |
107 friend class DebugScopedSetMainThreadBlocked; | 111 friend class DebugScopedSetMainThreadBlocked; |
108 | 112 |
109 private: | 113 private: |
110 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; | 114 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; |
(...skipping 28 matching lines...) Expand all Loading... |
139 explicit DebugScopedSetMainThreadBlocked(Proxy* proxy) {} | 143 explicit DebugScopedSetMainThreadBlocked(Proxy* proxy) {} |
140 ~DebugScopedSetMainThreadBlocked() {} | 144 ~DebugScopedSetMainThreadBlocked() {} |
141 private: | 145 private: |
142 DISALLOW_COPY_AND_ASSIGN(DebugScopedSetMainThreadBlocked); | 146 DISALLOW_COPY_AND_ASSIGN(DebugScopedSetMainThreadBlocked); |
143 }; | 147 }; |
144 #endif | 148 #endif |
145 | 149 |
146 } // namespace cc | 150 } // namespace cc |
147 | 151 |
148 #endif // CC_TREES_PROXY_H_ | 152 #endif // CC_TREES_PROXY_H_ |
OLD | NEW |