diff options
-rw-r--r-- | chrome/gpu/gpu_thread.cc | 49 | ||||
-rw-r--r-- | chrome/test/gpu/gpu_uitest.cc | 9 | ||||
-rw-r--r-- | chrome/test/test_launcher_utils.cc | 7 |
3 files changed, 29 insertions, 36 deletions
diff --git a/chrome/gpu/gpu_thread.cc b/chrome/gpu/gpu_thread.cc index 3e4d25d..6116b48 100644 --- a/chrome/gpu/gpu_thread.cc +++ b/chrome/gpu/gpu_thread.cc @@ -69,33 +69,32 @@ void GpuThread::OnEstablishChannel(int renderer_id) { // Fail to establish a channel if some implementation of GL cannot be // initialized. if (gfx::GLContext::InitializeOneOff()) { - // Fail to establish channel if GPU stats cannot be retreived. - if (gpu_info_collector::CollectGraphicsInfo(&gpu_info)) { - child_process_logging::SetGpuInfo(gpu_info); - GpuChannelMap::const_iterator iter = gpu_channels_.find(renderer_id); - if (iter == gpu_channels_.end()) { - channel = new GpuChannel(renderer_id); - } else { - channel = iter->second; - } - - DCHECK(channel != NULL); - - if (channel->Init()) { - gpu_channels_[renderer_id] = channel; - } else { - channel = NULL; - } - - if (channel.get()) { - channel_handle.name = channel->GetChannelName(); + if (!gpu_info_collector::CollectGraphicsInfo(&gpu_info)) + LOG(WARNING) << "Could not collect GPU info."; + + child_process_logging::SetGpuInfo(gpu_info); + GpuChannelMap::const_iterator iter = gpu_channels_.find(renderer_id); + + if (iter == gpu_channels_.end()) + channel = new GpuChannel(renderer_id); + else + channel = iter->second; + + DCHECK(channel != NULL); + + if (channel->Init()) + gpu_channels_[renderer_id] = channel; + else + channel = NULL; + + if (channel.get()) { + channel_handle.name = channel->GetChannelName(); #if defined(OS_POSIX) - // On POSIX, pass the renderer-side FD. Also mark it as auto-close so - // that it gets closed after it has been sent. - int renderer_fd = channel->DisownRendererFd(); - channel_handle.socket = base::FileDescriptor(renderer_fd, true); + // On POSIX, pass the renderer-side FD. Also mark it as auto-close so + // that it gets closed after it has been sent. + int renderer_fd = channel->DisownRendererFd(); + channel_handle.socket = base::FileDescriptor(renderer_fd, true); #endif - } } } diff --git a/chrome/test/gpu/gpu_uitest.cc b/chrome/test/gpu/gpu_uitest.cc index a6c43d0..c22f8f8 100644 --- a/chrome/test/gpu/gpu_uitest.cc +++ b/chrome/test/gpu/gpu_uitest.cc @@ -21,14 +21,7 @@ class GPUUITest : public UITest { FilePath gpu_test_dir_; }; -// TODO(apatrick): OSMesa is flaky on Mac. http://crbug/61037 -#if defined(OS_MACOSX) -#define MAYBE_UITestLaunchedWithOSMesa DISABLED_UITestLaunchedWithOSMesa -#else -#define MAYBE_UITestLaunchedWithOSMesa UITestLaunchedWithOSMesa -#endif - -TEST_F(GPUUITest, MAYBE_UITestLaunchedWithOSMesa) { +TEST_F(GPUUITest, UITestLaunchedWithOSMesa) { // Check the webgl test reports success and that the renderer was OSMesa. // We use OSMesa for tests in order to get consistent results across a // variety of boxes. diff --git a/chrome/test/test_launcher_utils.cc b/chrome/test/test_launcher_utils.cc index 5b93422..aaf7bb9 100644 --- a/chrome/test/test_launcher_utils.cc +++ b/chrome/test/test_launcher_utils.cc @@ -33,12 +33,13 @@ void PrepareBrowserCommandLineForTests(CommandLine* command_line) { command_line->AppendSwitch(switches::kEnableLogging); command_line->AppendSwitchASCII(switches::kLoggingLevel, "1"); // warning - // TODO(apatrick): Other pending changes will fix this for mac. -#if !defined(OS_MACOSX) // Force all tests to use OSMesa if they launch the GPU process. command_line->AppendSwitchASCII(switches::kUseGL, gfx::kGLImplementationOSMesaName); -#endif + + // Mac does not support accelerated compositing with OSMesa. + // http://crbug.com/58343 + command_line->AppendSwitch(switches::kDisableAcceleratedCompositing); } bool OverrideUserDataDir(const FilePath& user_data_dir) { |