OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_IMPL_H_ | 5 #ifndef CC_TREES_PROXY_IMPL_H_ |
6 #define CC_TREES_PROXY_IMPL_H_ | 6 #define CC_TREES_PROXY_IMPL_H_ |
7 | 7 |
8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
9 #include "cc/base/cc_export.h" | 9 #include "cc/base/cc_export.h" |
| 10 #include "cc/base/completion_event.h" |
| 11 #include "cc/output/output_surface.h" |
10 | 12 |
11 namespace cc { | 13 namespace cc { |
12 | |
13 // TODO(khushalsagar): The impl side of ThreadProxy. It is currently defined as | 14 // TODO(khushalsagar): The impl side of ThreadProxy. It is currently defined as |
14 // an interface with the implementation provided by ThreadProxy and will be | 15 // an interface with the implementation provided by ThreadProxy and will be |
15 // made an independent class. | 16 // made an independent class. |
16 // The methods added to this interface should only use the CompositorThreadOnly | 17 // The methods added to this interface should only use the CompositorThreadOnly |
17 // variables from ThreadProxy. | 18 // variables from ThreadProxy. |
18 // See crbug/527200 | 19 // See crbug/527200 |
19 class CC_EXPORT ProxyImpl { | 20 class CC_EXPORT ProxyImpl { |
20 public: | 21 public: |
21 // Callback for impl side commands received from the channel. | 22 // Callback for impl side commands received from the channel. |
22 virtual void SetThrottleFrameProductionOnImpl(bool throttle) = 0; | 23 virtual void SetThrottleFrameProductionOnImpl(bool throttle) = 0; |
| 24 virtual void InitializeOutputSurfaceOnImpl(OutputSurface* output_surface) = 0; |
| 25 virtual void MainThreadHasStoppedFlingingOnImpl() = 0; |
| 26 virtual void SetInputThrottledUntilCommitOnImpl(bool is_throttled) = 0; |
| 27 virtual void SetDeferCommitsOnImpl(bool defer_commits) = 0; |
| 28 virtual void FinishAllRenderingOnImpl(CompletionEvent* completion) = 0; |
| 29 virtual void SetVisibleOnImpl(CompletionEvent* completion, bool visible) = 0; |
| 30 virtual void ReleaseOutputSurfaceOnImpl(CompletionEvent* completion) = 0; |
| 31 virtual void FinishGLOnImpl(CompletionEvent* completion) = 0; |
| 32 virtual void MainFrameWillHappenOnImplForTesting( |
| 33 CompletionEvent* completion, |
| 34 bool* main_frame_will_happen) = 0; |
23 | 35 |
24 // TODO(khushalsagar): Rename as GetWeakPtr() once ThreadProxy is split. | 36 // TODO(khushalsagar): Rename as GetWeakPtr() once ThreadProxy is split. |
25 virtual base::WeakPtr<ProxyImpl> GetImplWeakPtr() = 0; | 37 virtual base::WeakPtr<ProxyImpl> GetImplWeakPtr() = 0; |
26 | 38 |
27 protected: | 39 protected: |
28 virtual ~ProxyImpl() {} | 40 virtual ~ProxyImpl() {} |
29 }; | 41 }; |
30 | 42 |
31 } // namespace cc | 43 } // namespace cc |
32 | 44 |
33 #endif // CC_TREES_PROXY_IMPL_H_ | 45 #endif // CC_TREES_PROXY_IMPL_H_ |
OLD | NEW |