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 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 // only be used on the compositor thread. | 112 // only be used on the compositor thread. |
113 // The caller should call DetachFromClient() on the same thread before | 113 // The caller should call DetachFromClient() on the same thread before |
114 // destroying the OutputSurface, even if this fails. And BindToClient should | 114 // destroying the OutputSurface, even if this fails. And BindToClient should |
115 // not be called twice for a given OutputSurface. | 115 // not be called twice for a given OutputSurface. |
116 virtual bool BindToClient(OutputSurfaceClient* client); | 116 virtual bool BindToClient(OutputSurfaceClient* client); |
117 | 117 |
118 // Called by the compositor on the compositor thread. This is a place where | 118 // Called by the compositor on the compositor thread. This is a place where |
119 // thread-specific data for the output surface can be uninitialized. | 119 // thread-specific data for the output surface can be uninitialized. |
120 virtual void DetachFromClient(); | 120 virtual void DetachFromClient(); |
121 | 121 |
| 122 // Could be something like "start frame" so mac can ensure backbuffer? |
122 virtual void EnsureBackbuffer(); | 123 virtual void EnsureBackbuffer(); |
| 124 // Called by the Mac subclass, but otherwise unused.. |
123 virtual void DiscardBackbuffer(); | 125 virtual void DiscardBackbuffer(); |
124 | 126 |
125 virtual void Reshape(const gfx::Size& size, | 127 virtual void Reshape(const gfx::Size& size, |
126 float scale_factor, | 128 float scale_factor, |
127 const gfx::ColorSpace& color_space, | 129 const gfx::ColorSpace& color_space, |
128 bool alpha); | 130 bool alpha); |
129 gfx::Size SurfaceSize() const { return surface_size_; } | 131 gfx::Size SurfaceSize() const { return surface_size_; } |
130 float device_scale_factor() const { return device_scale_factor_; } | 132 float device_scale_factor() const { return device_scale_factor_; } |
131 | 133 |
132 // If supported, this causes a ReclaimResources for all resources that are | 134 // If supported, this causes a ReclaimResources for all resources that are |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 bool external_stencil_test_enabled_ = false; | 208 bool external_stencil_test_enabled_ = false; |
207 | 209 |
208 base::WeakPtrFactory<OutputSurface> weak_ptr_factory_; | 210 base::WeakPtrFactory<OutputSurface> weak_ptr_factory_; |
209 | 211 |
210 DISALLOW_COPY_AND_ASSIGN(OutputSurface); | 212 DISALLOW_COPY_AND_ASSIGN(OutputSurface); |
211 }; | 213 }; |
212 | 214 |
213 } // namespace cc | 215 } // namespace cc |
214 | 216 |
215 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_ | 217 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_ |
OLD | NEW |