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

Side by Side Diff: ui/gl/gl_gl_api_implementation.cc

Issue 1278973003: Revert of Update SplitString calls to new form (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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
« no previous file with comments | « ui/gfx/render_text_unittest.cc ('k') | ui/gl/gl_implementation.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ui/gl/gl_gl_api_implementation.h" 5 #include "ui/gl/gl_gl_api_implementation.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 } 473 }
474 474
475 void RealGLApi::InitializeFilteredExtensions() { 475 void RealGLApi::InitializeFilteredExtensions() {
476 if (disabled_exts_.size()) { 476 if (disabled_exts_.size()) {
477 filtered_exts_.clear(); 477 filtered_exts_.clear();
478 if (gfx::WillUseGLGetStringForExtensions()) { 478 if (gfx::WillUseGLGetStringForExtensions()) {
479 filtered_exts_str_ = 479 filtered_exts_str_ =
480 FilterGLExtensionList(reinterpret_cast<const char*>( 480 FilterGLExtensionList(reinterpret_cast<const char*>(
481 GLApiBase::glGetStringFn(GL_EXTENSIONS)), 481 GLApiBase::glGetStringFn(GL_EXTENSIONS)),
482 disabled_exts_); 482 disabled_exts_);
483 filtered_exts_ = base::SplitString( 483 base::SplitString(filtered_exts_str_, ' ', &filtered_exts_);
484 filtered_exts_str_, " ", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
485 } else { 484 } else {
486 GLint num_extensions = 0; 485 GLint num_extensions = 0;
487 GLApiBase::glGetIntegervFn(GL_NUM_EXTENSIONS, &num_extensions); 486 GLApiBase::glGetIntegervFn(GL_NUM_EXTENSIONS, &num_extensions);
488 for (GLint i = 0; i < num_extensions; ++i) { 487 for (GLint i = 0; i < num_extensions; ++i) {
489 const char* gl_extension = reinterpret_cast<const char*>( 488 const char* gl_extension = reinterpret_cast<const char*>(
490 GLApiBase::glGetStringiFn(GL_EXTENSIONS, i)); 489 GLApiBase::glGetStringiFn(GL_EXTENSIONS, i));
491 DCHECK(gl_extension != NULL); 490 DCHECK(gl_extension != NULL);
492 if (std::find(disabled_exts_.begin(), disabled_exts_.end(), 491 if (std::find(disabled_exts_.begin(), disabled_exts_.end(),
493 gl_extension) == disabled_exts_.end()) { 492 gl_extension) == disabled_exts_.end()) {
494 filtered_exts_.push_back(gl_extension); 493 filtered_exts_.push_back(gl_extension);
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 ScopedSetGLToRealGLApi::ScopedSetGLToRealGLApi() 616 ScopedSetGLToRealGLApi::ScopedSetGLToRealGLApi()
618 : old_gl_api_(GetCurrentGLApi()) { 617 : old_gl_api_(GetCurrentGLApi()) {
619 SetGLToRealGLApi(); 618 SetGLToRealGLApi();
620 } 619 }
621 620
622 ScopedSetGLToRealGLApi::~ScopedSetGLToRealGLApi() { 621 ScopedSetGLToRealGLApi::~ScopedSetGLToRealGLApi() {
623 SetGLApi(old_gl_api_); 622 SetGLApi(old_gl_api_);
624 } 623 }
625 624
626 } // namespace gfx 625 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/render_text_unittest.cc ('k') | ui/gl/gl_implementation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698