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

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

Issue 2175673003: WebGL 2: Fix nits when check vertexAttrib type with variable type in vertex shader (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
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 #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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 215
216 ContextState::ContextState(FeatureInfo* feature_info, 216 ContextState::ContextState(FeatureInfo* feature_info,
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 max_vertex_attribs_(0),
225 feature_info_(feature_info), 226 feature_info_(feature_info),
226 error_state_(ErrorState::Create(error_state_client, logger)) { 227 error_state_(ErrorState::Create(error_state_client, logger)) {
227 max_vertex_attribs_ = 0;
228 generic_attrib_base_type_mask_.resize(1);
229 generic_attrib_base_type_mask_[0] = 0xFFFFFFFF;
230
231 Initialize(); 228 Initialize();
232 } 229 }
233 230
234 ContextState::~ContextState() { 231 ContextState::~ContextState() {
235 } 232 }
236 233
237 void ContextState::RestoreTextureUnitBindings( 234 void ContextState::RestoreTextureUnitBindings(
238 GLuint unit, const ContextState* prev_state) const { 235 GLuint unit, const ContextState* prev_state) const {
239 DCHECK_LT(unit, texture_units.size()); 236 DCHECK_LT(unit, texture_units.size());
240 const TextureUnit& texture_unit = texture_units[unit]; 237 const TextureUnit& texture_unit = texture_units[unit];
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
706 UpdateUnpackParameters(); 703 UpdateUnpackParameters();
707 } 704 }
708 705
709 // Include the auto-generated part of this file. We split this because it means 706 // Include the auto-generated part of this file. We split this because it means
710 // we can easily edit the non-auto generated parts right here in this file 707 // we can easily edit the non-auto generated parts right here in this file
711 // instead of having to edit some template or the code generator. 708 // instead of having to edit some template or the code generator.
712 #include "gpu/command_buffer/service/context_state_impl_autogen.h" 709 #include "gpu/command_buffer/service/context_state_impl_autogen.h"
713 710
714 } // namespace gles2 711 } // namespace gles2
715 } // namespace gpu 712 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698