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 <dwmapi.h> | 8 #include <dwmapi.h> |
9 #include <windows.h> | 9 #include <windows.h> |
10 #endif | 10 #endif |
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
398 bool res = true; | 398 bool res = true; |
399 gpu::CollectInfoResult result = gpu::CollectContextGraphicsInfo(&gpu_info); | 399 gpu::CollectInfoResult result = gpu::CollectContextGraphicsInfo(&gpu_info); |
400 switch (result) { | 400 switch (result) { |
401 case gpu::kCollectInfoFatalFailure: | 401 case gpu::kCollectInfoFatalFailure: |
402 LOG(ERROR) << "gpu::CollectGraphicsInfo failed (fatal)."; | 402 LOG(ERROR) << "gpu::CollectGraphicsInfo failed (fatal)."; |
403 res = false; | 403 res = false; |
404 break; | 404 break; |
405 case gpu::kCollectInfoNonFatalFailure: | 405 case gpu::kCollectInfoNonFatalFailure: |
406 VLOG(1) << "gpu::CollectGraphicsInfo failed (non-fatal)."; | 406 VLOG(1) << "gpu::CollectGraphicsInfo failed (non-fatal)."; |
407 break; | 407 break; |
| 408 case gpu::kCollectInfoNone: |
| 409 NOTREACHED(); |
| 410 break; |
408 case gpu::kCollectInfoSuccess: | 411 case gpu::kCollectInfoSuccess: |
409 break; | 412 break; |
410 } | 413 } |
411 GetContentClient()->SetGpuInfo(gpu_info); | 414 GetContentClient()->SetGpuInfo(gpu_info); |
412 return res; | 415 return res; |
413 } | 416 } |
414 #endif | 417 #endif |
415 | 418 |
416 #if defined(OS_LINUX) | 419 #if defined(OS_LINUX) |
417 #if !defined(OS_CHROMEOS) | 420 #if !defined(OS_CHROMEOS) |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
512 return true; | 515 return true; |
513 } | 516 } |
514 | 517 |
515 return false; | 518 return false; |
516 } | 519 } |
517 #endif // defined(OS_WIN) | 520 #endif // defined(OS_WIN) |
518 | 521 |
519 } // namespace. | 522 } // namespace. |
520 | 523 |
521 } // namespace content | 524 } // namespace content |
OLD | NEW |