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 ContextState class. | 5 // This file contains the ContextState class. |
6 | 6 |
7 #ifndef GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_H_ | 7 #ifndef GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_H_ |
8 #define GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_H_ | 8 #define GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_H_ |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 const scoped_refptr<VertexAttribManager> attrib_manager) const; | 187 const scoped_refptr<VertexAttribManager> attrib_manager) const; |
188 void RestoreVertexAttribs() const; | 188 void RestoreVertexAttribs() const; |
189 void RestoreBufferBindings() const; | 189 void RestoreBufferBindings() const; |
190 void RestoreGlobalState(const ContextState* prev_state) const; | 190 void RestoreGlobalState(const ContextState* prev_state) const; |
191 void RestoreProgramSettings(const ContextState* prev_state, | 191 void RestoreProgramSettings(const ContextState* prev_state, |
192 bool restore_transform_feedback_bindings) const; | 192 bool restore_transform_feedback_bindings) const; |
193 void RestoreRenderbufferBindings(); | 193 void RestoreRenderbufferBindings(); |
194 void RestoreIndexedUniformBufferBindings(const ContextState* prev_state); | 194 void RestoreIndexedUniformBufferBindings(const ContextState* prev_state); |
195 void RestoreTextureUnitBindings( | 195 void RestoreTextureUnitBindings( |
196 GLuint unit, const ContextState* prev_state) const; | 196 GLuint unit, const ContextState* prev_state) const; |
| 197 void RestoreUnpackState() const; |
197 | 198 |
198 // Helper for getting cached state. | 199 // Helper for getting cached state. |
199 bool GetStateAsGLint( | 200 bool GetStateAsGLint( |
200 GLenum pname, GLint* params, GLsizei* num_written) const; | 201 GLenum pname, GLint* params, GLsizei* num_written) const; |
201 bool GetStateAsGLfloat( | 202 bool GetStateAsGLfloat( |
202 GLenum pname, GLfloat* params, GLsizei* num_written) const; | 203 GLenum pname, GLfloat* params, GLsizei* num_written) const; |
203 bool GetEnabled(GLenum cap) const; | 204 bool GetEnabled(GLenum cap) const; |
204 | 205 |
205 inline void SetDeviceColorMask(GLboolean red, | 206 inline void SetDeviceColorMask(GLboolean red, |
206 GLboolean green, | 207 GLboolean green, |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 | 325 |
325 FeatureInfo* feature_info_; | 326 FeatureInfo* feature_info_; |
326 std::unique_ptr<ErrorState> error_state_; | 327 std::unique_ptr<ErrorState> error_state_; |
327 }; | 328 }; |
328 | 329 |
329 } // namespace gles2 | 330 } // namespace gles2 |
330 } // namespace gpu | 331 } // namespace gpu |
331 | 332 |
332 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_H_ | 333 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_H_ |
333 | 334 |
OLD | NEW |