| 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" |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 virtual const RendererCapabilities& GetRendererCapabilities() const = 0; | 73 virtual const RendererCapabilities& GetRendererCapabilities() const = 0; |
| 74 | 74 |
| 75 virtual void SetNeedsAnimate() = 0; | 75 virtual void SetNeedsAnimate() = 0; |
| 76 virtual void SetNeedsUpdateLayers() = 0; | 76 virtual void SetNeedsUpdateLayers() = 0; |
| 77 virtual void SetNeedsCommit() = 0; | 77 virtual void SetNeedsCommit() = 0; |
| 78 virtual void SetNeedsRedraw(const gfx::Rect& damage_rect) = 0; | 78 virtual void SetNeedsRedraw(const gfx::Rect& damage_rect) = 0; |
| 79 virtual void SetNextCommitWaitsForActivation() = 0; | 79 virtual void SetNextCommitWaitsForActivation() = 0; |
| 80 | 80 |
| 81 virtual void NotifyInputThrottledUntilCommit() = 0; | 81 virtual void NotifyInputThrottledUntilCommit() = 0; |
| 82 | 82 |
| 83 // Defers commits until it is reset. It is only supported when in threaded | 83 // Defers commits until it is reset. It is only supported when using a |
| 84 // mode. It's an error to make a sync call like CompositeAndReadback while | 84 // scheduler. |
| 85 // commits are deferred. | |
| 86 virtual void SetDeferCommits(bool defer_commits) = 0; | 85 virtual void SetDeferCommits(bool defer_commits) = 0; |
| 87 | 86 |
| 88 virtual void MainThreadHasStoppedFlinging() = 0; | 87 virtual void MainThreadHasStoppedFlinging() = 0; |
| 89 | 88 |
| 90 virtual bool CommitRequested() const = 0; | 89 virtual bool CommitRequested() const = 0; |
| 91 virtual bool BeginMainFrameRequested() const = 0; | 90 virtual bool BeginMainFrameRequested() const = 0; |
| 92 | 91 |
| 93 // Must be called before using the proxy. | 92 // Must be called before using the proxy. |
| 94 virtual void Start() = 0; | 93 virtual void Start() = 0; |
| 95 virtual void Stop() = 0; // Must be called before deleting the proxy. | 94 virtual void Stop() = 0; // Must be called before deleting the proxy. |
| 96 | 95 |
| 97 // Forces 3D commands on all contexts to wait for all previous SwapBuffers | 96 // Forces 3D commands on all contexts to wait for all previous SwapBuffers |
| 98 // to finish before executing in the GPU process. | 97 // to finish before executing in the GPU process. |
| 99 virtual void ForceSerializeOnSwapBuffers() = 0; | 98 virtual void ForceSerializeOnSwapBuffers() = 0; |
| 100 | 99 |
| 101 // Maximum number of sub-region texture updates supported for each commit. | 100 // Maximum number of sub-region texture updates supported for each commit. |
| 102 virtual size_t MaxPartialTextureUpdates() const = 0; | 101 virtual size_t MaxPartialTextureUpdates() const = 0; |
| 103 | 102 |
| 104 virtual bool SupportsImplScrolling() const = 0; | 103 virtual bool SupportsImplScrolling() const = 0; |
| 105 | 104 |
| 106 virtual void AsValueInto(base::trace_event::TracedValue* value) const = 0; | |
| 107 | |
| 108 virtual void SetDebugState(const LayerTreeDebugState& debug_state) = 0; | 105 virtual void SetDebugState(const LayerTreeDebugState& debug_state) = 0; |
| 109 | 106 |
| 110 virtual void SetChildrenNeedBeginFrames(bool children_need_begin_frames) = 0; | 107 virtual void SetChildrenNeedBeginFrames(bool children_need_begin_frames) = 0; |
| 111 | 108 |
| 112 // Testing hooks | 109 // Testing hooks |
| 113 virtual bool MainFrameWillHappenForTesting() = 0; | 110 virtual bool MainFrameWillHappenForTesting() = 0; |
| 114 | 111 |
| 115 BlockingTaskRunner* blocking_main_thread_task_runner() const { | 112 BlockingTaskRunner* blocking_main_thread_task_runner() const { |
| 116 return blocking_main_thread_task_runner_.get(); | 113 return blocking_main_thread_task_runner_.get(); |
| 117 } | 114 } |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 explicit DebugScopedSetMainThreadBlocked(Proxy* proxy) {} | 155 explicit DebugScopedSetMainThreadBlocked(Proxy* proxy) {} |
| 159 ~DebugScopedSetMainThreadBlocked() {} | 156 ~DebugScopedSetMainThreadBlocked() {} |
| 160 private: | 157 private: |
| 161 DISALLOW_COPY_AND_ASSIGN(DebugScopedSetMainThreadBlocked); | 158 DISALLOW_COPY_AND_ASSIGN(DebugScopedSetMainThreadBlocked); |
| 162 }; | 159 }; |
| 163 #endif | 160 #endif |
| 164 | 161 |
| 165 } // namespace cc | 162 } // namespace cc |
| 166 | 163 |
| 167 #endif // CC_TREES_PROXY_H_ | 164 #endif // CC_TREES_PROXY_H_ |
| OLD | NEW |