OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "content/gpu/gpu_info_collector.h" |
| 6 |
| 7 #include "base/command_line.h" |
| 8 #include "base/logging.h" |
| 9 #include "base/string_number_conversions.h" |
| 10 #include "base/string_util.h" |
| 11 #include "base/strings/string_piece.h" |
| 12 #include "base/strings/string_split.h" |
| 13 #include "cc/base/switches.h" |
| 14 #include "content/public/common/content_switches.h" |
| 15 |
| 16 namespace gpu_info_collector { |
| 17 |
| 18 bool CollectContextGraphicsInfo(content::GPUInfo* gpu_info) { |
| 19 // can_lose_context must be false to enable accelerated Canvas2D |
| 20 gpu_info->can_lose_context = false; |
| 21 gpu_info->finalized = true; |
| 22 return CollectGraphicsInfoGL(gpu_info); |
| 23 } |
| 24 |
| 25 GpuIDResult CollectGpuID(uint32* vendor_id, uint32* device_id) { |
| 26 DCHECK(vendor_id && device_id); |
| 27 *vendor_id = 0; |
| 28 *device_id = 0; |
| 29 return kGpuIDNotSupported; |
| 30 } |
| 31 |
| 32 bool CollectBasicGraphicsInfo(content::GPUInfo* gpu_info) { |
| 33 gpu_info->can_lose_context = false; |
| 34 |
| 35 CommandLine::ForCurrentProcess()->AppendSwitch( |
| 36 switches::kEnableVirtualGLContexts); |
| 37 return true; |
| 38 } |
| 39 |
| 40 bool CollectDriverInfoGL(content::GPUInfo* gpu_info) { |
| 41 NOTIMPLEMENTED(); |
| 42 return false; |
| 43 } |
| 44 |
| 45 void MergeGPUInfo(content::GPUInfo* basic_gpu_info, |
| 46 const content::GPUInfo& context_gpu_info) { |
| 47 MergeGPUInfoGL(basic_gpu_info, context_gpu_info); |
| 48 } |
| 49 |
| 50 } // namespace gpu_info_collector |
OLD | NEW |