diff options
author | zmo <zmo@chromium.org> | 2015-03-17 11:08:55 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-03-17 18:10:06 +0000 |
commit | 7bc34f43f0c06e849031bab4abaada1e08ea2037 (patch) | |
tree | 07ca4aff0739faaf80898b313a9a91f29abbbedc /gpu/config | |
parent | 0bdea05adc8f4c409053bab44e0a84436b4f2aec (diff) | |
download | chromium_src-7bc34f43f0c06e849031bab4abaada1e08ea2037.zip chromium_src-7bc34f43f0c06e849031bab4abaada1e08ea2037.tar.gz chromium_src-7bc34f43f0c06e849031bab4abaada1e08ea2037.tar.bz2 |
Deprecate WinSAT support in Chromium.
BUG=456004
TEST=gpu_unittests, about:gpu page
R=kbr@chromium.org
Review URL: https://codereview.chromium.org/1018463002
Cr-Commit-Position: refs/heads/master@{#320942}
Diffstat (limited to 'gpu/config')
-rw-r--r-- | gpu/config/BUILD.gn | 1 | ||||
-rw-r--r-- | gpu/config/gpu_blacklist_unittest.cc | 3 | ||||
-rw-r--r-- | gpu/config/gpu_control_list.cc | 12 | ||||
-rw-r--r-- | gpu/config/gpu_control_list_entry_unittest.cc | 58 | ||||
-rw-r--r-- | gpu/config/gpu_control_list_format.txt | 27 | ||||
-rw-r--r-- | gpu/config/gpu_control_list_unittest.cc | 3 | ||||
-rw-r--r-- | gpu/config/gpu_driver_bug_list_unittest.cc | 3 | ||||
-rw-r--r-- | gpu/config/gpu_info.cc | 1 | ||||
-rw-r--r-- | gpu/config/gpu_info.h | 4 | ||||
-rw-r--r-- | gpu/config/gpu_info_collector_win.cc | 112 | ||||
-rw-r--r-- | gpu/config/gpu_performance_stats.h | 23 | ||||
-rw-r--r-- | gpu/config/software_rendering_list_json.cc | 28 |
12 files changed, 13 insertions, 262 deletions
diff --git a/gpu/config/BUILD.gn b/gpu/config/BUILD.gn index 6139153..9304695 100644 --- a/gpu/config/BUILD.gn +++ b/gpu/config/BUILD.gn @@ -35,7 +35,6 @@ source_set("config") { "gpu_info_collector_ozone.cc", "gpu_info_collector_win.cc", "gpu_info_collector_x11.cc", - "gpu_performance_stats.h", "gpu_test_config.cc", "gpu_test_config.h", "gpu_test_expectations_parser.cc", diff --git a/gpu/config/gpu_blacklist_unittest.cc b/gpu/config/gpu_blacklist_unittest.cc index c9fa415..1a3deb6 100644 --- a/gpu/config/gpu_blacklist_unittest.cc +++ b/gpu/config/gpu_blacklist_unittest.cc @@ -65,9 +65,6 @@ class GpuBlacklistTest : public testing::Test { gpu_info_.machine_model_version = "7.1"; gpu_info_.gl_vendor = "NVIDIA Corporation"; gpu_info_.gl_renderer = "NVIDIA GeForce GT 120 OpenGL Engine"; - gpu_info_.performance_stats.graphics = 5.0; - gpu_info_.performance_stats.gaming = 5.0; - gpu_info_.performance_stats.overall = 5.0; } void TearDown() override {} diff --git a/gpu/config/gpu_control_list.cc b/gpu/config/gpu_control_list.cc index c95ef9f..3dd1d92 100644 --- a/gpu/config/gpu_control_list.cc +++ b/gpu/config/gpu_control_list.cc @@ -1204,18 +1204,6 @@ bool GpuControlList::GpuControlListEntry::Contains( !gl_reset_notification_strategy_info_->Contains( gpu_info.gl_reset_notification_strategy)) return false; - if (perf_graphics_info_.get() != NULL && - (gpu_info.performance_stats.graphics == 0.0 || - !perf_graphics_info_->Contains(gpu_info.performance_stats.graphics))) - return false; - if (perf_gaming_info_.get() != NULL && - (gpu_info.performance_stats.gaming == 0.0 || - !perf_gaming_info_->Contains(gpu_info.performance_stats.gaming))) - return false; - if (perf_overall_info_.get() != NULL && - (gpu_info.performance_stats.overall == 0.0 || - !perf_overall_info_->Contains(gpu_info.performance_stats.overall))) - return false; if (!machine_model_name_list_.empty()) { if (gpu_info.machine_model_name.empty()) return false; diff --git a/gpu/config/gpu_control_list_entry_unittest.cc b/gpu/config/gpu_control_list_entry_unittest.cc index 5587446..0c31e20 100644 --- a/gpu/config/gpu_control_list_entry_unittest.cc +++ b/gpu/config/gpu_control_list_entry_unittest.cc @@ -59,9 +59,6 @@ class GpuControlListEntryTest : public testing::Test { gpu_info_.gl_version = "2.1 NVIDIA-8.24.11 310.90.9b01"; gpu_info_.gl_vendor = "NVIDIA Corporation"; gpu_info_.gl_renderer = "NVIDIA GeForce GT 120 OpenGL Engine"; - gpu_info_.performance_stats.graphics = 5.0; - gpu_info_.performance_stats.gaming = 5.0; - gpu_info_.performance_stats.overall = 5.0; } protected: @@ -610,61 +607,6 @@ TEST_F(GpuControlListEntryTest, GlExtensionsEndWith) { GpuControlList::kOsMacosx, "10.9", gpu_info)); } -TEST_F(GpuControlListEntryTest, PerfGraphicsEntry) { - const std::string json = LONG_STRING_CONST( - { - "id": 1, - "perf_graphics": { - "op": "<", - "value": "6.0" - }, - "features": [ - "test_feature_0" - ] - } - ); - ScopedEntry entry(GetEntryFromString(json)); - EXPECT_TRUE(entry.get() != NULL); - EXPECT_TRUE(entry->Contains(GpuControlList::kOsWin, "10.6", gpu_info())); -} - -TEST_F(GpuControlListEntryTest, PerfGamingEntry) { - const std::string json = LONG_STRING_CONST( - { - "id": 1, - "perf_graphics": { - "op": "<=", - "value": "4.0" - }, - "features": [ - "test_feature_0" - ] - } - ); - ScopedEntry entry(GetEntryFromString(json)); - EXPECT_TRUE(entry.get() != NULL); - EXPECT_FALSE(entry->Contains(GpuControlList::kOsWin, "10.6", gpu_info())); -} - -TEST_F(GpuControlListEntryTest, PerfOverallEntry) { - const std::string json = LONG_STRING_CONST( - { - "id": 1, - "perf_overall": { - "op": "between", - "value": "1.0", - "value2": "9.0" - }, - "features": [ - "test_feature_0" - ] - } - ); - ScopedEntry entry(GetEntryFromString(json)); - EXPECT_TRUE(entry.get() != NULL); - EXPECT_TRUE(entry->Contains(GpuControlList::kOsWin, "10.6", gpu_info())); -} - TEST_F(GpuControlListEntryTest, DisabledEntry) { const std::string json = LONG_STRING_CONST( { diff --git a/gpu/config/gpu_control_list_format.txt b/gpu/config/gpu_control_list_format.txt index c897cb6..88c6f29c 100644 --- a/gpu/config/gpu_control_list_format.txt +++ b/gpu/config/gpu_control_list_format.txt @@ -44,24 +44,21 @@ // 12. "gl_vendor" is a string pattern. // 13. "gl_renderer" is a string pattern. // 14. "gl_extensions" is a string pattern. -// 15. "perf_graphics" is a FLOAT structure (defined below). -// 16. "perf_gaming" is a FLOAT structure (defined below). -// 17. "perf_overall" is a FLOAT structure (defined below). -// 18. "machine_model_name" is an array of string patterns. -// 19. "machine_model_version" is a VERSION structure (defined below). -// 20. "gpu_count" is a INT structure (defined below). -// 21 "cpu_info" is a string pattern. -// 22. "exceptions" is a list of entries. -// 23. "features" is a list of gpu control list options, which can be +// 15. "machine_model_name" is an array of string patterns. +// 16. "machine_model_version" is a VERSION structure (defined below). +// 17. "gpu_count" is a INT structure (defined below). +// 18. "cpu_info" is a string pattern. +// 19. "exceptions" is a list of entries. +// 20. "features" is a list of gpu control list options, which can be // configured by a specific list. See its *_json.cc file for a list of // supported features. This field is mandatory. -// 24. "description" has the description of the entry. -// 25. "webkit_bugs" is an array of associated webkit bug numbers. -// 26. "cr_bugs" is an array of associated webkit bug numbers. -// 27. "disabled" is a boolean. If it is present, the entry will be skipped. +// 21. "description" has the description of the entry. +// 22. "webkit_bugs" is an array of associated webkit bug numbers. +// 23. "cr_bugs" is an array of associated webkit bug numbers. +// 24. "disabled" is a boolean. If it is present, the entry will be skipped. // This can not be used in exceptions. -// 28. "direct_rendering" is a boolean. If present, this will filter on whether -// the GL contexts are direct or indirect based on the value. +// 25. "direct_rendering" is a boolean. If present, this will filter on whether +// the GL contexts are direct or indirect based on the value. // // VERSION includes "op", "style", "value", and "value2". "op" can be any of // the following values: "=", "<", "<=", ">", ">=", "any", "between". "style" diff --git a/gpu/config/gpu_control_list_unittest.cc b/gpu/config/gpu_control_list_unittest.cc index f9681838..716722c 100644 --- a/gpu/config/gpu_control_list_unittest.cc +++ b/gpu/config/gpu_control_list_unittest.cc @@ -57,9 +57,6 @@ class GpuControlListTest : public testing::Test { gpu_info_.machine_model_version = "7.1"; gpu_info_.gl_vendor = "NVIDIA Corporation"; gpu_info_.gl_renderer = "NVIDIA GeForce GT 120 OpenGL Engine"; - gpu_info_.performance_stats.graphics = 5.0; - gpu_info_.performance_stats.gaming = 5.0; - gpu_info_.performance_stats.overall = 5.0; } void TearDown() override {} diff --git a/gpu/config/gpu_driver_bug_list_unittest.cc b/gpu/config/gpu_driver_bug_list_unittest.cc index 33e09a1..4d62c39 100644 --- a/gpu/config/gpu_driver_bug_list_unittest.cc +++ b/gpu/config/gpu_driver_bug_list_unittest.cc @@ -36,9 +36,6 @@ class GpuDriverBugListTest : public testing::Test { gpu_info_.machine_model_version = "7.1"; gpu_info_.gl_vendor = "NVIDIA Corporation"; gpu_info_.gl_renderer = "NVIDIA GeForce GT 120 OpenGL Engine"; - gpu_info_.performance_stats.graphics = 5.0; - gpu_info_.performance_stats.gaming = 5.0; - gpu_info_.performance_stats.overall = 5.0; } void TearDown() override {} diff --git a/gpu/config/gpu_info.cc b/gpu/config/gpu_info.cc index 6ceb7fc..2cba5d8 100644 --- a/gpu/config/gpu_info.cc +++ b/gpu/config/gpu_info.cc @@ -90,7 +90,6 @@ void GPUInfo::EnumerateFields(Enumerator* enumerator) const { std::string gl_ws_extensions; uint32 gl_reset_notification_strategy; bool can_lose_context; - GpuPerformanceStats performance_stats; bool software_rendering; bool direct_rendering; bool sandboxed; diff --git a/gpu/config/gpu_info.h b/gpu/config/gpu_info.h index 7c92d3a..e5bef23 100644 --- a/gpu/config/gpu_info.h +++ b/gpu/config/gpu_info.h @@ -16,7 +16,6 @@ #include "base/version.h" #include "build/build_config.h" #include "gpu/config/dx_diag_node.h" -#include "gpu/config/gpu_performance_stats.h" #include "gpu/gpu_export.h" #include "ui/gfx/geometry/size.h" @@ -180,9 +179,6 @@ struct GPU_EXPORT GPUInfo { // semantics are available. bool can_lose_context; - // By default all values are 0. - GpuPerformanceStats performance_stats; - bool software_rendering; // Whether the driver uses direct rendering. True on most platforms, false on diff --git a/gpu/config/gpu_info_collector_win.cc b/gpu/config/gpu_info_collector_win.cc index e8c8f2f..c942852 100644 --- a/gpu/config/gpu_info_collector_win.cc +++ b/gpu/config/gpu_info_collector_win.cc @@ -63,116 +63,6 @@ float ReadXMLFloatValue(XmlReader* reader) { return static_cast<float>(score); } -GpuPerformanceStats RetrieveGpuPerformanceStats() { - TRACE_EVENT0("gpu", "RetrieveGpuPerformanceStats"); - - // If the user re-runs the assessment without restarting, the COM API - // returns WINSAT_ASSESSMENT_STATE_NOT_AVAILABLE. Because of that and - // http://crbug.com/124325, read the assessment result files directly. - GpuPerformanceStats stats; - - // Get path to WinSAT results files. - wchar_t winsat_results_path[MAX_PATH]; - DWORD size = ExpandEnvironmentStrings( - L"%WinDir%\\Performance\\WinSAT\\DataStore\\", - winsat_results_path, MAX_PATH); - if (size == 0 || size > MAX_PATH) { - LOG(ERROR) << "The path to the WinSAT results is too long: " - << size << " chars."; - return stats; - } - - // Find most recent formal assessment results. - base::FileEnumerator file_enumerator( - base::FilePath(winsat_results_path), - false, // not recursive - base::FileEnumerator::FILES, - FILE_PATH_LITERAL("* * Formal.Assessment (*).WinSAT.xml")); - - base::FilePath current_results; - for (base::FilePath results = file_enumerator.Next(); !results.empty(); - results = file_enumerator.Next()) { - // The filenames start with the date and time as yyyy-mm-dd hh.mm.ss.xxx, - // so the greatest file lexicographically is also the most recent file. - if (base::FilePath::CompareLessIgnoreCase(current_results.value(), - results.value())) - current_results = results; - } - - std::string current_results_string = current_results.MaybeAsASCII(); - if (current_results_string.empty()) - return stats; - - // Get relevant scores from results file. XML schema at: - // http://msdn.microsoft.com/en-us/library/windows/desktop/aa969210.aspx - XmlReader reader; - if (!reader.LoadFile(current_results_string)) { - LOG(ERROR) << "Could not open WinSAT results file."; - return stats; - } - // Descend into <WinSAT> root element. - if (!reader.SkipToElement() || !reader.Read()) { - LOG(ERROR) << "Could not read WinSAT results file."; - return stats; - } - - // Search for <WinSPR> element containing the results. - do { - if (reader.NodeName() == "WinSPR") - break; - } while (reader.Next()); - // Descend into <WinSPR> element. - if (!reader.Read()) { - LOG(ERROR) << "Could not find WinSPR element in results file."; - return stats; - } - - // Read scores. - for (int depth = reader.Depth(); reader.Depth() == depth; reader.Next()) { - std::string node_name = reader.NodeName(); - if (node_name == "SystemScore") - stats.overall = ReadXMLFloatValue(&reader); - else if (node_name == "GraphicsScore") - stats.graphics = ReadXMLFloatValue(&reader); - else if (node_name == "GamingScore") - stats.gaming = ReadXMLFloatValue(&reader); - } - - if (stats.overall == 0.0) - LOG(ERROR) << "Could not read overall score from assessment results."; - if (stats.graphics == 0.0) - LOG(ERROR) << "Could not read graphics score from assessment results."; - if (stats.gaming == 0.0) - LOG(ERROR) << "Could not read gaming score from assessment results."; - - return stats; -} - -GpuPerformanceStats RetrieveGpuPerformanceStatsWithHistograms() { - base::TimeTicks start_time = base::TimeTicks::Now(); - - GpuPerformanceStats stats = RetrieveGpuPerformanceStats(); - - UMA_HISTOGRAM_TIMES("GPU.WinSAT.ReadResultsFileTime", - base::TimeTicks::Now() - start_time); - UMA_HISTOGRAM_CUSTOM_COUNTS( - "GPU.WinSAT.OverallScore2", - static_cast<base::HistogramBase::Sample>(stats.overall * 10), 10, 200, - 50); - UMA_HISTOGRAM_CUSTOM_COUNTS( - "GPU.WinSAT.GraphicsScore2", - static_cast<base::HistogramBase::Sample>(stats.graphics * 10), 10, 200, - 50); - UMA_HISTOGRAM_CUSTOM_COUNTS( - "GPU.WinSAT.GamingScore2", - static_cast<base::HistogramBase::Sample>(stats.gaming * 10), 10, 200, 50); - UMA_HISTOGRAM_BOOLEAN( - "GPU.WinSAT.HasResults", - stats.overall != 0.0 && stats.graphics != 0.0 && stats.gaming != 0.0); - - return stats; -} - // Returns the display link driver version or an invalid version if it is // not installed. Version DisplayLinkVersion() { @@ -505,8 +395,6 @@ CollectInfoResult CollectBasicGraphicsInfo(GPUInfo* gpu_info) { DCHECK(gpu_info); - gpu_info->performance_stats = RetrieveGpuPerformanceStatsWithHistograms(); - // nvd3d9wrap.dll is loaded into all processes when Optimus is enabled. HMODULE nvd3d9wrap = GetModuleHandleW(L"nvd3d9wrap.dll"); gpu_info->optimus = nvd3d9wrap != NULL; diff --git a/gpu/config/gpu_performance_stats.h b/gpu/config/gpu_performance_stats.h deleted file mode 100644 index 2ade8bf..0000000 --- a/gpu/config/gpu_performance_stats.h +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef GPU_CONFIG_GPU_PERFORMANCE_STATS_H_ -#define GPU_CONFIG_GPU_PERFORMANCE_STATS_H_ - -#include "gpu/gpu_export.h" - -namespace gpu { - -struct GPU_EXPORT GpuPerformanceStats { - GpuPerformanceStats() : graphics(0.f), gaming(0.f), overall(0.f) {} - - float graphics; - float gaming; - float overall; -}; - -} // namespace gpu - -#endif // GPU_CONFIG_GPU_PERFORMANCE_STATS_H_ - diff --git a/gpu/config/software_rendering_list_json.cc b/gpu/config/software_rendering_list_json.cc index 95d828d..bd846a6 100644 --- a/gpu/config/software_rendering_list_json.cc +++ b/gpu/config/software_rendering_list_json.cc @@ -18,7 +18,7 @@ const char kSoftwareRenderingListJson[] = LONG_STRING_CONST( { "name": "software rendering list", // Please update the version number whenever you change this file. - "version": "9.19", + "version": "10.0", "entries": [ { "id": 1, @@ -336,32 +336,6 @@ const char kSoftwareRenderingListJson[] = LONG_STRING_CONST( ] }, { - "id": 32, - "description": "Accelerated 2d canvas is disabled on Windows systems with low perf stats", - "cr_bugs": [116350, 151500], - "os": { - "type": "win" - }, - "perf_overall": { - "op": "<", - "value": "3.5" - }, - "exceptions": [ - { - "perf_gaming": { - "op": ">", - "value": "3.5" - } - }, - { - "cpu_info": "(?i).*Atom.*" - } - ], - "features": [ - "accelerated_2d_canvas" - ] - }, - { "id": 34, "description": "S3 Trio (used in Virtual PC) is not compatible", "cr_bugs": [119948], |