OLD | NEW |
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" |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 } else { | 96 } else { |
97 GetIntegerv( | 97 GetIntegerv( |
98 GL_MAX_FRAGMENT_UNIFORM_COMPONENTS, &max_fragment_uniform_vectors_); | 98 GL_MAX_FRAGMENT_UNIFORM_COMPONENTS, &max_fragment_uniform_vectors_); |
99 max_fragment_uniform_vectors_ /= 4; | 99 max_fragment_uniform_vectors_ /= 4; |
100 GetIntegerv(GL_MAX_VARYING_FLOATS, &max_varying_vectors_); | 100 GetIntegerv(GL_MAX_VARYING_FLOATS, &max_varying_vectors_); |
101 max_varying_vectors_ /= 4; | 101 max_varying_vectors_ /= 4; |
102 GetIntegerv(GL_MAX_VERTEX_UNIFORM_COMPONENTS, &max_vertex_uniform_vectors_); | 102 GetIntegerv(GL_MAX_VERTEX_UNIFORM_COMPONENTS, &max_vertex_uniform_vectors_); |
103 max_vertex_uniform_vectors_ /= 4; | 103 max_vertex_uniform_vectors_ /= 4; |
104 } | 104 } |
105 | 105 |
106 if (!texture_manager_->Initialize()) { | 106 if (!texture_manager_->Initialize(feature_info())) { |
107 LOG(ERROR) << "Context::Group::Initialize failed because texture manager " | 107 LOG(ERROR) << "Context::Group::Initialize failed because texture manager " |
108 << "failed to initialize."; | 108 << "failed to initialize."; |
109 return false; | 109 return false; |
110 } | 110 } |
111 | 111 |
112 initialized_ = true; | 112 initialized_ = true; |
113 return true; | 113 return true; |
114 } | 114 } |
115 | 115 |
116 void ContextGroup::Destroy() { | 116 void ContextGroup::Destroy() { |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 } | 152 } |
153 IdAllocator* id_allocator = new IdAllocator(); | 153 IdAllocator* id_allocator = new IdAllocator(); |
154 id_namespaces_[namespace_id] = linked_ptr<IdAllocator>(id_allocator); | 154 id_namespaces_[namespace_id] = linked_ptr<IdAllocator>(id_allocator); |
155 return id_allocator; | 155 return id_allocator; |
156 } | 156 } |
157 | 157 |
158 } // namespace gles2 | 158 } // namespace gles2 |
159 } // namespace gpu | 159 } // namespace gpu |
160 | 160 |
161 | 161 |
OLD | NEW |