diff options
-rw-r--r-- | chrome/browser/gpu_blacklist.cc | 9 | ||||
-rw-r--r-- | content/gpu/gpu_info_collector_win.cc | 14 |
2 files changed, 19 insertions, 4 deletions
diff --git a/chrome/browser/gpu_blacklist.cc b/chrome/browser/gpu_blacklist.cc index efeb7f3..79c41b9 100644 --- a/chrome/browser/gpu_blacklist.cc +++ b/chrome/browser/gpu_blacklist.cc @@ -701,13 +701,16 @@ bool GpuBlacklist::GpuBlacklistEntry::Contains( !gl_renderer_info_->Contains(gpu_info.gl_renderer)) return false; if (perf_graphics_info_.get() != NULL && - !perf_graphics_info_->Contains(gpu_info.performance_stats.graphics)) + (gpu_info.performance_stats.graphics == 0.0 || + !perf_graphics_info_->Contains(gpu_info.performance_stats.graphics))) return false; if (perf_gaming_info_.get() != NULL && - !perf_gaming_info_->Contains(gpu_info.performance_stats.gaming)) + (gpu_info.performance_stats.gaming == 0.0 || + !perf_gaming_info_->Contains(gpu_info.performance_stats.gaming))) return false; if (perf_overall_info_.get() != NULL && - !perf_overall_info_->Contains(gpu_info.performance_stats.overall)) + (gpu_info.performance_stats.overall == 0.0 || + !perf_overall_info_->Contains(gpu_info.performance_stats.overall))) return false; for (size_t i = 0; i < exceptions_.size(); ++i) { if (exceptions_[i]->Contains(os_type, os_version, gpu_info)) diff --git a/content/gpu/gpu_info_collector_win.cc b/content/gpu/gpu_info_collector_win.cc index 37cee26..c56d5868 100644 --- a/content/gpu/gpu_info_collector_win.cc +++ b/content/gpu/gpu_info_collector_win.cc @@ -71,7 +71,19 @@ content::GpuPerformanceStats RetrieveGpuPerformanceStats() { hr = assessment->get_Info(&results); if (FAILED(hr)) { - LOG(ERROR) << "assessment->get_Info() failed"; + LOG(ERROR) << "get_Info() failed"; + break; + } + + WINSAT_ASSESSMENT_STATE state = WINSAT_ASSESSMENT_STATE_UNKNOWN; + hr = results->get_AssessmentState(&state); + if (FAILED(hr)) { + LOG(ERROR) << "get_AssessmentState() failed"; + break; + } + if (state != WINSAT_ASSESSMENT_STATE_VALID && + state != WINSAT_ASSESSMENT_STATE_INCOHERENT_WITH_HARDWARE) { + LOG(ERROR) << "Can't retrieve a valid assessment"; break; } |