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 <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 10 matching lines...) Expand all Loading... |
21 namespace gfx { | 21 namespace gfx { |
22 class Rect; | 22 class Rect; |
23 class Vector2d; | 23 class Vector2d; |
24 } | 24 } |
25 | 25 |
26 namespace cc { | 26 namespace cc { |
27 class BeginFrameSource; | 27 class BeginFrameSource; |
28 class LayerTreeDebugState; | 28 class LayerTreeDebugState; |
29 class LayerTreeMutator; | 29 class LayerTreeMutator; |
30 class OutputSurface; | 30 class OutputSurface; |
31 struct RendererCapabilities; | |
32 | 31 |
33 // Abstract interface responsible for proxying commands from the main-thread | 32 // Abstract interface responsible for proxying commands from the main-thread |
34 // side of the compositor over to the compositor implementation. | 33 // side of the compositor over to the compositor implementation. |
35 class CC_EXPORT Proxy { | 34 class CC_EXPORT Proxy { |
36 public: | 35 public: |
37 virtual ~Proxy() {} | 36 virtual ~Proxy() {} |
38 | 37 |
39 virtual bool IsStarted() const = 0; | 38 virtual bool IsStarted() const = 0; |
40 virtual bool CommitToActiveTree() const = 0; | 39 virtual bool CommitToActiveTree() const = 0; |
41 | 40 |
42 // Will call LayerTreeHost::OnCreateAndInitializeOutputSurfaceAttempted | 41 // Will call LayerTreeHost::OnCreateAndInitializeOutputSurfaceAttempted |
43 // with the result of this function. | 42 // with the result of this function. |
44 virtual void SetOutputSurface(OutputSurface* output_surface) = 0; | 43 virtual void SetOutputSurface(OutputSurface* output_surface) = 0; |
45 | 44 |
46 virtual void ReleaseOutputSurface() = 0; | 45 virtual void ReleaseOutputSurface() = 0; |
47 | 46 |
48 virtual void SetVisible(bool visible) = 0; | 47 virtual void SetVisible(bool visible) = 0; |
49 | 48 |
50 virtual const RendererCapabilities& GetRendererCapabilities() const = 0; | |
51 | |
52 virtual void SetNeedsAnimate() = 0; | 49 virtual void SetNeedsAnimate() = 0; |
53 virtual void SetNeedsUpdateLayers() = 0; | 50 virtual void SetNeedsUpdateLayers() = 0; |
54 virtual void SetNeedsCommit() = 0; | 51 virtual void SetNeedsCommit() = 0; |
55 virtual void SetNeedsRedraw(const gfx::Rect& damage_rect) = 0; | 52 virtual void SetNeedsRedraw(const gfx::Rect& damage_rect) = 0; |
56 virtual void SetNextCommitWaitsForActivation() = 0; | 53 virtual void SetNextCommitWaitsForActivation() = 0; |
57 | 54 |
58 virtual void NotifyInputThrottledUntilCommit() = 0; | 55 virtual void NotifyInputThrottledUntilCommit() = 0; |
59 | 56 |
60 // Defers commits until it is reset. It is only supported when using a | 57 // Defers commits until it is reset. It is only supported when using a |
61 // scheduler. | 58 // scheduler. |
(...skipping 17 matching lines...) Expand all Loading... |
79 TopControlsState current, | 76 TopControlsState current, |
80 bool animate) = 0; | 77 bool animate) = 0; |
81 | 78 |
82 // Testing hooks | 79 // Testing hooks |
83 virtual bool MainFrameWillHappenForTesting() = 0; | 80 virtual bool MainFrameWillHappenForTesting() = 0; |
84 }; | 81 }; |
85 | 82 |
86 } // namespace cc | 83 } // namespace cc |
87 | 84 |
88 #endif // CC_TREES_PROXY_H_ | 85 #endif // CC_TREES_PROXY_H_ |
OLD | NEW |