OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 // This file contains the GLES2Decoder class. | 5 // This file contains the GLES2Decoder class. |
6 | 6 |
7 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ | 7 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ |
8 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ | 8 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ |
9 | 9 |
10 #include <stdint.h> | 10 #include <stdint.h> |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 const gfx::Size& offscreen_size, | 151 const gfx::Size& offscreen_size, |
152 const DisallowedFeatures& disallowed_features, | 152 const DisallowedFeatures& disallowed_features, |
153 const std::vector<int32_t>& attribs) = 0; | 153 const std::vector<int32_t>& attribs) = 0; |
154 | 154 |
155 // Destroys the graphics context. | 155 // Destroys the graphics context. |
156 virtual void Destroy(bool have_context) = 0; | 156 virtual void Destroy(bool have_context) = 0; |
157 | 157 |
158 // Set the surface associated with the default FBO. | 158 // Set the surface associated with the default FBO. |
159 virtual void SetSurface(const scoped_refptr<gfx::GLSurface>& surface) = 0; | 159 virtual void SetSurface(const scoped_refptr<gfx::GLSurface>& surface) = 0; |
160 | 160 |
161 virtual void ProduceFrontBuffer(const Mailbox& mailbox) = 0; | 161 virtual void TakeFrontBuffer(const Mailbox& mailbox) = 0; |
| 162 virtual void ReturnFrontBuffer(const Mailbox& mailbox, bool is_lost) = 0; |
162 | 163 |
163 // Resize an offscreen frame buffer. | 164 // Resize an offscreen frame buffer. |
164 virtual bool ResizeOffscreenFrameBuffer(const gfx::Size& size) = 0; | 165 virtual bool ResizeOffscreenFrameBuffer(const gfx::Size& size) = 0; |
165 | 166 |
166 // Make this decoder's GL context current. | 167 // Make this decoder's GL context current. |
167 virtual bool MakeCurrent() = 0; | 168 virtual bool MakeCurrent() = 0; |
168 | 169 |
169 // Gets the GLES2 Util which holds info. | 170 // Gets the GLES2 Util which holds info. |
170 virtual GLES2Util* GetGLES2Util() = 0; | 171 virtual GLES2Util* GetGLES2Util() = 0; |
171 | 172 |
(...skipping 21 matching lines...) Expand all Loading... |
193 virtual void RestoreTextureState(unsigned service_id) const = 0; | 194 virtual void RestoreTextureState(unsigned service_id) const = 0; |
194 virtual void RestoreTextureUnitBindings(unsigned unit) const = 0; | 195 virtual void RestoreTextureUnitBindings(unsigned unit) const = 0; |
195 virtual void RestoreAllExternalTextureBindingsIfNeeded() = 0; | 196 virtual void RestoreAllExternalTextureBindingsIfNeeded() = 0; |
196 | 197 |
197 virtual void ClearAllAttributes() const = 0; | 198 virtual void ClearAllAttributes() const = 0; |
198 virtual void RestoreAllAttributes() const = 0; | 199 virtual void RestoreAllAttributes() const = 0; |
199 | 200 |
200 virtual void SetIgnoreCachedStateForTest(bool ignore) = 0; | 201 virtual void SetIgnoreCachedStateForTest(bool ignore) = 0; |
201 virtual void SetForceShaderNameHashingForTest(bool force) = 0; | 202 virtual void SetForceShaderNameHashingForTest(bool force) = 0; |
202 virtual uint32_t GetAndClearBackbufferClearBitsForTest(); | 203 virtual uint32_t GetAndClearBackbufferClearBitsForTest(); |
| 204 virtual size_t GetSavedBackTextureCountForTest() = 0; |
| 205 virtual size_t GetCreatedBackTextureCountForTest() = 0; |
203 | 206 |
204 // Gets the QueryManager for this context. | 207 // Gets the QueryManager for this context. |
205 virtual QueryManager* GetQueryManager() = 0; | 208 virtual QueryManager* GetQueryManager() = 0; |
206 | 209 |
207 // Gets the VertexArrayManager for this context. | 210 // Gets the VertexArrayManager for this context. |
208 virtual VertexArrayManager* GetVertexArrayManager() = 0; | 211 virtual VertexArrayManager* GetVertexArrayManager() = 0; |
209 | 212 |
210 // Gets the ImageManager for this context. | 213 // Gets the ImageManager for this context. |
211 virtual ImageManager* GetImageManager() = 0; | 214 virtual ImageManager* GetImageManager() = 0; |
212 | 215 |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 bool log_commands_; | 313 bool log_commands_; |
311 bool unsafe_es3_apis_enabled_; | 314 bool unsafe_es3_apis_enabled_; |
312 bool force_shader_name_hashing_for_test_; | 315 bool force_shader_name_hashing_for_test_; |
313 DISALLOW_COPY_AND_ASSIGN(GLES2Decoder); | 316 DISALLOW_COPY_AND_ASSIGN(GLES2Decoder); |
314 }; | 317 }; |
315 | 318 |
316 } // namespace gles2 | 319 } // namespace gles2 |
317 } // namespace gpu | 320 } // namespace gpu |
318 | 321 |
319 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ | 322 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ |
OLD | NEW |