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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 | 197 |
| 198 void PushTextureDecompressionUnpackState() const; |
| 199 void RestoreUnpackState() const; |
| 200 |
198 // Helper for getting cached state. | 201 // Helper for getting cached state. |
199 bool GetStateAsGLint( | 202 bool GetStateAsGLint( |
200 GLenum pname, GLint* params, GLsizei* num_written) const; | 203 GLenum pname, GLint* params, GLsizei* num_written) const; |
201 bool GetStateAsGLfloat( | 204 bool GetStateAsGLfloat( |
202 GLenum pname, GLfloat* params, GLsizei* num_written) const; | 205 GLenum pname, GLfloat* params, GLsizei* num_written) const; |
203 bool GetEnabled(GLenum cap) const; | 206 bool GetEnabled(GLenum cap) const; |
204 | 207 |
205 inline void SetDeviceColorMask(GLboolean red, | 208 inline void SetDeviceColorMask(GLboolean red, |
206 GLboolean green, | 209 GLboolean green, |
207 GLboolean blue, | 210 GLboolean blue, |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 | 327 |
325 FeatureInfo* feature_info_; | 328 FeatureInfo* feature_info_; |
326 std::unique_ptr<ErrorState> error_state_; | 329 std::unique_ptr<ErrorState> error_state_; |
327 }; | 330 }; |
328 | 331 |
329 } // namespace gles2 | 332 } // namespace gles2 |
330 } // namespace gpu | 333 } // namespace gpu |
331 | 334 |
332 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_H_ | 335 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_H_ |
333 | 336 |
OLD | NEW |