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