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

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

Issue 2758173003: Expose GL_VENDOR/GL_RENDERER strings to internal clients of GPU command buffer. (Closed)
Patch Set: Created 3 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
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/gles2_cmd_decoder.h" 5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h"
6 6
7 #include <limits.h> 7 #include <limits.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 #include <stdio.h> 10 #include <stdio.h>
(...skipping 12353 matching lines...) Expand 10 before | Expand all | Expand 10 after
12364 12364
12365 const char* str = nullptr; 12365 const char* str = nullptr;
12366 std::string extensions; 12366 std::string extensions;
12367 switch (name) { 12367 switch (name) {
12368 case GL_VERSION: 12368 case GL_VERSION:
12369 str = GetServiceVersionString(feature_info_.get()); 12369 str = GetServiceVersionString(feature_info_.get());
12370 break; 12370 break;
12371 case GL_SHADING_LANGUAGE_VERSION: 12371 case GL_SHADING_LANGUAGE_VERSION:
12372 str = GetServiceShadingLanguageVersionString(feature_info_.get()); 12372 str = GetServiceShadingLanguageVersionString(feature_info_.get());
12373 break; 12373 break;
12374 case GL_RENDERER:
Zhenyao Mo 2017/03/20 18:27:56 Note we remove the special handling, and they just
12375 str = GetServiceRendererString(feature_info_.get());
12376 break;
12377 case GL_VENDOR:
12378 str = GetServiceVendorString(feature_info_.get());
12379 break;
12380 break;
12381 case GL_EXTENSIONS: 12374 case GL_EXTENSIONS:
12382 { 12375 {
12383 // For WebGL contexts, strip out shader extensions if they have not 12376 // For WebGL contexts, strip out shader extensions if they have not
12384 // been enabled on WebGL1 or no longer exist (become core) in WebGL2. 12377 // been enabled on WebGL1 or no longer exist (become core) in WebGL2.
12385 if (feature_info_->IsWebGLContext()) { 12378 if (feature_info_->IsWebGLContext()) {
12386 extensions = feature_info_->extensions(); 12379 extensions = feature_info_->extensions();
12387 if (!derivatives_explicitly_enabled_) { 12380 if (!derivatives_explicitly_enabled_) {
12388 size_t offset = extensions.find(kOESDerivativeExtension); 12381 size_t offset = extensions.find(kOESDerivativeExtension);
12389 if (std::string::npos != offset) { 12382 if (std::string::npos != offset) {
12390 extensions.replace(offset, arraysize(kOESDerivativeExtension), 12383 extensions.replace(offset, arraysize(kOESDerivativeExtension),
(...skipping 6998 matching lines...) Expand 10 before | Expand all | Expand 10 after
19389 } 19382 }
19390 19383
19391 // Include the auto-generated part of this file. We split this because it means 19384 // Include the auto-generated part of this file. We split this because it means
19392 // we can easily edit the non-auto generated parts right here in this file 19385 // we can easily edit the non-auto generated parts right here in this file
19393 // instead of having to edit some template or the code generator. 19386 // instead of having to edit some template or the code generator.
19394 #include "base/macros.h" 19387 #include "base/macros.h"
19395 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" 19388 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h"
19396 19389
19397 } // namespace gles2 19390 } // namespace gles2
19398 } // namespace gpu 19391 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gl_utils.cc ('k') | gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698