| 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 <vector> | 10 #include <vector> |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 struct GPU_EXPORT ContextState { | 92 struct GPU_EXPORT ContextState { |
| 93 explicit ContextState(FeatureInfo* feature_info); | 93 explicit ContextState(FeatureInfo* feature_info); |
| 94 ~ContextState(); | 94 ~ContextState(); |
| 95 | 95 |
| 96 void Initialize(); | 96 void Initialize(); |
| 97 | 97 |
| 98 void RestoreState() const; | 98 void RestoreState() const; |
| 99 void InitCapabilities() const; | 99 void InitCapabilities() const; |
| 100 void InitState() const; | 100 void InitState() const; |
| 101 | 101 |
| 102 void RestoreActiveTexture() const; |
| 103 void RestoreAttribute(GLuint index) const; |
| 104 void RestoreBufferBindings() const; |
| 105 void RestoreGlobalState() const; |
| 106 void RestoreProgramBindings() const; |
| 107 void RestoreRenderbufferBindings() const; |
| 108 void RestoreTextureUnitBindings(GLuint unit) const; |
| 109 |
| 102 // Helper for getting cached state. | 110 // Helper for getting cached state. |
| 103 bool GetStateAsGLint( | 111 bool GetStateAsGLint( |
| 104 GLenum pname, GLint* params, GLsizei* num_written) const; | 112 GLenum pname, GLint* params, GLsizei* num_written) const; |
| 105 bool GetStateAsGLfloat( | 113 bool GetStateAsGLfloat( |
| 106 GLenum pname, GLfloat* params, GLsizei* num_written) const; | 114 GLenum pname, GLfloat* params, GLsizei* num_written) const; |
| 107 bool GetEnabled(GLenum cap) const; | 115 bool GetEnabled(GLenum cap) const; |
| 108 | 116 |
| 109 #include "gpu/command_buffer/service/context_state_autogen.h" | 117 #include "gpu/command_buffer/service/context_state_autogen.h" |
| 110 | 118 |
| 111 EnableFlags enable_flags; | 119 EnableFlags enable_flags; |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 bool pack_reverse_row_order; | 160 bool pack_reverse_row_order; |
| 153 | 161 |
| 154 FeatureInfo* feature_info_; | 162 FeatureInfo* feature_info_; |
| 155 }; | 163 }; |
| 156 | 164 |
| 157 } // namespace gles2 | 165 } // namespace gles2 |
| 158 } // namespace gpu | 166 } // namespace gpu |
| 159 | 167 |
| 160 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_H_ | 168 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_H_ |
| 161 | 169 |
| OLD | NEW |