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

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

Issue 224763002: Remove default textures in (!bind_generates_resource) context groups. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 8 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_group.h" 5 #include "gpu/command_buffer/service/context_group.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 max_cube_map_texture_size = std::min( 173 max_cube_map_texture_size = std::min(
174 max_cube_map_texture_size, 174 max_cube_map_texture_size,
175 feature_info_->workarounds().max_cube_map_texture_size); 175 feature_info_->workarounds().max_cube_map_texture_size);
176 } 176 }
177 177
178 texture_manager_.reset(new TextureManager(memory_tracker_.get(), 178 texture_manager_.reset(new TextureManager(memory_tracker_.get(),
179 feature_info_.get(), 179 feature_info_.get(),
180 max_texture_size, 180 max_texture_size,
181 max_cube_map_texture_size)); 181 max_cube_map_texture_size));
182 texture_manager_->set_framebuffer_manager(framebuffer_manager_.get()); 182 texture_manager_->set_framebuffer_manager(framebuffer_manager_.get());
183 texture_manager_->set_use_default_textures(bind_generates_resource_);
piman 2014/04/04 02:50:28 Could we pass this to the constructor? It's not li
vmiura 2014/04/04 18:32:57 There are many tests that construct this, so origi
183 184
184 const GLint kMinTextureImageUnits = 8; 185 const GLint kMinTextureImageUnits = 8;
185 const GLint kMinVertexTextureImageUnits = 0; 186 const GLint kMinVertexTextureImageUnits = 0;
186 if (!QueryGLFeatureU( 187 if (!QueryGLFeatureU(
187 GL_MAX_TEXTURE_IMAGE_UNITS, kMinTextureImageUnits, 188 GL_MAX_TEXTURE_IMAGE_UNITS, kMinTextureImageUnits,
188 &max_texture_image_units_) || 189 &max_texture_image_units_) ||
189 !QueryGLFeatureU( 190 !QueryGLFeatureU(
190 GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS, kMinVertexTextureImageUnits, 191 GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS, kMinVertexTextureImageUnits,
191 &max_vertex_texture_image_units_)) { 192 &max_vertex_texture_image_units_)) {
192 LOG(ERROR) << "ContextGroup::Initialize failed because too few " 193 LOG(ERROR) << "ContextGroup::Initialize failed because too few "
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 GLenum pname, GLint min_required, uint32* v) { 381 GLenum pname, GLint min_required, uint32* v) {
381 uint32 value = 0; 382 uint32 value = 0;
382 GetIntegerv(pname, &value); 383 GetIntegerv(pname, &value);
383 bool result = CheckGLFeatureU(min_required, &value); 384 bool result = CheckGLFeatureU(min_required, &value);
384 *v = value; 385 *v = value;
385 return result; 386 return result;
386 } 387 }
387 388
388 } // namespace gles2 389 } // namespace gles2
389 } // namespace gpu 390 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698