Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(562)

Unified Diff: content/browser/gpu/gpu_data_manager_impl_private.cc

Issue 1463823002: Add DriverBugWorkaroundsInGpuProcessPage to gpu_process_test.py (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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();
}
« no previous file with comments | « no previous file | content/common/gpu/gpu_messages.h » ('j') | content/test/gpu/gpu_tests/driver_bug_workarounds.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698