OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/browser/gpu_blacklist.h" | 5 #include "chrome/browser/gpu_blacklist.h" |
6 | 6 |
7 #include "base/json/json_reader.h" | 7 #include "base/json/json_reader.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/string_number_conversions.h" | 9 #include "base/string_number_conversions.h" |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
482 return true; | 482 return true; |
483 } | 483 } |
484 | 484 |
485 GpuFeatureFlags GpuBlacklist::DetermineGpuFeatureFlags( | 485 GpuFeatureFlags GpuBlacklist::DetermineGpuFeatureFlags( |
486 GpuBlacklist::OsType os, | 486 GpuBlacklist::OsType os, |
487 Version* os_version, | 487 Version* os_version, |
488 const GPUInfo& gpu_info) { | 488 const GPUInfo& gpu_info) { |
489 active_entries_.clear(); | 489 active_entries_.clear(); |
490 GpuFeatureFlags flags; | 490 GpuFeatureFlags flags; |
491 // No need to go through blacklist entries if GPUInfo isn't available. | 491 // No need to go through blacklist entries if GPUInfo isn't available. |
492 if (gpu_info.progress() == GPUInfo::kUninitialized) | 492 if (gpu_info.level() == GPUInfo::kUninitialized) |
493 return flags; | 493 return flags; |
494 scoped_ptr<Version> driver_version( | 494 scoped_ptr<Version> driver_version( |
495 Version::GetVersionFromString(gpu_info.driver_version())); | 495 Version::GetVersionFromString(gpu_info.driver_version())); |
496 if (driver_version.get() == NULL) | 496 if (driver_version.get() == NULL) |
497 return flags; | 497 return flags; |
498 | 498 |
499 if (os == kOsAny) | 499 if (os == kOsAny) |
500 os = GetOsType(); | 500 os = GetOsType(); |
501 scoped_ptr<Version> my_os_version; | 501 scoped_ptr<Version> my_os_version; |
502 if (os_version == NULL) { | 502 if (os_version == NULL) { |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
575 #endif | 575 #endif |
576 } | 576 } |
577 | 577 |
578 void GpuBlacklist::Clear() { | 578 void GpuBlacklist::Clear() { |
579 for (size_t i = 0; i < blacklist_.size(); ++i) | 579 for (size_t i = 0; i < blacklist_.size(); ++i) |
580 delete blacklist_[i]; | 580 delete blacklist_[i]; |
581 blacklist_.clear(); | 581 blacklist_.clear(); |
582 active_entries_.clear(); | 582 active_entries_.clear(); |
583 } | 583 } |
584 | 584 |
OLD | NEW |