diff options
author | avi <avi@chromium.org> | 2014-12-22 15:49:53 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-12-22 23:50:37 +0000 |
commit | 9ab037205876578d14c5686f491c37bab680eccb (patch) | |
tree | 0ab316d7023d4e6bc6243734f5407ac01a8a8f06 /gpu | |
parent | fdb146cf261d909613a1d1b11e70d0ba96280ffe (diff) | |
download | chromium_src-9ab037205876578d14c5686f491c37bab680eccb.zip chromium_src-9ab037205876578d14c5686f491c37bab680eccb.tar.gz chromium_src-9ab037205876578d14c5686f491c37bab680eccb.tar.bz2 |
Make callers of CommandLine use it via the base:: namespace.
Covers courgette/, dbus/, device/, extensions/, gin/, google_apis/, and gpu/.
BUG=422426
TEST=none
TBR=ben@chromium.org
Review URL: https://codereview.chromium.org/819193002
Cr-Commit-Position: refs/heads/master@{#309490}
Diffstat (limited to 'gpu')
30 files changed, 70 insertions, 64 deletions
diff --git a/gpu/angle_end2end_tests_main.cc b/gpu/angle_end2end_tests_main.cc index a611a7c..24bd9b5 100644 --- a/gpu/angle_end2end_tests_main.cc +++ b/gpu/angle_end2end_tests_main.cc @@ -22,7 +22,7 @@ int RunHelper(base::TestSuite* test_suite) { } // namespace int main(int argc, char** argv) { - CommandLine::Init(argc, argv); + base::CommandLine::Init(argc, argv); testing::InitGoogleMock(&argc, argv); testing::AddGlobalTestEnvironment(new ANGLETestEnvironment()); base::TestSuite test_suite(argc, argv); diff --git a/gpu/angle_unittest_main.cc b/gpu/angle_unittest_main.cc index e7667f6..7187829 100644 --- a/gpu/angle_unittest_main.cc +++ b/gpu/angle_unittest_main.cc @@ -22,7 +22,7 @@ int RunHelper(base::TestSuite* test_suite) { } // namespace int main(int argc, char** argv) { - CommandLine::Init(argc, argv); + base::CommandLine::Init(argc, argv); testing::InitGoogleMock(&argc, argv); ShInitialize(); base::TestSuite test_suite(argc, argv); diff --git a/gpu/command_buffer/client/gles2_implementation.cc b/gpu/command_buffer/client/gles2_implementation.cc index 88b9c72..ccbb457 100644 --- a/gpu/command_buffer/client/gles2_implementation.cc +++ b/gpu/command_buffer/client/gles2_implementation.cc @@ -111,7 +111,7 @@ GLES2Implementation::GLES2Implementation( this_in_hex_ = ss.str(); GPU_CLIENT_LOG_CODE_BLOCK({ - debug_ = CommandLine::ForCurrentProcess()->HasSwitch( + debug_ = base::CommandLine::ForCurrentProcess()->HasSwitch( switches::kEnableGPUClientLogging); }); diff --git a/gpu/command_buffer/common/unittest_main.cc b/gpu/command_buffer/common/unittest_main.cc index 2d6a2d1..874bae7 100644 --- a/gpu/command_buffer/common/unittest_main.cc +++ b/gpu/command_buffer/common/unittest_main.cc @@ -32,7 +32,7 @@ int main(int argc, char** argv) { #if !defined(OS_ANDROID) base::AtExitManager exit_manager; #endif - CommandLine::Init(argc, argv); + base::CommandLine::Init(argc, argv); testing::InitGoogleMock(&argc, argv); return base::LaunchUnitTests(argc, argv, diff --git a/gpu/command_buffer/service/async_pixel_transfer_manager_linux.cc b/gpu/command_buffer/service/async_pixel_transfer_manager_linux.cc index 8d25f00..b2be97d 100644 --- a/gpu/command_buffer/service/async_pixel_transfer_manager_linux.cc +++ b/gpu/command_buffer/service/async_pixel_transfer_manager_linux.cc @@ -17,7 +17,7 @@ namespace gpu { AsyncPixelTransferManager* AsyncPixelTransferManager::Create( gfx::GLContext* context) { TRACE_EVENT0("gpu", "AsyncPixelTransferManager::Create"); - if (CommandLine::ForCurrentProcess()->HasSwitch( + if (base::CommandLine::ForCurrentProcess()->HasSwitch( switches::kEnableShareGroupAsyncTextureUpload)) { DCHECK(context); return static_cast<AsyncPixelTransferManager*> ( diff --git a/gpu/command_buffer/service/context_group.cc b/gpu/command_buffer/service/context_group.cc index 9b46b024..e9af883 100644 --- a/gpu/command_buffer/service/context_group.cc +++ b/gpu/command_buffer/service/context_group.cc @@ -40,7 +40,7 @@ ContextGroup::ContextGroup( shader_translator_cache_(shader_translator_cache), subscription_ref_set_(subscription_ref_set), pending_valuebuffer_state_(pending_valuebuffer_state), - enforce_gl_minimums_(CommandLine::ForCurrentProcess()->HasSwitch( + enforce_gl_minimums_(base::CommandLine::ForCurrentProcess()->HasSwitch( switches::kEnforceGLMinimums)), bind_generates_resource_(bind_generates_resource), max_vertex_attribs_(0u), diff --git a/gpu/command_buffer/service/feature_info.cc b/gpu/command_buffer/service/feature_info.cc index e5df2eb..a225478 100644 --- a/gpu/command_buffer/service/feature_info.cc +++ b/gpu/command_buffer/service/feature_info.cc @@ -161,14 +161,14 @@ FeatureInfo::Workarounds::Workarounds() : } FeatureInfo::FeatureInfo() { - InitializeBasicState(*CommandLine::ForCurrentProcess()); + InitializeBasicState(*base::CommandLine::ForCurrentProcess()); } -FeatureInfo::FeatureInfo(const CommandLine& command_line) { +FeatureInfo::FeatureInfo(const base::CommandLine& command_line) { InitializeBasicState(command_line); } -void FeatureInfo::InitializeBasicState(const CommandLine& command_line) { +void FeatureInfo::InitializeBasicState(const base::CommandLine& command_line) { if (command_line.HasSwitch(switches::kGpuDriverBugWorkarounds)) { std::string types = command_line.GetSwitchValueASCII( switches::kGpuDriverBugWorkarounds); diff --git a/gpu/command_buffer/service/feature_info_unittest.cc b/gpu/command_buffer/service/feature_info_unittest.cc index 06f3d11..f5440e0 100644 --- a/gpu/command_buffer/service/feature_info_unittest.cc +++ b/gpu/command_buffer/service/feature_info_unittest.cc @@ -54,13 +54,14 @@ class FeatureInfoTest : public GpuServiceTest { info_->Initialize(); } - void SetupWithCommandLine(const CommandLine& command_line) { + void SetupWithCommandLine(const base::CommandLine& command_line) { GpuServiceTest::SetUp(); info_ = new FeatureInfo(command_line); } void SetupInitExpectationsWithCommandLine( - const char* extensions, const CommandLine& command_line) { + const char* extensions, + const base::CommandLine& command_line) { GpuServiceTest::SetUpWithGLVersion("2.0", extensions); TestHelper::SetupFeatureInfoInitExpectationsWithGLVersion( gl_.get(), extensions, "", ""); @@ -1210,7 +1211,7 @@ TEST_F(FeatureInfoTest, InitializeOES_element_index_uint) { } TEST_F(FeatureInfoTest, InitializeVAOsWithClientSideArrays) { - CommandLine command_line(0, NULL); + base::CommandLine command_line(0, NULL); command_line.AppendSwitchASCII( switches::kGpuDriverBugWorkarounds, base::IntToString(gpu::USE_CLIENT_SIDE_ARRAYS_FOR_STREAM_BUFFERS)); @@ -1302,7 +1303,7 @@ TEST_F(FeatureInfoTest, InitializeWithoutSamplers) { } TEST_F(FeatureInfoTest, ParseDriverBugWorkaroundsSingle) { - CommandLine command_line(0, NULL); + base::CommandLine command_line(0, NULL); command_line.AppendSwitchASCII( switches::kGpuDriverBugWorkarounds, base::IntToString(gpu::EXIT_ON_CONTEXT_LOST)); @@ -1312,7 +1313,7 @@ TEST_F(FeatureInfoTest, ParseDriverBugWorkaroundsSingle) { } TEST_F(FeatureInfoTest, ParseDriverBugWorkaroundsMultiple) { - CommandLine command_line(0, NULL); + base::CommandLine command_line(0, NULL); command_line.AppendSwitchASCII( switches::kGpuDriverBugWorkarounds, base::IntToString(gpu::EXIT_ON_CONTEXT_LOST) + "," + @@ -1351,7 +1352,7 @@ TEST_F(FeatureInfoTest, InitializeWithPreferredEXTDrawBuffers) { } TEST_F(FeatureInfoTest, ARBSyncDisabled) { - CommandLine command_line(0, NULL); + base::CommandLine command_line(0, NULL); command_line.AppendSwitchASCII( switches::kGpuDriverBugWorkarounds, base::IntToString(gpu::DISABLE_ARB_SYNC)); diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc index f55ff3b..9ad567a 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc @@ -2385,7 +2385,7 @@ GLES2DecoderImpl::GLES2DecoderImpl(ContextGroup* group) shader_texture_lod_explicitly_enabled_(false), compile_shader_always_succeeds_(false), lose_context_when_out_of_memory_(false), - service_logging_(CommandLine::ForCurrentProcess()->HasSwitch( + service_logging_(base::CommandLine::ForCurrentProcess()->HasSwitch( switches::kEnableGPUServiceLoggingGPU)), viewport_max_width_(0), viewport_max_height_(0), @@ -2417,7 +2417,7 @@ GLES2DecoderImpl::GLES2DecoderImpl(ContextGroup* group) // tests because GLES2DecoderWithShaderTest.GetShaderInfoLogValidArgs passes // the empty string to CompileShader and this is not a valid shader. if (gfx::GetGLImplementation() == gfx::kGLImplementationMockGL || - CommandLine::ForCurrentProcess()->HasSwitch( + base::CommandLine::ForCurrentProcess()->HasSwitch( switches::kDisableGLSLTranslator)) { use_shader_translator_ = false; } @@ -2443,23 +2443,24 @@ bool GLES2DecoderImpl::Initialize( gpu_tracer_.reset(new GPUTracer(this)); gpu_state_tracer_ = GPUStateTracer::Create(&state_); - if (CommandLine::ForCurrentProcess()->HasSwitch( - switches::kEnableGPUDebugging)) { + if (base::CommandLine::ForCurrentProcess()->HasSwitch( + switches::kEnableGPUDebugging)) { set_debug(true); } - if (CommandLine::ForCurrentProcess()->HasSwitch( - switches::kEnableGPUCommandLogging)) { + if (base::CommandLine::ForCurrentProcess()->HasSwitch( + switches::kEnableGPUCommandLogging)) { set_log_commands(true); } - if (CommandLine::ForCurrentProcess()->HasSwitch( - switches::kEnableUnsafeES3APIs)) { + if (base::CommandLine::ForCurrentProcess()->HasSwitch( + switches::kEnableUnsafeES3APIs)) { set_unsafe_es3_apis_enabled(true); } - compile_shader_always_succeeds_ = CommandLine::ForCurrentProcess()->HasSwitch( - switches::kCompileShaderAlwaysSucceeds); + compile_shader_always_succeeds_ = + base::CommandLine::ForCurrentProcess()->HasSwitch( + switches::kCompileShaderAlwaysSucceeds); // Take ownership of the context and surface. The surface can be replaced with // SetSurface. @@ -2960,8 +2961,8 @@ bool GLES2DecoderImpl::InitializeShaderTranslator() { if (workarounds().regenerate_struct_names) driver_bug_workarounds |= SH_REGENERATE_STRUCT_NAMES; - if (CommandLine::ForCurrentProcess()->HasSwitch( - switches::kEmulateShaderPrecision)) + if (base::CommandLine::ForCurrentProcess()->HasSwitch( + switches::kEmulateShaderPrecision)) resources.WEBGL_debug_shader_precision = true; vertex_translator_ = shader_translator_cache()->GetTranslator( diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc index ef37c90..390107f 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc @@ -57,7 +57,7 @@ using namespace cmds; void GLES2DecoderRGBBackbufferTest::SetUp() { // Test codepath with workaround clear_alpha_in_readpixels because // ReadPixelsEmulator emulates the incorrect driver behavior. - CommandLine command_line(0, NULL); + base::CommandLine command_line(0, NULL); command_line.AppendSwitchASCII( switches::kGpuDriverBugWorkarounds, base::IntToString(gpu::CLEAR_ALPHA_IN_READPIXELS)); diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_drawing.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_drawing.cc index 0bfefd4..baff353 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_drawing.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_drawing.cc @@ -858,7 +858,7 @@ TEST_P(GLES2DecoderWithShaderTest, DrawArraysValidAttributesSucceeds) { // Same as DrawArraysValidAttributesSucceeds, but with workaround // |init_vertex_attributes|. TEST_P(GLES2DecoderManualInitTest, InitVertexAttributes) { - CommandLine command_line(0, NULL); + base::CommandLine command_line(0, NULL); command_line.AppendSwitchASCII( switches::kGpuDriverBugWorkarounds, base::IntToString(gpu::INIT_VERTEX_ATTRIBUTES)); diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_programs.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_programs.cc index 05cb9ff..e663bdf 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_programs.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_programs.cc @@ -981,7 +981,7 @@ TEST_P(GLES2DecoderWithShaderTest, BindUniformLocationCHROMIUMBucket) { } TEST_P(GLES2DecoderManualInitTest, ClearUniformsBeforeFirstProgramUse) { - CommandLine command_line(0, NULL); + base::CommandLine command_line(0, NULL); command_line.AppendSwitchASCII( switches::kGpuDriverBugWorkarounds, base::IntToString(gpu::CLEAR_UNIFORMS_BEFORE_FIRST_PROGRAM_USE)); diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc index 82d5653..b0e8e8c 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc @@ -126,7 +126,7 @@ TEST_P(GLES2DecoderTest, GenerateMipmapClearsUnclearedTexture) { // Same as GenerateMipmapClearsUnclearedTexture, but with workaround // |set_texture_filters_before_generating_mipmap|. TEST_P(GLES2DecoderManualInitTest, SetTextureFiltersBeforeGenerateMipmap) { - CommandLine command_line(0, NULL); + base::CommandLine command_line(0, NULL); command_line.AppendSwitchASCII( switches::kGpuDriverBugWorkarounds, base::IntToString(gpu::SET_TEXTURE_FILTER_BEFORE_GENERATING_MIPMAP)); @@ -1627,7 +1627,7 @@ TEST_P(GLES2DecoderTest, TexSubImage2DDoesNotClearAfterTexImage2DNULLThenData) { TEST_P( GLES2DecoderManualInitTest, TexSubImage2DDoesNotClearAfterTexImage2DNULLThenDataWithTexImage2DIsFaster) { - CommandLine command_line(0, NULL); + base::CommandLine command_line(0, NULL); command_line.AppendSwitchASCII( switches::kGpuDriverBugWorkarounds, base::IntToString(gpu::TEXSUBIMAGE2D_FASTER_THAN_TEXIMAGE2D)); diff --git a/gpu/command_buffer/service/logger.cc b/gpu/command_buffer/service/logger.cc index 1fd2933..d8311f1 100644 --- a/gpu/command_buffer/service/logger.cc +++ b/gpu/command_buffer/service/logger.cc @@ -27,7 +27,7 @@ Logger::~Logger() {} void Logger::LogMessage( const char* filename, int line, const std::string& msg) { if (log_message_count_ < kMaxLogMessages || - CommandLine::ForCurrentProcess()->HasSwitch( + base::CommandLine::ForCurrentProcess()->HasSwitch( switches::kDisableGLErrorLimit)) { std::string prefixed_msg(std::string("[") + GetLogPrefix() + "]" + msg); ++log_message_count_; diff --git a/gpu/command_buffer/service/memory_program_cache.cc b/gpu/command_buffer/service/memory_program_cache.cc index 86fffd3..4bf16e3 100644 --- a/gpu/command_buffer/service/memory_program_cache.cc +++ b/gpu/command_buffer/service/memory_program_cache.cc @@ -21,7 +21,8 @@ namespace { size_t GetCacheSizeBytes() { - const CommandLine* command_line = CommandLine::ForCurrentProcess(); + const base::CommandLine* command_line = + base::CommandLine::ForCurrentProcess(); if (command_line->HasSwitch(switches::kGpuProgramCacheSizeKb)) { size_t size; if (base::StringToSizeT( @@ -215,7 +216,7 @@ ProgramCache::ProgramLoadResult MemoryProgramCache::LoadLinkedProgram( shader_b->set_varying_map(value->varying_map_1()); if (!shader_callback.is_null() && - !CommandLine::ForCurrentProcess()->HasSwitch( + !base::CommandLine::ForCurrentProcess()->HasSwitch( switches::kDisableGpuShaderDiskCache)) { scoped_ptr<GpuProgramProto> proto( GpuProgramProto::default_instance().New()); @@ -284,7 +285,7 @@ void MemoryProgramCache::SaveLinkedProgram( } if (!shader_callback.is_null() && - !CommandLine::ForCurrentProcess()->HasSwitch( + !base::CommandLine::ForCurrentProcess()->HasSwitch( switches::kDisableGpuShaderDiskCache)) { scoped_ptr<GpuProgramProto> proto( GpuProgramProto::default_instance().New()); diff --git a/gpu/command_buffer/service/program_manager.cc b/gpu/command_buffer/service/program_manager.cc index 1de61bb..634fbc0 100644 --- a/gpu/command_buffer/service/program_manager.cc +++ b/gpu/command_buffer/service/program_manager.cc @@ -404,8 +404,8 @@ void Program::Update() { } #if !defined(NDEBUG) - if (CommandLine::ForCurrentProcess()->HasSwitch( - switches::kEnableGPUServiceLoggingGPU)) { + if (base::CommandLine::ForCurrentProcess()->HasSwitch( + switches::kEnableGPUServiceLoggingGPU)) { DVLOG(1) << "----: attribs for service_id: " << service_id(); for (size_t ii = 0; ii < attrib_infos_.size(); ++ii) { const VertexAttrib& info = attrib_infos_[ii]; @@ -482,8 +482,8 @@ void Program::Update() { } #if !defined(NDEBUG) - if (CommandLine::ForCurrentProcess()->HasSwitch( - switches::kEnableGPUServiceLoggingGPU)) { + if (base::CommandLine::ForCurrentProcess()->HasSwitch( + switches::kEnableGPUServiceLoggingGPU)) { DVLOG(1) << "----: uniforms for service_id: " << service_id(); for (size_t ii = 0; ii < uniform_infos_.size(); ++ii) { const UniformInfo& info = uniform_infos_[ii]; diff --git a/gpu/command_buffer/service/shader_translator.cc b/gpu/command_buffer/service/shader_translator.cc index d7def00..74b183b 100644 --- a/gpu/command_buffer/service/shader_translator.cc +++ b/gpu/command_buffer/service/shader_translator.cc @@ -135,8 +135,8 @@ int ShaderTranslator::GetCompileOptions() const { SH_LIMIT_EXPRESSION_COMPLEXITY | SH_LIMIT_CALL_STACK_DEPTH | SH_CLAMP_INDIRECT_ARRAY_BOUNDS; - if (CommandLine::ForCurrentProcess()->HasSwitch( - switches::kGLShaderIntermOutput)) + if (base::CommandLine::ForCurrentProcess()->HasSwitch( + switches::kGLShaderIntermOutput)) compile_options |= SH_INTERMEDIATE_TREE; compile_options |= driver_bug_workarounds_; diff --git a/gpu/command_buffer/tests/gl_clear_framebuffer_unittest.cc b/gpu/command_buffer/tests/gl_clear_framebuffer_unittest.cc index 8a925c8..fdad315 100644 --- a/gpu/command_buffer/tests/gl_clear_framebuffer_unittest.cc +++ b/gpu/command_buffer/tests/gl_clear_framebuffer_unittest.cc @@ -31,7 +31,7 @@ class GLClearFramebufferTest : public testing::TestWithParam<bool> { void SetUp() override { if (GetParam()) { // Force the glClear() workaround so we can test it here. - CommandLine command_line(base::CommandLine::NO_PROGRAM); + base::CommandLine command_line(base::CommandLine::NO_PROGRAM); command_line.AppendSwitchASCII(switches::kGpuDriverBugWorkarounds, base::IntToString(gpu::GL_CLEAR_BROKEN)); gl_.InitializeWithCommandLine(GLManager::Options(), &command_line); diff --git a/gpu/command_buffer/tests/gl_tests_main.cc b/gpu/command_buffer/tests/gl_tests_main.cc index 8952e44..7b7d8d86 100644 --- a/gpu/command_buffer/tests/gl_tests_main.cc +++ b/gpu/command_buffer/tests/gl_tests_main.cc @@ -35,13 +35,13 @@ int main(int argc, char** argv) { ui::gl::android::RegisterJni(base::android::AttachCurrentThread()); #endif base::TestSuite test_suite(argc, argv); - CommandLine::Init(argc, argv); + base::CommandLine::Init(argc, argv); #if defined(OS_MACOSX) base::mac::ScopedNSAutoreleasePool pool; #endif gfx::GLSurface::InitializeOneOff(); ::gles2::Initialize(); - gpu::ApplyGpuDriverBugWorkarounds(CommandLine::ForCurrentProcess()); + gpu::ApplyGpuDriverBugWorkarounds(base::CommandLine::ForCurrentProcess()); testing::InitGoogleMock(&argc, argv); return base::LaunchUnitTestsSerially( argc, diff --git a/gpu/config/gpu_driver_bug_list.cc b/gpu/config/gpu_driver_bug_list.cc index a091c42..b0d82eb 100644 --- a/gpu/config/gpu_driver_bug_list.cc +++ b/gpu/config/gpu_driver_bug_list.cc @@ -55,7 +55,8 @@ std::string GpuDriverBugWorkaroundTypeToString( // static void GpuDriverBugList::AppendWorkaroundsFromCommandLine( - std::set<int>* workarounds, const CommandLine& command_line) { + std::set<int>* workarounds, + const base::CommandLine& command_line) { DCHECK(workarounds); for (int i = 0; i < NUMBER_OF_GPU_DRIVER_BUG_WORKAROUND_TYPES; i++) { if (!command_line.HasSwitch(kFeatureList[i].name)) diff --git a/gpu/config/gpu_driver_bug_list.h b/gpu/config/gpu_driver_bug_list.h index 8830cac..ba24944 100644 --- a/gpu/config/gpu_driver_bug_list.h +++ b/gpu/config/gpu_driver_bug_list.h @@ -24,7 +24,8 @@ class GPU_EXPORT GpuDriverBugList : public GpuControlList { // Append |workarounds| with these passed in through the // |command_line|. static void AppendWorkaroundsFromCommandLine( - std::set<int>* workarounds, const CommandLine& command_line); + std::set<int>* workarounds, + const base::CommandLine& command_line); private: GpuDriverBugList(); diff --git a/gpu/config/gpu_info_collector_linux.cc b/gpu/config/gpu_info_collector_linux.cc index ac5660a..35dd88a 100644 --- a/gpu/config/gpu_info_collector_linux.cc +++ b/gpu/config/gpu_info_collector_linux.cc @@ -163,7 +163,7 @@ CollectInfoResult CollectContextGraphicsInfo(GPUInfo* gpu_info) { TRACE_EVENT0("gpu", "gpu_info_collector::CollectGraphicsInfo"); - if (CommandLine::ForCurrentProcess()->HasSwitch( + if (base::CommandLine::ForCurrentProcess()->HasSwitch( switches::kGpuNoContextLost)) { gpu_info->can_lose_context = false; } else { diff --git a/gpu/config/gpu_info_collector_win.cc b/gpu/config/gpu_info_collector_win.cc index eabf9b2..d38a026 100644 --- a/gpu/config/gpu_info_collector_win.cc +++ b/gpu/config/gpu_info_collector_win.cc @@ -466,9 +466,10 @@ CollectInfoResult CollectContextGraphicsInfo(GPUInfo* gpu_info) { DCHECK(gpu_info); - if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kUseGL)) { + if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kUseGL)) { std::string requested_implementation_name = - CommandLine::ForCurrentProcess()->GetSwitchValueASCII(switches::kUseGL); + base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( + switches::kUseGL); if (requested_implementation_name == "swiftshader") { gpu_info->software_rendering = true; gpu_info->context_info_state = kCollectInfoNonFatalFailure; diff --git a/gpu/config/gpu_util.cc b/gpu/config/gpu_util.cc index 4605981..0fb8a7f 100644 --- a/gpu/config/gpu_util.cc +++ b/gpu/config/gpu_util.cc @@ -53,15 +53,15 @@ void MergeFeatureSets(std::set<int>* dst, const std::set<int>& src) { dst->insert(src.begin(), src.end()); } -void ApplyGpuDriverBugWorkarounds(CommandLine* command_line) { +void ApplyGpuDriverBugWorkarounds(base::CommandLine* command_line) { GPUInfo gpu_info; CollectBasicGraphicsInfo(&gpu_info); ApplyGpuDriverBugWorkarounds(gpu_info, command_line); } -void ApplyGpuDriverBugWorkarounds( - const GPUInfo& gpu_info, CommandLine* command_line) { +void ApplyGpuDriverBugWorkarounds(const GPUInfo& gpu_info, + base::CommandLine* command_line) { scoped_ptr<GpuDriverBugList> list(GpuDriverBugList::Create()); list->LoadList(kGpuDriverBugListJson, GpuControlList::kCurrentOsOnly); diff --git a/gpu/gles2_conform_support/egl/egl.cc b/gpu/gles2_conform_support/egl/egl.cc index 3827229..f23cf76 100644 --- a/gpu/gles2_conform_support/egl/egl.cc +++ b/gpu/gles2_conform_support/egl/egl.cc @@ -106,7 +106,7 @@ EGLBoolean eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor) { const char* const argv[] = { "dummy" }; - CommandLine::Init(argc, argv); + base::CommandLine::Init(argc, argv); gfx::GLSurface::InitializeOneOff(); *major = 1; diff --git a/gpu/gles2_conform_support/gles2_conform_test.cc b/gpu/gles2_conform_support/gles2_conform_test.cc index 46a5115..906e1af 100644 --- a/gpu/gles2_conform_support/gles2_conform_test.cc +++ b/gpu/gles2_conform_support/gles2_conform_test.cc @@ -63,8 +63,8 @@ bool RunGLES2ConformTest(const char* path) { base::FilePath program(test_path.Append(FILE_PATH_LITERAL( "gles2_conform_test_windowless"))); - CommandLine* currentCmdLine = CommandLine::ForCurrentProcess(); - CommandLine cmdline(program); + base::CommandLine* currentCmdLine = base::CommandLine::ForCurrentProcess(); + base::CommandLine cmdline(program); cmdline.AppendArguments(*currentCmdLine, false); cmdline.AppendSwitch(std::string("--")); cmdline.AppendArg(std::string("-run=") + path); @@ -85,7 +85,7 @@ bool RunGLES2ConformTest(const char* path) { int main(int argc, char** argv) { base::AtExitManager exit_manager; - CommandLine::Init(argc, argv); + base::CommandLine::Init(argc, argv); #if defined(OS_MACOSX) base::mac::ScopedNSAutoreleasePool pool; #endif diff --git a/gpu/gles2_conform_support/native/main.cc b/gpu/gles2_conform_support/native/main.cc index d0d05d8..1dc377b 100644 --- a/gpu/gles2_conform_support/native/main.cc +++ b/gpu/gles2_conform_support/native/main.cc @@ -23,11 +23,11 @@ extern "C" { int main(int argc, char *argv[]) { base::AtExitManager at_exit; - CommandLine::Init(argc, argv); + base::CommandLine::Init(argc, argv); base::MessageLoopForUI message_loop; - CommandLine::StringVector args = - CommandLine::ForCurrentProcess()->GetArgs(); + base::CommandLine::StringVector args = + base::CommandLine::ForCurrentProcess()->GetArgs(); #if defined(OS_MACOSX) base::mac::ScopedNSAutoreleasePool pool; diff --git a/gpu/khronos_glcts_support/khronos_glcts_test.cc b/gpu/khronos_glcts_support/khronos_glcts_test.cc index 5491b15..287b5d0 100644 --- a/gpu/khronos_glcts_support/khronos_glcts_test.cc +++ b/gpu/khronos_glcts_support/khronos_glcts_test.cc @@ -67,7 +67,7 @@ bool RunKhronosGLCTSTest(const char* test_name) { g_deqp_log_dir.AppendASCII(test_info->name()). AddExtension(FILE_PATH_LITERAL(".log")); - CommandLine cmdline(program); + base::CommandLine cmdline(program); cmdline.AppendSwitchPath("--deqp-log-filename", log); cmdline.AppendSwitchPath("--deqp-archive-dir", archive); cmdline.AppendArg("--deqp-gl-config-id=-1"); diff --git a/gpu/khronos_glcts_support/native/main.cc b/gpu/khronos_glcts_support/native/main.cc index 8ffde05..62d9b11 100644 --- a/gpu/khronos_glcts_support/native/main.cc +++ b/gpu/khronos_glcts_support/native/main.cc @@ -43,7 +43,7 @@ void GTFMain(int argc, char* argv[]) { int main(int argc, char *argv[]) { base::AtExitManager at_exit; - CommandLine::Init(argc, argv); + base::CommandLine::Init(argc, argv); base::MessageLoopForUI message_loop; GTFMain(argc, argv); diff --git a/gpu/tools/compositor_model_bench/compositor_model_bench.cc b/gpu/tools/compositor_model_bench/compositor_model_bench.cc index 375bce2..8042392 100644 --- a/gpu/tools/compositor_model_bench/compositor_model_bench.cc +++ b/gpu/tools/compositor_model_bench/compositor_model_bench.cc @@ -353,8 +353,8 @@ class Simulator { }; int main(int argc, char* argv[]) { - CommandLine::Init(argc, argv); - const CommandLine* cl = CommandLine::ForCurrentProcess(); + base::CommandLine::Init(argc, argv); + const base::CommandLine* cl = base::CommandLine::ForCurrentProcess(); if (argc != 3 && argc != 4) { LOG(INFO) << "Usage: \n" << |