| 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 <stdlib.h> | 5 #include <stdlib.h> |
| 6 | 6 |
| 7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 #endif | 9 #endif |
| 10 | 10 |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 child_thread->StopWatchdog(); | 301 child_thread->StopWatchdog(); |
| 302 | 302 |
| 303 return 0; | 303 return 0; |
| 304 } | 304 } |
| 305 | 305 |
| 306 namespace { | 306 namespace { |
| 307 | 307 |
| 308 #if defined(OS_LINUX) | 308 #if defined(OS_LINUX) |
| 309 void CreateDummyGlContext() { | 309 void CreateDummyGlContext() { |
| 310 scoped_refptr<gfx::GLSurface> surface( | 310 scoped_refptr<gfx::GLSurface> surface( |
| 311 gfx::GLSurface::CreateOffscreenGLSurface(false, gfx::Size(1, 1))); | 311 gfx::GLSurface::CreateOffscreenGLSurface(gfx::Size(1, 1))); |
| 312 if (!surface.get()) { | 312 if (!surface.get()) { |
| 313 VLOG(1) << "gfx::GLSurface::CreateOffscreenGLSurface failed"; | 313 VLOG(1) << "gfx::GLSurface::CreateOffscreenGLSurface failed"; |
| 314 return; | 314 return; |
| 315 } | 315 } |
| 316 | 316 |
| 317 // On Linux, this is needed to make sure /dev/nvidiactl has | 317 // On Linux, this is needed to make sure /dev/nvidiactl has |
| 318 // been opened and its descriptor cached. | 318 // been opened and its descriptor cached. |
| 319 scoped_refptr<gfx::GLContext> context(gfx::GLContext::CreateGLContext( | 319 scoped_refptr<gfx::GLContext> context(gfx::GLContext::CreateGLContext( |
| 320 NULL, surface.get(), gfx::PreferDiscreteGpu)); | 320 NULL, surface.get(), gfx::PreferDiscreteGpu)); |
| 321 if (!context.get()) { | 321 if (!context.get()) { |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 426 return true; | 426 return true; |
| 427 } | 427 } |
| 428 | 428 |
| 429 return false; | 429 return false; |
| 430 } | 430 } |
| 431 #endif // defined(OS_WIN) | 431 #endif // defined(OS_WIN) |
| 432 | 432 |
| 433 } // namespace. | 433 } // namespace. |
| 434 | 434 |
| 435 } // namespace content | 435 } // namespace content |
| OLD | NEW |