| 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 27 matching lines...) Expand all Loading... |
| 38 ContextGroup::~ContextGroup() { | 38 ContextGroup::~ContextGroup() { |
| 39 Destroy(); | 39 Destroy(); |
| 40 } | 40 } |
| 41 | 41 |
| 42 static void GetIntegerv(GLenum pname, uint32* var) { | 42 static void GetIntegerv(GLenum pname, uint32* var) { |
| 43 GLint value = 0; | 43 GLint value = 0; |
| 44 glGetIntegerv(pname, &value); | 44 glGetIntegerv(pname, &value); |
| 45 *var = value; | 45 *var = value; |
| 46 } | 46 } |
| 47 | 47 |
| 48 bool ContextGroup::Initialize(const DisallowedExtensions& disallowed_extensions, | 48 bool ContextGroup::Initialize(const DisallowedFeatures& disallowed_features, |
| 49 const char* allowed_features) { | 49 const char* allowed_features) { |
| 50 if (initialized_) { | 50 if (initialized_) { |
| 51 return true; | 51 return true; |
| 52 } | 52 } |
| 53 | 53 |
| 54 if (!feature_info_.Initialize(disallowed_extensions, allowed_features)) { | 54 if (!feature_info_.Initialize(disallowed_features, allowed_features)) { |
| 55 LOG(ERROR) << "ContextGroup::Initialize failed because FeatureInfo " | 55 LOG(ERROR) << "ContextGroup::Initialize failed because FeatureInfo " |
| 56 << "initialization failed."; | 56 << "initialization failed."; |
| 57 return false; | 57 return false; |
| 58 } | 58 } |
| 59 | 59 |
| 60 GLint max_renderbuffer_size = 0; | 60 GLint max_renderbuffer_size = 0; |
| 61 glGetIntegerv(GL_MAX_RENDERBUFFER_SIZE, &max_renderbuffer_size); | 61 glGetIntegerv(GL_MAX_RENDERBUFFER_SIZE, &max_renderbuffer_size); |
| 62 | 62 |
| 63 buffer_manager_.reset(new BufferManager()); | 63 buffer_manager_.reset(new BufferManager()); |
| 64 framebuffer_manager_.reset(new FramebufferManager()); | 64 framebuffer_manager_.reset(new FramebufferManager()); |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 if (namespace_id >= arraysize(id_namespaces_)) | 155 if (namespace_id >= arraysize(id_namespaces_)) |
| 156 return NULL; | 156 return NULL; |
| 157 | 157 |
| 158 return id_namespaces_[namespace_id].get(); | 158 return id_namespaces_[namespace_id].get(); |
| 159 } | 159 } |
| 160 | 160 |
| 161 } // namespace gles2 | 161 } // namespace gles2 |
| 162 } // namespace gpu | 162 } // namespace gpu |
| 163 | 163 |
| 164 | 164 |
| OLD | NEW |