Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4191)

Unified Diff: chrome/gpu/gpu_thread.cc

Issue 4716002: Made OSMesa work on Mac for WebGL.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/test/gpu/gpu_uitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/gpu/gpu_thread.cc
===================================================================
--- chrome/gpu/gpu_thread.cc (revision 65262)
+++ chrome/gpu/gpu_thread.cc (working copy)
@@ -105,33 +105,32 @@
// 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;
- }
+ if (!gpu_info_collector::CollectGraphicsInfo(&gpu_info))
+ LOG(WARNING) << "Could not collect GPU info.";
- DCHECK(channel != NULL);
+ child_process_logging::SetGpuInfo(gpu_info);
+ GpuChannelMap::const_iterator iter = gpu_channels_.find(renderer_id);
- if (channel->Init()) {
- gpu_channels_[renderer_id] = channel;
- } else {
- channel = NULL;
- }
+ if (iter == gpu_channels_.end())
+ channel = new GpuChannel(renderer_id);
+ else
+ channel = iter->second;
- if (channel.get()) {
- channel_handle.name = channel->GetChannelName();
+ 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
- }
}
}
« no previous file with comments | « no previous file | chrome/test/gpu/gpu_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698