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

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

Issue 23660006: FeatureInfo: Remove allowed_extensions and init workarounds early (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix android_webview build Created 7 years, 3 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) 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 } 70 }
71 71
72 static void GetIntegerv(GLenum pname, uint32* var) { 72 static void GetIntegerv(GLenum pname, uint32* var) {
73 GLint value = 0; 73 GLint value = 0;
74 glGetIntegerv(pname, &value); 74 glGetIntegerv(pname, &value);
75 *var = value; 75 *var = value;
76 } 76 }
77 77
78 bool ContextGroup::Initialize( 78 bool ContextGroup::Initialize(
79 GLES2Decoder* decoder, 79 GLES2Decoder* decoder,
80 const DisallowedFeatures& disallowed_features, 80 const DisallowedFeatures& disallowed_features) {
81 const char* allowed_features) {
82 // If we've already initialized the group just add the context. 81 // If we've already initialized the group just add the context.
83 if (HaveContexts()) { 82 if (HaveContexts()) {
84 decoders_.push_back(base::AsWeakPtr<GLES2Decoder>(decoder)); 83 decoders_.push_back(base::AsWeakPtr<GLES2Decoder>(decoder));
85 return true; 84 return true;
86 } 85 }
87 86
88 if (!feature_info_->Initialize(disallowed_features, allowed_features)) { 87 if (!feature_info_->Initialize(disallowed_features)) {
89 LOG(ERROR) << "ContextGroup::Initialize failed because FeatureInfo " 88 LOG(ERROR) << "ContextGroup::Initialize failed because FeatureInfo "
90 << "initialization failed."; 89 << "initialization failed.";
91 return false; 90 return false;
92 } 91 }
93 92
94 const GLint kMinRenderbufferSize = 512; // GL says 1 pixel! 93 const GLint kMinRenderbufferSize = 512; // GL says 1 pixel!
95 GLint max_renderbuffer_size = 0; 94 GLint max_renderbuffer_size = 0;
96 if (!QueryGLFeature( 95 if (!QueryGLFeature(
97 GL_MAX_RENDERBUFFER_SIZE, kMinRenderbufferSize, 96 GL_MAX_RENDERBUFFER_SIZE, kMinRenderbufferSize,
98 &max_renderbuffer_size)) { 97 &max_renderbuffer_size)) {
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 GLenum pname, GLint min_required, uint32* v) { 376 GLenum pname, GLint min_required, uint32* v) {
378 uint32 value = 0; 377 uint32 value = 0;
379 GetIntegerv(pname, &value); 378 GetIntegerv(pname, &value);
380 bool result = CheckGLFeatureU(min_required, &value); 379 bool result = CheckGLFeatureU(min_required, &value);
381 *v = value; 380 *v = value;
382 return result; 381 return result;
383 } 382 }
384 383
385 } // namespace gles2 384 } // namespace gles2
386 } // namespace gpu 385 } // namespace gpu
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