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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 virtual void BindFramebuffer(); | 134 virtual void BindFramebuffer(); |
135 // Gives the GL internal format that should be used for calling CopyTexImage2D | 135 // Gives the GL internal format that should be used for calling CopyTexImage2D |
136 // when the framebuffer is bound via BindFramebuffer(). | 136 // when the framebuffer is bound via BindFramebuffer(). |
137 virtual uint32_t GetFramebufferCopyTextureFormat() = 0; | 137 virtual uint32_t GetFramebufferCopyTextureFormat() = 0; |
138 | 138 |
139 // The implementation may destroy or steal the contents of the CompositorFrame | 139 // The implementation may destroy or steal the contents of the CompositorFrame |
140 // passed in (though it will not take ownership of the CompositorFrame | 140 // passed in (though it will not take ownership of the CompositorFrame |
141 // itself). For successful swaps, the implementation must call | 141 // itself). For successful swaps, the implementation must call |
142 // OutputSurfaceClient::DidSwapBuffers() and eventually | 142 // OutputSurfaceClient::DidSwapBuffers() and eventually |
143 // DidSwapBuffersComplete(). | 143 // DidSwapBuffersComplete(). |
144 virtual void SwapBuffers(CompositorFrame* frame) = 0; | 144 virtual void SwapBuffers(CompositorFrame frame) = 0; |
145 virtual void OnSwapBuffersComplete(); | 145 virtual void OnSwapBuffersComplete(); |
146 | 146 |
147 // Called by subclasses after receiving a response from the gpu process to a | 147 // Called by subclasses after receiving a response from the gpu process to a |
148 // query about whether a given set of textures is still in use by the OS | 148 // query about whether a given set of textures is still in use by the OS |
149 // compositor. | 149 // compositor. |
150 void DidReceiveTextureInUseResponses( | 150 void DidReceiveTextureInUseResponses( |
151 const gpu::TextureInUseResponses& responses); | 151 const gpu::TextureInUseResponses& responses); |
152 | 152 |
153 bool HasClient() { return !!client_; } | 153 bool HasClient() { return !!client_; } |
154 | 154 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 bool external_stencil_test_enabled_ = false; | 205 bool external_stencil_test_enabled_ = false; |
206 | 206 |
207 base::WeakPtrFactory<OutputSurface> weak_ptr_factory_; | 207 base::WeakPtrFactory<OutputSurface> weak_ptr_factory_; |
208 | 208 |
209 DISALLOW_COPY_AND_ASSIGN(OutputSurface); | 209 DISALLOW_COPY_AND_ASSIGN(OutputSurface); |
210 }; | 210 }; |
211 | 211 |
212 } // namespace cc | 212 } // namespace cc |
213 | 213 |
214 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_ | 214 #endif // CC_OUTPUT_OUTPUT_SURFACE_H_ |
OLD | NEW |