| OLD | NEW |
| 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 <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
| (...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 565 disabled_exts_); | 565 disabled_exts_); |
| 566 filtered_exts_ = base::SplitString( | 566 filtered_exts_ = base::SplitString( |
| 567 filtered_exts_str_, " ", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 567 filtered_exts_str_, " ", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
| 568 } else { | 568 } else { |
| 569 GLint num_extensions = 0; | 569 GLint num_extensions = 0; |
| 570 GLApiBase::glGetIntegervFn(GL_NUM_EXTENSIONS, &num_extensions); | 570 GLApiBase::glGetIntegervFn(GL_NUM_EXTENSIONS, &num_extensions); |
| 571 for (GLint i = 0; i < num_extensions; ++i) { | 571 for (GLint i = 0; i < num_extensions; ++i) { |
| 572 const char* gl_extension = reinterpret_cast<const char*>( | 572 const char* gl_extension = reinterpret_cast<const char*>( |
| 573 GLApiBase::glGetStringiFn(GL_EXTENSIONS, i)); | 573 GLApiBase::glGetStringiFn(GL_EXTENSIONS, i)); |
| 574 DCHECK(gl_extension != NULL); | 574 DCHECK(gl_extension != NULL); |
| 575 if (!ContainsValue(disabled_exts_, gl_extension)) | 575 if (!base::ContainsValue(disabled_exts_, gl_extension)) |
| 576 filtered_exts_.push_back(gl_extension); | 576 filtered_exts_.push_back(gl_extension); |
| 577 } | 577 } |
| 578 filtered_exts_str_ = base::JoinString(filtered_exts_, " "); | 578 filtered_exts_str_ = base::JoinString(filtered_exts_, " "); |
| 579 } | 579 } |
| 580 #if DCHECK_IS_ON() | 580 #if DCHECK_IS_ON() |
| 581 filtered_exts_initialized_ = true; | 581 filtered_exts_initialized_ = true; |
| 582 #endif | 582 #endif |
| 583 } | 583 } |
| 584 } | 584 } |
| 585 | 585 |
| 586 TraceGLApi::~TraceGLApi() { | 586 TraceGLApi::~TraceGLApi() { |
| 587 } | 587 } |
| 588 | 588 |
| 589 NoContextGLApi::NoContextGLApi() { | 589 NoContextGLApi::NoContextGLApi() { |
| 590 } | 590 } |
| 591 | 591 |
| 592 NoContextGLApi::~NoContextGLApi() { | 592 NoContextGLApi::~NoContextGLApi() { |
| 593 } | 593 } |
| 594 | 594 |
| 595 } // namespace gl | 595 } // namespace gl |
| OLD | NEW |