| 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 "gpu/config/gpu_info_collector.h" | 5 #include "gpu/config/gpu_info_collector.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 if (!surface.get()) { | 38 if (!surface.get()) { |
| 39 LOG(ERROR) << "gl::GLContext::CreateOffscreenGLSurface failed"; | 39 LOG(ERROR) << "gl::GLContext::CreateOffscreenGLSurface failed"; |
| 40 return NULL; | 40 return NULL; |
| 41 } | 41 } |
| 42 | 42 |
| 43 return surface; | 43 return surface; |
| 44 } | 44 } |
| 45 | 45 |
| 46 scoped_refptr<gl::GLContext> InitializeGLContext(gl::GLSurface* surface) { | 46 scoped_refptr<gl::GLContext> InitializeGLContext(gl::GLSurface* surface) { |
| 47 scoped_refptr<gl::GLContext> context( | 47 scoped_refptr<gl::GLContext> context( |
| 48 gl::init::CreateGLContext(nullptr, surface, gl::PreferIntegratedGpu)); | 48 gl::init::CreateGLContext(nullptr, surface, gl::GLContextAttribs())); |
| 49 if (!context.get()) { | 49 if (!context.get()) { |
| 50 LOG(ERROR) << "gl::init::CreateGLContext failed"; | 50 LOG(ERROR) << "gl::init::CreateGLContext failed"; |
| 51 return NULL; | 51 return NULL; |
| 52 } | 52 } |
| 53 | 53 |
| 54 if (!context->MakeCurrent(surface)) { | 54 if (!context->MakeCurrent(surface)) { |
| 55 LOG(ERROR) << "gl::GLContext::MakeCurrent() failed"; | 55 LOG(ERROR) << "gl::GLContext::MakeCurrent() failed"; |
| 56 return NULL; | 56 return NULL; |
| 57 } | 57 } |
| 58 | 58 |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 } | 296 } |
| 297 for (size_t ii = 0; ii < gpu_info->secondary_gpus.size(); ++ii) { | 297 for (size_t ii = 0; ii < gpu_info->secondary_gpus.size(); ++ii) { |
| 298 if (active_vendor_id == gpu_info->secondary_gpus[ii].vendor_id) { | 298 if (active_vendor_id == gpu_info->secondary_gpus[ii].vendor_id) { |
| 299 gpu_info->secondary_gpus[ii].active = true; | 299 gpu_info->secondary_gpus[ii].active = true; |
| 300 return; | 300 return; |
| 301 } | 301 } |
| 302 } | 302 } |
| 303 } | 303 } |
| 304 | 304 |
| 305 } // namespace gpu | 305 } // namespace gpu |
| OLD | NEW |