| 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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 | 156 |
| 157 // Destroys the graphics context. | 157 // Destroys the graphics context. |
| 158 virtual void Destroy(bool have_context) = 0; | 158 virtual void Destroy(bool have_context) = 0; |
| 159 | 159 |
| 160 // Set the surface associated with the default FBO. | 160 // Set the surface associated with the default FBO. |
| 161 virtual void SetSurface(const scoped_refptr<gfx::GLSurface>& surface) = 0; | 161 virtual void SetSurface(const scoped_refptr<gfx::GLSurface>& surface) = 0; |
| 162 // Releases the surface associated with the GL context. | 162 // Releases the surface associated with the GL context. |
| 163 // The decoder should not be used until a new surface is set. | 163 // The decoder should not be used until a new surface is set. |
| 164 virtual void ReleaseSurface() = 0; | 164 virtual void ReleaseSurface() = 0; |
| 165 | 165 |
| 166 virtual void TakeFrontBuffer(const Mailbox& mailbox) = 0; | 166 virtual void ProduceFrontBuffer(const Mailbox& mailbox) = 0; |
| 167 virtual void ReturnFrontBuffer(const Mailbox& mailbox, bool is_lost) = 0; | |
| 168 | 167 |
| 169 // Resize an offscreen frame buffer. | 168 // Resize an offscreen frame buffer. |
| 170 virtual bool ResizeOffscreenFrameBuffer(const gfx::Size& size) = 0; | 169 virtual bool ResizeOffscreenFrameBuffer(const gfx::Size& size) = 0; |
| 171 | 170 |
| 172 // Make this decoder's GL context current. | 171 // Make this decoder's GL context current. |
| 173 virtual bool MakeCurrent() = 0; | 172 virtual bool MakeCurrent() = 0; |
| 174 | 173 |
| 175 // Gets the GLES2 Util which holds info. | 174 // Gets the GLES2 Util which holds info. |
| 176 virtual GLES2Util* GetGLES2Util() = 0; | 175 virtual GLES2Util* GetGLES2Util() = 0; |
| 177 | 176 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 199 virtual void RestoreTextureState(unsigned service_id) const = 0; | 198 virtual void RestoreTextureState(unsigned service_id) const = 0; |
| 200 virtual void RestoreTextureUnitBindings(unsigned unit) const = 0; | 199 virtual void RestoreTextureUnitBindings(unsigned unit) const = 0; |
| 201 virtual void RestoreAllExternalTextureBindingsIfNeeded() = 0; | 200 virtual void RestoreAllExternalTextureBindingsIfNeeded() = 0; |
| 202 | 201 |
| 203 virtual void ClearAllAttributes() const = 0; | 202 virtual void ClearAllAttributes() const = 0; |
| 204 virtual void RestoreAllAttributes() const = 0; | 203 virtual void RestoreAllAttributes() const = 0; |
| 205 | 204 |
| 206 virtual void SetIgnoreCachedStateForTest(bool ignore) = 0; | 205 virtual void SetIgnoreCachedStateForTest(bool ignore) = 0; |
| 207 virtual void SetForceShaderNameHashingForTest(bool force) = 0; | 206 virtual void SetForceShaderNameHashingForTest(bool force) = 0; |
| 208 virtual uint32_t GetAndClearBackbufferClearBitsForTest(); | 207 virtual uint32_t GetAndClearBackbufferClearBitsForTest(); |
| 209 virtual size_t GetSavedBackTextureCountForTest() = 0; | |
| 210 virtual size_t GetCreatedBackTextureCountForTest() = 0; | |
| 211 | 208 |
| 212 // Gets the QueryManager for this context. | 209 // Gets the QueryManager for this context. |
| 213 virtual QueryManager* GetQueryManager() = 0; | 210 virtual QueryManager* GetQueryManager() = 0; |
| 214 | 211 |
| 215 // Gets the TransformFeedbackManager for this context. | 212 // Gets the TransformFeedbackManager for this context. |
| 216 virtual TransformFeedbackManager* GetTransformFeedbackManager() = 0; | 213 virtual TransformFeedbackManager* GetTransformFeedbackManager() = 0; |
| 217 | 214 |
| 218 // Gets the VertexArrayManager for this context. | 215 // Gets the VertexArrayManager for this context. |
| 219 virtual VertexArrayManager* GetVertexArrayManager() = 0; | 216 virtual VertexArrayManager* GetVertexArrayManager() = 0; |
| 220 | 217 |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 bool log_commands_; | 318 bool log_commands_; |
| 322 bool unsafe_es3_apis_enabled_; | 319 bool unsafe_es3_apis_enabled_; |
| 323 bool force_shader_name_hashing_for_test_; | 320 bool force_shader_name_hashing_for_test_; |
| 324 DISALLOW_COPY_AND_ASSIGN(GLES2Decoder); | 321 DISALLOW_COPY_AND_ASSIGN(GLES2Decoder); |
| 325 }; | 322 }; |
| 326 | 323 |
| 327 } // namespace gles2 | 324 } // namespace gles2 |
| 328 } // namespace gpu | 325 } // namespace gpu |
| 329 | 326 |
| 330 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ | 327 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_H_ |
| OLD | NEW |