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

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

Issue 6623063: Connect up --disable-gl-multisampling to command buffer (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 9 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "app/gfx/gl/gl_implementation.h" 5 #include "app/gfx/gl/gl_implementation.h"
6 #include "gpu/command_buffer/service/context_group.h" 6 #include "gpu/command_buffer/service/context_group.h"
7 #include "gpu/command_buffer/common/id_allocator.h" 7 #include "gpu/command_buffer/common/id_allocator.h"
8 #include "gpu/command_buffer/service/buffer_manager.h" 8 #include "gpu/command_buffer/service/buffer_manager.h"
9 #include "gpu/command_buffer/service/framebuffer_manager.h" 9 #include "gpu/command_buffer/service/framebuffer_manager.h"
10 #include "gpu/command_buffer/service/gles2_cmd_decoder.h"
10 #include "gpu/command_buffer/service/program_manager.h" 11 #include "gpu/command_buffer/service/program_manager.h"
11 #include "gpu/command_buffer/service/renderbuffer_manager.h" 12 #include "gpu/command_buffer/service/renderbuffer_manager.h"
12 #include "gpu/command_buffer/service/shader_manager.h" 13 #include "gpu/command_buffer/service/shader_manager.h"
13 #include "gpu/command_buffer/service/texture_manager.h" 14 #include "gpu/command_buffer/service/texture_manager.h"
14 #include "gpu/GLES2/gles2_command_buffer.h" 15 #include "gpu/GLES2/gles2_command_buffer.h"
15 16
16 namespace gpu { 17 namespace gpu {
17 namespace gles2 { 18 namespace gles2 {
18 19
19 ContextGroup::ContextGroup() 20 ContextGroup::ContextGroup()
(...skipping 11 matching lines...) Expand all
31 ContextGroup::~ContextGroup() { 32 ContextGroup::~ContextGroup() {
32 Destroy(); 33 Destroy();
33 } 34 }
34 35
35 static void GetIntegerv(GLenum pname, uint32* var) { 36 static void GetIntegerv(GLenum pname, uint32* var) {
36 GLint value = 0; 37 GLint value = 0;
37 glGetIntegerv(pname, &value); 38 glGetIntegerv(pname, &value);
38 *var = value; 39 *var = value;
39 } 40 }
40 41
41 bool ContextGroup::Initialize(const char* allowed_features) { 42 bool ContextGroup::Initialize(const DisallowedExtensions& extensions,
43 const char* allowed_features) {
42 if (initialized_) { 44 if (initialized_) {
43 return true; 45 return true;
44 } 46 }
45 47
46 if (!feature_info_.Initialize(allowed_features)) { 48 if (!feature_info_.Initialize(extensions, allowed_features)) {
47 LOG(ERROR) << "ContextGroup::Initialize failed because FeatureInfo " 49 LOG(ERROR) << "ContextGroup::Initialize failed because FeatureInfo "
48 << "initialization failed."; 50 << "initialization failed.";
49 return false; 51 return false;
50 } 52 }
51 53
52 GLint max_renderbuffer_size = 0; 54 GLint max_renderbuffer_size = 0;
53 glGetIntegerv(GL_MAX_RENDERBUFFER_SIZE, &max_renderbuffer_size); 55 glGetIntegerv(GL_MAX_RENDERBUFFER_SIZE, &max_renderbuffer_size);
54 56
55 buffer_manager_.reset(new BufferManager()); 57 buffer_manager_.reset(new BufferManager());
56 framebuffer_manager_.reset(new FramebufferManager()); 58 framebuffer_manager_.reset(new FramebufferManager());
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 } 152 }
151 IdAllocator* id_allocator = new IdAllocator(); 153 IdAllocator* id_allocator = new IdAllocator();
152 id_namespaces_[namespace_id] = linked_ptr<IdAllocator>(id_allocator); 154 id_namespaces_[namespace_id] = linked_ptr<IdAllocator>(id_allocator);
153 return id_allocator; 155 return id_allocator;
154 } 156 }
155 157
156 } // namespace gles2 158 } // namespace gles2
157 } // namespace gpu 159 } // namespace gpu
158 160
159 161
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698