| Index: content/browser/gpu/gpu_data_manager_impl_private.cc
|
| diff --git a/content/browser/gpu/gpu_data_manager_impl_private.cc b/content/browser/gpu/gpu_data_manager_impl_private.cc
|
| index ec1776cd4b31b9b23bab96e8e19a17ef3d304154..acc26c4f78030668a08eb05a86f133659edb784b 100644
|
| --- a/content/browser/gpu/gpu_data_manager_impl_private.cc
|
| +++ b/content/browser/gpu/gpu_data_manager_impl_private.cc
|
| @@ -10,6 +10,7 @@
|
| #include "base/metrics/field_trial.h"
|
| #include "base/metrics/histogram.h"
|
| #include "base/metrics/sparse_histogram.h"
|
| +#include "base/stl_util.h"
|
| #include "base/strings/string_number_conversions.h"
|
| #include "base/strings/stringprintf.h"
|
| #include "base/sys_info.h"
|
| @@ -570,6 +571,8 @@ void GpuDataManagerImplPrivate::UpdateGpuInfoHelper() {
|
| UpdateBlacklistedFeatures(features);
|
| }
|
| if (gpu_driver_bug_list_) {
|
| + // XXX Maybe just do gpu_driver_bugs_ = gpu_info_.driver_bugs_workarounds
|
| + // instead of recomputing.
|
| gpu_driver_bugs_ = gpu_driver_bug_list_->MakeDecision(
|
| gpu::GpuControlList::kOsAny, std::string(), gpu_info_);
|
|
|
| @@ -579,6 +582,16 @@ void GpuDataManagerImplPrivate::UpdateGpuInfoHelper() {
|
| gpu::GpuDriverBugList::AppendWorkaroundsFromCommandLine(
|
| &gpu_driver_bugs_, *base::CommandLine::ForCurrentProcess());
|
|
|
| + // XXX Follwing block is not necesarry if above XXX is applied.
|
| + if (!gpu_info_.driver_bugs_workarounds.empty()) {
|
| + std::set<int> diff_gpu_driver_bugs = base::STLSetDifference<std::set<int>>(
|
| + gpu_driver_bugs_, gpu_info_.driver_bugs_workarounds);
|
| + if (!diff_gpu_driver_bugs.empty()) {
|
| + LOG(ERROR) << "gpu driver bug workarounds not in sync, force it";
|
| + gpu_driver_bugs_ = gpu_info_.driver_bugs_workarounds;
|
| + }
|
| + }
|
| +
|
| // We have to update GpuFeatureType before notify all the observers.
|
| NotifyGpuInfoUpdate();
|
| }
|
|
|