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 <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 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
408 void RealGLApi::Initialize(DriverGL* driver) { | 408 void RealGLApi::Initialize(DriverGL* driver) { |
409 InitializeWithCommandLine(driver, base::CommandLine::ForCurrentProcess()); | 409 InitializeWithCommandLine(driver, base::CommandLine::ForCurrentProcess()); |
410 } | 410 } |
411 | 411 |
412 void RealGLApi::InitializeWithCommandLine(DriverGL* driver, | 412 void RealGLApi::InitializeWithCommandLine(DriverGL* driver, |
413 base::CommandLine* command_line) { | 413 base::CommandLine* command_line) { |
414 DCHECK(command_line); | 414 DCHECK(command_line); |
415 InitializeBase(driver); | 415 InitializeBase(driver); |
416 | 416 |
417 const std::string disabled_extensions = command_line->GetSwitchValueASCII( | 417 const std::string disabled_extensions = command_line->GetSwitchValueASCII( |
418 switches::kDisableGLExtensions); | 418 switches::kDisableExtensions); |
419 if (!disabled_extensions.empty()) { | 419 if (!disabled_extensions.empty()) { |
420 Tokenize(disabled_extensions, ", ;", &disabled_exts_); | 420 Tokenize(disabled_extensions, ", ;", &disabled_exts_); |
421 } | 421 } |
422 } | 422 } |
423 | 423 |
424 void RealGLApi::InitializeWithContext() { | 424 void RealGLApi::InitializeWithContext() { |
425 InitializeFilteredExtensions(); | 425 InitializeFilteredExtensions(); |
426 } | 426 } |
427 | 427 |
428 void RealGLApi::glGetIntegervFn(GLenum pname, GLint* params) { | 428 void RealGLApi::glGetIntegervFn(GLenum pname, GLint* params) { |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
609 ScopedSetGLToRealGLApi::ScopedSetGLToRealGLApi() | 609 ScopedSetGLToRealGLApi::ScopedSetGLToRealGLApi() |
610 : old_gl_api_(GetCurrentGLApi()) { | 610 : old_gl_api_(GetCurrentGLApi()) { |
611 SetGLToRealGLApi(); | 611 SetGLToRealGLApi(); |
612 } | 612 } |
613 | 613 |
614 ScopedSetGLToRealGLApi::~ScopedSetGLToRealGLApi() { | 614 ScopedSetGLToRealGLApi::~ScopedSetGLToRealGLApi() { |
615 SetGLApi(old_gl_api_); | 615 SetGLApi(old_gl_api_); |
616 } | 616 } |
617 | 617 |
618 } // namespace gfx | 618 } // namespace gfx |
OLD | NEW |