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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 // thread-specific data for the output surface can be initialized, since from | 96 // thread-specific data for the output surface can be initialized, since from |
97 // this point on the output surface will only be used on the compositor | 97 // this point on the output surface will only be used on the compositor |
98 // thread. | 98 // thread. |
99 virtual bool BindToClient(OutputSurfaceClient* client); | 99 virtual bool BindToClient(OutputSurfaceClient* client); |
100 | 100 |
101 // This is called by the compositor on the compositor thread inside ReleaseGL | 101 // This is called by the compositor on the compositor thread inside ReleaseGL |
102 // in order to release the ContextProvider. Only used with | 102 // in order to release the ContextProvider. Only used with |
103 // deferred_gl_initialization capability. | 103 // deferred_gl_initialization capability. |
104 void ReleaseContextProvider(); | 104 void ReleaseContextProvider(); |
105 | 105 |
106 // Enable or disable vsync. | |
107 void SetThrottleFrameProduction(bool enable); | |
108 | |
109 virtual void EnsureBackbuffer(); | 106 virtual void EnsureBackbuffer(); |
110 virtual void DiscardBackbuffer(); | 107 virtual void DiscardBackbuffer(); |
111 | 108 |
112 virtual void Reshape(const gfx::Size& size, float scale_factor); | 109 virtual void Reshape(const gfx::Size& size, float scale_factor); |
113 virtual gfx::Size SurfaceSize() const; | 110 virtual gfx::Size SurfaceSize() const; |
114 | 111 |
115 virtual void BindFramebuffer(); | 112 virtual void BindFramebuffer(); |
116 | 113 |
117 // The implementation may destroy or steal the contents of the CompositorFrame | 114 // The implementation may destroy or steal the contents of the CompositorFrame |
118 // passed in (though it will not take ownership of the CompositorFrame | 115 // passed in (though it will not take ownership of the CompositorFrame |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 bool external_stencil_test_enabled_; | 174 bool external_stencil_test_enabled_; |
178 | 175 |
179 base::WeakPtrFactory<OutputSurface> weak_ptr_factory_; | 176 base::WeakPtrFactory<OutputSurface> weak_ptr_factory_; |
180 | 177 |
181 DISALLOW_COPY_AND_ASSIGN(OutputSurface); | 178 DISALLOW_COPY_AND_ASSIGN(OutputSurface); |
182 }; | 179 }; |
183 | 180 |
184 } // namespace cc | 181 } // namespace cc |
185 | 182 |
186 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_ | 183 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_ |
OLD | NEW |