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

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

Issue 1508953002: Implement helper functionalities for computing image size with ES3 settings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 GPU_EXPORT void Vec4::GetValues<GLuint>(GLuint* values) const; 130 GPU_EXPORT void Vec4::GetValues<GLuint>(GLuint* values) const;
131 131
132 template <> 132 template <>
133 GPU_EXPORT void Vec4::SetValues<GLfloat>(const GLfloat* values); 133 GPU_EXPORT void Vec4::SetValues<GLfloat>(const GLfloat* values);
134 template <> 134 template <>
135 GPU_EXPORT void Vec4::SetValues<GLint>(const GLint* values); 135 GPU_EXPORT void Vec4::SetValues<GLint>(const GLint* values);
136 template <> 136 template <>
137 GPU_EXPORT void Vec4::SetValues<GLuint>(const GLuint* values); 137 GPU_EXPORT void Vec4::SetValues<GLuint>(const GLuint* values);
138 138
139 struct GPU_EXPORT ContextState { 139 struct GPU_EXPORT ContextState {
140 enum Dimension {
141 k2D,
142 k3D
143 };
144
140 ContextState(FeatureInfo* feature_info, 145 ContextState(FeatureInfo* feature_info,
141 ErrorStateClient* error_state_client, 146 ErrorStateClient* error_state_client,
142 Logger* logger); 147 Logger* logger);
143 ~ContextState(); 148 ~ContextState();
144 149
145 void Initialize(); 150 void Initialize();
146 151
147 void SetIgnoreCachedStateForTest(bool ignore) { 152 void SetIgnoreCachedStateForTest(bool ignore) {
148 ignore_cached_state = ignore; 153 ignore_cached_state = ignore;
149 } 154 }
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 glStencilMaskSeparate(op, mask); 216 glStencilMaskSeparate(op, mask);
212 } 217 }
213 218
214 ErrorState* GetErrorState(); 219 ErrorState* GetErrorState();
215 220
216 void SetBoundBuffer(GLenum target, Buffer* buffer); 221 void SetBoundBuffer(GLenum target, Buffer* buffer);
217 void RemoveBoundBuffer(Buffer* buffer); 222 void RemoveBoundBuffer(Buffer* buffer);
218 223
219 void UnbindTexture(TextureRef* texture); 224 void UnbindTexture(TextureRef* texture);
220 225
226 PixelStoreParams GetPackParams();
227 PixelStoreParams GetUnpackParams(Dimension dimension);
228
221 #include "gpu/command_buffer/service/context_state_autogen.h" 229 #include "gpu/command_buffer/service/context_state_autogen.h"
222 230
223 EnableFlags enable_flags; 231 EnableFlags enable_flags;
224 232
225 // Current active texture by 0 - n index. 233 // Current active texture by 0 - n index.
226 // In other words, if we call glActiveTexture(GL_TEXTURE2) this value would 234 // In other words, if we call glActiveTexture(GL_TEXTURE2) this value would
227 // be 2. 235 // be 2.
228 GLuint active_texture_unit; 236 GLuint active_texture_unit;
229 237
230 // The currently bound array buffer. If this is 0 it is illegal to call 238 // The currently bound array buffer. If this is 0 it is illegal to call
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 283
276 FeatureInfo* feature_info_; 284 FeatureInfo* feature_info_;
277 scoped_ptr<ErrorState> error_state_; 285 scoped_ptr<ErrorState> error_state_;
278 }; 286 };
279 287
280 } // namespace gles2 288 } // namespace gles2
281 } // namespace gpu 289 } // namespace gpu
282 290
283 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_H_ 291 #endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_H_
284 292
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698