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