Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(350)

Side by Side Diff: gpu/command_buffer/service/context_state.h

Issue 12321068: Add GL State Restoring Functions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | gpu/command_buffer/service/context_state.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | gpu/command_buffer/service/context_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698