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 #include "gpu/command_buffer/service/context_state.h" | 5 #include "gpu/command_buffer/service/context_state.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <cmath> | 9 #include <cmath> |
10 | 10 |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
217 ErrorStateClient* error_state_client, | 217 ErrorStateClient* error_state_client, |
218 Logger* logger) | 218 Logger* logger) |
219 : active_texture_unit(0), | 219 : active_texture_unit(0), |
220 bound_renderbuffer_valid(false), | 220 bound_renderbuffer_valid(false), |
221 pack_reverse_row_order(false), | 221 pack_reverse_row_order(false), |
222 ignore_cached_state(false), | 222 ignore_cached_state(false), |
223 fbo_binding_for_scissor_workaround_dirty(false), | 223 fbo_binding_for_scissor_workaround_dirty(false), |
224 framebuffer_srgb_(false), | 224 framebuffer_srgb_(false), |
225 feature_info_(feature_info), | 225 feature_info_(feature_info), |
226 error_state_(ErrorState::Create(error_state_client, logger)) { | 226 error_state_(ErrorState::Create(error_state_client, logger)) { |
227 max_vertex_attribs_ = 0; | |
Zhenyao Mo
2016/07/22 14:36:47
This should go to the initialization list above.
| |
228 generic_attrib_base_type_mask_.resize(1); | |
Zhenyao Mo
2016/07/22 14:36:47
No need for this.
| |
229 generic_attrib_base_type_mask_[0] = 0xFFFFFFFF; | |
230 | |
227 Initialize(); | 231 Initialize(); |
228 } | 232 } |
229 | 233 |
230 ContextState::~ContextState() { | 234 ContextState::~ContextState() { |
231 } | 235 } |
232 | 236 |
233 void ContextState::RestoreTextureUnitBindings( | 237 void ContextState::RestoreTextureUnitBindings( |
234 GLuint unit, const ContextState* prev_state) const { | 238 GLuint unit, const ContextState* prev_state) const { |
235 DCHECK_LT(unit, texture_units.size()); | 239 DCHECK_LT(unit, texture_units.size()); |
236 const TextureUnit& texture_unit = texture_units[unit]; | 240 const TextureUnit& texture_unit = texture_units[unit]; |
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
702 UpdateUnpackParameters(); | 706 UpdateUnpackParameters(); |
703 } | 707 } |
704 | 708 |
705 // Include the auto-generated part of this file. We split this because it means | 709 // Include the auto-generated part of this file. We split this because it means |
706 // we can easily edit the non-auto generated parts right here in this file | 710 // we can easily edit the non-auto generated parts right here in this file |
707 // instead of having to edit some template or the code generator. | 711 // instead of having to edit some template or the code generator. |
708 #include "gpu/command_buffer/service/context_state_impl_autogen.h" | 712 #include "gpu/command_buffer/service/context_state_impl_autogen.h" |
709 | 713 |
710 } // namespace gles2 | 714 } // namespace gles2 |
711 } // namespace gpu | 715 } // namespace gpu |
OLD | NEW |