OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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_OUTPUT_OUTPUT_SURFACE_H_ | 5 #ifndef CC_OUTPUT_OUTPUT_SURFACE_H_ |
6 #define CC_OUTPUT_OUTPUT_SURFACE_H_ | 6 #define CC_OUTPUT_OUTPUT_SURFACE_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 // (namely Android WebView), this is called to determine whether the software | 98 // (namely Android WebView), this is called to determine whether the software |
99 // device should be used on the current frame. | 99 // device should be used on the current frame. |
100 virtual bool ForcedDrawToSoftwareDevice() const; | 100 virtual bool ForcedDrawToSoftwareDevice() const; |
101 | 101 |
102 // Called by the compositor on the compositor thread. This is a place where | 102 // Called by the compositor on the compositor thread. This is a place where |
103 // thread-specific data for the output surface can be initialized, since from | 103 // thread-specific data for the output surface can be initialized, since from |
104 // this point on the output surface will only be used on the compositor | 104 // this point on the output surface will only be used on the compositor |
105 // thread. | 105 // thread. |
106 virtual bool BindToClient(OutputSurfaceClient* client); | 106 virtual bool BindToClient(OutputSurfaceClient* client); |
107 | 107 |
| 108 // This is called by the compositor on the compositor thread inside ReleaseGL |
| 109 // in order to release the ContextProvider. Only used with |
| 110 // deferred_gl_initialization capability. |
| 111 void ReleaseContextProvider(); |
| 112 |
108 // Enable or disable vsync. | 113 // Enable or disable vsync. |
109 void SetThrottleFrameProduction(bool enable); | 114 void SetThrottleFrameProduction(bool enable); |
110 | 115 |
111 virtual void EnsureBackbuffer(); | 116 virtual void EnsureBackbuffer(); |
112 virtual void DiscardBackbuffer(); | 117 virtual void DiscardBackbuffer(); |
113 | 118 |
114 virtual void Reshape(const gfx::Size& size, float scale_factor); | 119 virtual void Reshape(const gfx::Size& size, float scale_factor); |
115 virtual gfx::Size SurfaceSize() const; | 120 virtual gfx::Size SurfaceSize() const; |
116 | 121 |
117 virtual void BindFramebuffer(); | 122 virtual void BindFramebuffer(); |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 std::deque<unsigned> available_gpu_latency_query_ids_; | 191 std::deque<unsigned> available_gpu_latency_query_ids_; |
187 std::deque<unsigned> pending_gpu_latency_query_ids_; | 192 std::deque<unsigned> pending_gpu_latency_query_ids_; |
188 RollingTimeDeltaHistory gpu_latency_history_; | 193 RollingTimeDeltaHistory gpu_latency_history_; |
189 | 194 |
190 DISALLOW_COPY_AND_ASSIGN(OutputSurface); | 195 DISALLOW_COPY_AND_ASSIGN(OutputSurface); |
191 }; | 196 }; |
192 | 197 |
193 } // namespace cc | 198 } // namespace cc |
194 | 199 |
195 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_ | 200 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_ |
OLD | NEW |