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

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

Issue 7633060: Add option to not generate resources on bind in OpenGL ES (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nacl fix Created 9 years, 4 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "gpu/command_buffer/common/id_allocator.h" 6 #include "gpu/command_buffer/common/id_allocator.h"
7 #include "gpu/command_buffer/service/buffer_manager.h" 7 #include "gpu/command_buffer/service/buffer_manager.h"
8 #include "gpu/command_buffer/service/framebuffer_manager.h" 8 #include "gpu/command_buffer/service/framebuffer_manager.h"
9 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" 9 #include "gpu/command_buffer/service/gles2_cmd_decoder.h"
10 #include "gpu/command_buffer/service/program_manager.h" 10 #include "gpu/command_buffer/service/program_manager.h"
11 #include "gpu/command_buffer/service/renderbuffer_manager.h" 11 #include "gpu/command_buffer/service/renderbuffer_manager.h"
12 #include "gpu/command_buffer/service/shader_manager.h" 12 #include "gpu/command_buffer/service/shader_manager.h"
13 #include "gpu/command_buffer/service/texture_manager.h" 13 #include "gpu/command_buffer/service/texture_manager.h"
14 #include "ui/gfx/gl/gl_implementation.h" 14 #include "ui/gfx/gl/gl_implementation.h"
15 15
16 namespace gpu { 16 namespace gpu {
17 namespace gles2 { 17 namespace gles2 {
18 18
19 ContextGroup::ContextGroup() 19 ContextGroup::ContextGroup(bool bind_generates_resource)
20 : initialized_(false), 20 : initialized_(false),
21 have_context_(true), 21 have_context_(true),
22 bind_generates_resource_(bind_generates_resource),
22 max_vertex_attribs_(0u), 23 max_vertex_attribs_(0u),
23 max_texture_units_(0u), 24 max_texture_units_(0u),
24 max_texture_image_units_(0u), 25 max_texture_image_units_(0u),
25 max_vertex_texture_image_units_(0u), 26 max_vertex_texture_image_units_(0u),
26 max_fragment_uniform_vectors_(0u), 27 max_fragment_uniform_vectors_(0u),
27 max_varying_vectors_(0u), 28 max_varying_vectors_(0u),
28 max_vertex_uniform_vectors_(0u) { 29 max_vertex_uniform_vectors_(0u) {
29 id_namespaces_[id_namespaces::kBuffers].reset(new IdAllocator); 30 id_namespaces_[id_namespaces::kBuffers].reset(new IdAllocator);
30 id_namespaces_[id_namespaces::kFramebuffers].reset(new IdAllocator); 31 id_namespaces_[id_namespaces::kFramebuffers].reset(new IdAllocator);
31 id_namespaces_[id_namespaces::kProgramsAndShaders].reset( 32 id_namespaces_[id_namespaces::kProgramsAndShaders].reset(
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 if (namespace_id >= arraysize(id_namespaces_)) 155 if (namespace_id >= arraysize(id_namespaces_))
155 return NULL; 156 return NULL;
156 157
157 return id_namespaces_[namespace_id].get(); 158 return id_namespaces_[namespace_id].get();
158 } 159 }
159 160
160 } // namespace gles2 161 } // namespace gles2
161 } // namespace gpu 162 } // namespace gpu
162 163
163 164
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/context_group.h ('k') | gpu/command_buffer/service/context_group_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698