| 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 <string> |    7 #include <string> | 
|    8 #include <vector> |    8 #include <vector> | 
|    9  |    9  | 
|   10 #include "base/debug/trace_event.h" |   10 #include "base/debug/trace_event.h" | 
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   75   } |   75   } | 
|   76   return std::string(); |   76   return std::string(); | 
|   77 } |   77 } | 
|   78  |   78  | 
|   79 }  // namespace anonymous |   79 }  // namespace anonymous | 
|   80  |   80  | 
|   81 namespace gpu { |   81 namespace gpu { | 
|   82  |   82  | 
|   83 bool CollectGraphicsInfoGL(GPUInfo* gpu_info) { |   83 bool CollectGraphicsInfoGL(GPUInfo* gpu_info) { | 
|   84   TRACE_EVENT0("startup", "gpu_info_collector::CollectGraphicsInfoGL"); |   84   TRACE_EVENT0("startup", "gpu_info_collector::CollectGraphicsInfoGL"); | 
 |   85   if (!gfx::GLSurface::InitializeOneOff()) { | 
 |   86     LOG(ERROR) << "gfx::GLSurface::InitializeOneOff() failed"; | 
 |   87     return false; | 
 |   88   } | 
|   85  |   89  | 
|   86   scoped_refptr<gfx::GLSurface> surface(InitializeGLSurface()); |   90   scoped_refptr<gfx::GLSurface> surface(InitializeGLSurface()); | 
|   87   if (!surface.get()) |   91   if (!surface.get()) | 
|   88     return false; |   92     return false; | 
|   89  |   93  | 
|   90   scoped_refptr<gfx::GLContext> context(InitializeGLContext(surface.get())); |   94   scoped_refptr<gfx::GLContext> context(InitializeGLContext(surface.get())); | 
|   91   if (!context.get()) |   95   if (!context.get()) | 
|   92     return false; |   96     return false; | 
|   93  |   97  | 
|   94   gpu_info->gl_renderer = GetGLString(GL_RENDERER); |   98   gpu_info->gl_renderer = GetGLString(GL_RENDERER); | 
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  148     basic_gpu_info->driver_version = context_gpu_info.driver_version; |  152     basic_gpu_info->driver_version = context_gpu_info.driver_version; | 
|  149  |  153  | 
|  150   basic_gpu_info->can_lose_context = context_gpu_info.can_lose_context; |  154   basic_gpu_info->can_lose_context = context_gpu_info.can_lose_context; | 
|  151   basic_gpu_info->sandboxed = context_gpu_info.sandboxed; |  155   basic_gpu_info->sandboxed = context_gpu_info.sandboxed; | 
|  152   basic_gpu_info->finalized = context_gpu_info.finalized; |  156   basic_gpu_info->finalized = context_gpu_info.finalized; | 
|  153   basic_gpu_info->initialization_time = context_gpu_info.initialization_time; |  157   basic_gpu_info->initialization_time = context_gpu_info.initialization_time; | 
|  154 } |  158 } | 
|  155  |  159  | 
|  156 }  // namespace gpu |  160 }  // namespace gpu | 
|  157  |  161  | 
| OLD | NEW |