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 28 matching lines...) Expand all Loading... |
39 bool IsMainThread() const; | 39 bool IsMainThread() const; |
40 bool IsImplThread() const; | 40 bool IsImplThread() const; |
41 bool IsMainThreadBlocked() const; | 41 bool IsMainThreadBlocked() const; |
42 #ifndef NDEBUG | 42 #ifndef NDEBUG |
43 void SetMainThreadBlocked(bool is_main_thread_blocked); | 43 void SetMainThreadBlocked(bool is_main_thread_blocked); |
44 void SetCurrentThreadIsImplThread(bool is_impl_thread); | 44 void SetCurrentThreadIsImplThread(bool is_impl_thread); |
45 #endif | 45 #endif |
46 | 46 |
47 virtual ~Proxy(); | 47 virtual ~Proxy(); |
48 | 48 |
49 virtual bool CompositeAndReadback(void* pixels, gfx::Rect rect) = 0; | 49 virtual bool CompositeAndReadback(void* pixels, const gfx::Rect& rect) = 0; |
50 | 50 |
51 virtual void FinishAllRendering() = 0; | 51 virtual void FinishAllRendering() = 0; |
52 | 52 |
53 virtual bool IsStarted() const = 0; | 53 virtual bool IsStarted() const = 0; |
54 | 54 |
55 // Indicates that the compositing surface associated with our context is | 55 // Indicates that the compositing surface associated with our context is |
56 // ready to use. | 56 // ready to use. |
57 virtual void SetLayerTreeHostClientReady() = 0; | 57 virtual void SetLayerTreeHostClientReady() = 0; |
58 | 58 |
59 virtual void SetVisible(bool visible) = 0; | 59 virtual void SetVisible(bool visible) = 0; |
60 | 60 |
61 // Attempts to recreate the context and renderer synchronously after the | 61 // Attempts to recreate the context and renderer synchronously after the |
62 // output surface is lost. Calls | 62 // output surface is lost. Calls |
63 // LayerTreeHost::OnCreateAndInitializeOutputSurfaceAttempted with the result. | 63 // LayerTreeHost::OnCreateAndInitializeOutputSurfaceAttempted with the result. |
64 virtual void CreateAndInitializeOutputSurface() = 0; | 64 virtual void CreateAndInitializeOutputSurface() = 0; |
65 | 65 |
66 virtual const RendererCapabilities& GetRendererCapabilities() const = 0; | 66 virtual const RendererCapabilities& GetRendererCapabilities() const = 0; |
67 | 67 |
68 virtual void SetNeedsAnimate() = 0; | 68 virtual void SetNeedsAnimate() = 0; |
69 virtual void SetNeedsUpdateLayers() = 0; | 69 virtual void SetNeedsUpdateLayers() = 0; |
70 virtual void SetNeedsCommit() = 0; | 70 virtual void SetNeedsCommit() = 0; |
71 virtual void SetNeedsRedraw(gfx::Rect damage_rect) = 0; | 71 virtual void SetNeedsRedraw(const gfx::Rect& damage_rect) = 0; |
72 virtual void SetNextCommitWaitsForActivation() = 0; | 72 virtual void SetNextCommitWaitsForActivation() = 0; |
73 | 73 |
74 virtual void NotifyInputThrottledUntilCommit() = 0; | 74 virtual void NotifyInputThrottledUntilCommit() = 0; |
75 | 75 |
76 // Defers commits until it is reset. It is only supported when in threaded | 76 // Defers commits until it is reset. It is only supported when in threaded |
77 // mode. It's an error to make a sync call like CompositeAndReadback while | 77 // mode. It's an error to make a sync call like CompositeAndReadback while |
78 // commits are deferred. | 78 // commits are deferred. |
79 virtual void SetDeferCommits(bool defer_commits) = 0; | 79 virtual void SetDeferCommits(bool defer_commits) = 0; |
80 | 80 |
81 virtual void MainThreadHasStoppedFlinging() = 0; | 81 virtual void MainThreadHasStoppedFlinging() = 0; |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 explicit DebugScopedSetMainThreadBlocked(Proxy* proxy) {} | 141 explicit DebugScopedSetMainThreadBlocked(Proxy* proxy) {} |
142 ~DebugScopedSetMainThreadBlocked() {} | 142 ~DebugScopedSetMainThreadBlocked() {} |
143 private: | 143 private: |
144 DISALLOW_COPY_AND_ASSIGN(DebugScopedSetMainThreadBlocked); | 144 DISALLOW_COPY_AND_ASSIGN(DebugScopedSetMainThreadBlocked); |
145 }; | 145 }; |
146 #endif | 146 #endif |
147 | 147 |
148 } // namespace cc | 148 } // namespace cc |
149 | 149 |
150 #endif // CC_TREES_PROXY_H_ | 150 #endif // CC_TREES_PROXY_H_ |
OLD | NEW |