summaryrefslogtreecommitdiffstats
path: root/chrome/gpu
diff options
context:
space:
mode:
authorapatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-08 23:13:03 +0000
committerapatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-08 23:13:03 +0000
commit0ab8d17f32f633ae6a386531deaa03391d3c4693 (patch)
tree534c99e3e0d0e082ee1d27af3dc2ef923d8325b4 /chrome/gpu
parent2594c2bef91a8a25e5bfb2c5685d3d9653ddd376 (diff)
downloadchromium_src-0ab8d17f32f633ae6a386531deaa03391d3c4693.zip
chromium_src-0ab8d17f32f633ae6a386531deaa03391d3c4693.tar.gz
chromium_src-0ab8d17f32f633ae6a386531deaa03391d3c4693.tar.bz2
Made OSMesa work on Mac for WebGL.
This required that GPU initialization not fail if GPU info cannot be collected. The accelerated compositor still needs some work but this will let us run some WebGL browser and ui smoke tests. Also added --disable-accelerated-compositing for browser and ui tests so they will not attempt to use it. TEST=try, run ui test locally BUG=61037, 58343 Review URL: http://codereview.chromium.org/4716002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65447 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/gpu')
-rw-r--r--chrome/gpu/gpu_thread.cc49
1 files changed, 24 insertions, 25 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
- }
}
}