| 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 "content/browser/browser_main_loop.h" | 5 #include "content/browser/browser_main_loop.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 749 // CommandLine::ForCurrentProcess object after threads are created. | 749 // CommandLine::ForCurrentProcess object after threads are created. |
| 750 // 2) Must be after parts_->PreCreateThreads to pick up chrome://flags. | 750 // 2) Must be after parts_->PreCreateThreads to pick up chrome://flags. |
| 751 GpuDataManagerImpl::GetInstance()->Initialize(); | 751 GpuDataManagerImpl::GetInstance()->Initialize(); |
| 752 | 752 |
| 753 #if defined(USE_X11) && !defined(OS_CHROMEOS) | 753 #if defined(USE_X11) && !defined(OS_CHROMEOS) |
| 754 // PreCreateThreads is called before CreateStartupTasks which starts the gpu | 754 // PreCreateThreads is called before CreateStartupTasks which starts the gpu |
| 755 // process. | 755 // process. |
| 756 bool enable_transparent_visuals = | 756 bool enable_transparent_visuals = |
| 757 !GpuDataManagerImpl::GetInstance()->IsDriverBugWorkaroundActive( | 757 !GpuDataManagerImpl::GetInstance()->IsDriverBugWorkaroundActive( |
| 758 gpu::DISABLE_TRANSPARENT_VISUALS); | 758 gpu::DISABLE_TRANSPARENT_VISUALS); |
| 759 |
| 760 // Prevent this flag to be turned off later since it is only used here. |
| 761 if (!enable_transparent_visuals && |
| 762 !GpuDataManagerImpl::GetInstance()->IsCompleteGpuInfoAvailable()) { |
| 763 base::CommandLine::ForCurrentProcess()->AppendSwitch( |
| 764 "disable_transparent_visuals"); |
| 765 } |
| 766 |
| 759 Visual* visual = NULL; | 767 Visual* visual = NULL; |
| 760 int depth = 0; | 768 int depth = 0; |
| 761 ui::ChooseVisualForWindow(enable_transparent_visuals, &visual, &depth); | 769 ui::ChooseVisualForWindow(enable_transparent_visuals, &visual, &depth); |
| 762 DCHECK(depth > 0); | 770 DCHECK(depth > 0); |
| 763 base::CommandLine::ForCurrentProcess()->AppendSwitchASCII( | 771 base::CommandLine::ForCurrentProcess()->AppendSwitchASCII( |
| 764 switches::kWindowDepth, base::IntToString(depth)); | 772 switches::kWindowDepth, base::IntToString(depth)); |
| 765 base::CommandLine::ForCurrentProcess()->AppendSwitchASCII( | 773 base::CommandLine::ForCurrentProcess()->AppendSwitchASCII( |
| 766 switches::kX11VisualID, base::UintToString(visual->visualid)); | 774 switches::kX11VisualID, base::UintToString(visual->visualid)); |
| 767 #endif | 775 #endif |
| 768 | 776 |
| (...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1526 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner = | 1534 scoped_refptr<base::SingleThreadTaskRunner> worker_task_runner = |
| 1527 audio_thread_->task_runner(); | 1535 audio_thread_->task_runner(); |
| 1528 audio_manager_ = media::AudioManager::Create(std::move(audio_task_runner), | 1536 audio_manager_ = media::AudioManager::Create(std::move(audio_task_runner), |
| 1529 std::move(worker_task_runner), | 1537 std::move(worker_task_runner), |
| 1530 MediaInternals::GetInstance()); | 1538 MediaInternals::GetInstance()); |
| 1531 } | 1539 } |
| 1532 CHECK(audio_manager_); | 1540 CHECK(audio_manager_); |
| 1533 } | 1541 } |
| 1534 | 1542 |
| 1535 } // namespace content | 1543 } // namespace content |
| OLD | NEW |