summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/gpu/chrome_gpu_util.cc26
-rw-r--r--chrome/test/base/test_launcher_utils.cc4
-rw-r--r--chrome/test/gpu/gpu_feature_browsertest.cc41
-rw-r--r--content/browser/gpu/compositor_util.cc25
-rw-r--r--content/browser/gpu/compositor_util_browsertest.cc33
-rw-r--r--content/browser/gpu/gpu_data_manager_impl_private.cc29
-rw-r--r--content/content_tests.gypi3
-rw-r--r--content/public/common/content_switches.cc6
-rw-r--r--content/public/common/content_switches.h1
-rw-r--r--content/public/test/browser_test_base.cc4
-rw-r--r--gpu/config/gpu_control_list.cc12
-rw-r--r--gpu/config/gpu_control_list.h8
-rw-r--r--gpu/config/software_rendering_list_json.cc20
13 files changed, 80 insertions, 132 deletions
diff --git a/chrome/browser/gpu/chrome_gpu_util.cc b/chrome/browser/gpu/chrome_gpu_util.cc
index c2f646d..61da773 100644
--- a/chrome/browser/gpu/chrome_gpu_util.cc
+++ b/chrome/browser/gpu/chrome_gpu_util.cc
@@ -40,6 +40,32 @@ bool ShouldRunCompositingFieldTrial() {
return false;
#endif
+// Necessary for linux_chromeos build since it defines both OS_LINUX
+// and OS_CHROMEOS.
+#if defined(OS_CHROMEOS)
+ return false;
+#endif
+
+#if defined(OS_WIN)
+ // Don't run the trial on Windows XP.
+ if (base::win::GetVersion() < base::win::VERSION_VISTA)
+ return false;
+#endif
+
+#if defined(OS_MACOSX)
+ // Browser and content shell tests hang on 10.7 when the Apple software
+ // renderer is used. These tests ignore the blacklist (which disables
+ // compositing both on 10.7 and when the Apple software renderer is used)
+ // by specifying the kSkipGpuDataLoading switch, so disable forced
+ // compositing here based on the switch and OS version.
+ // http://crbug.com/230931
+ if (base::mac::IsOSLion() &&
+ CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kSkipGpuDataLoading)) {
+ return false;
+ }
+#endif
+
// Don't activate the field trial if force-compositing-mode has been
// explicitly disabled from the command line.
if (CommandLine::ForCurrentProcess()->HasSwitch(
diff --git a/chrome/test/base/test_launcher_utils.cc b/chrome/test/base/test_launcher_utils.cc
index f5bf93c..1f81ef9 100644
--- a/chrome/test/base/test_launcher_utils.cc
+++ b/chrome/test/base/test_launcher_utils.cc
@@ -47,6 +47,10 @@ void PrepareBrowserCommandLineForTests(CommandLine* command_line) {
// Don't install default apps.
command_line->AppendSwitch(switches::kDisableDefaultApps);
+ // Don't collect GPU info, load GPU blacklist, or schedule a GPU blacklist
+ // auto-update.
+ command_line->AppendSwitch(switches::kSkipGpuDataLoading);
+
#if defined(USE_AURA)
// Disable window animations under Ash as the animations effect the
// coordinates returned and result in flake.
diff --git a/chrome/test/gpu/gpu_feature_browsertest.cc b/chrome/test/gpu/gpu_feature_browsertest.cc
index 5e36c09..a1baa93 100644
--- a/chrome/test/gpu/gpu_feature_browsertest.cc
+++ b/chrome/test/gpu/gpu_feature_browsertest.cc
@@ -187,15 +187,11 @@ IN_PROC_BROWSER_TEST_F(GpuFeatureTest, MAYBE_AcceleratedCompositingAllowed) {
RunEventTest(url, kSwapBuffersEvent, true);
}
-#if defined(USE_AURA)
-// Compositing is always on for Aura.
-#define MAYBE_AcceleratedCompositingBlocked DISABLED_AcceleratedCompositingBlocked
-#else
-#define MAYBE_AcceleratedCompositingBlocked AcceleratedCompositingBlocked
-#endif
-
-IN_PROC_BROWSER_TEST_F(GpuFeatureTest, MAYBE_AcceleratedCompositingBlocked) {
- const std::string json_blacklist =
+class AcceleratedCompositingBlockedTest : public GpuFeatureTest {
+ public:
+ virtual void SetUpInProcessBrowserTestFixture() OVERRIDE {
+ GpuFeatureTest::SetUpInProcessBrowserTestFixture();
+ const std::string json_blacklist =
"{\n"
" \"name\": \"gpu blacklist\",\n"
" \"version\": \"1.0\",\n"
@@ -208,7 +204,19 @@ IN_PROC_BROWSER_TEST_F(GpuFeatureTest, MAYBE_AcceleratedCompositingBlocked) {
" }\n"
" ]\n"
"}";
- SetupBlacklist(json_blacklist);
+ SetupBlacklist(json_blacklist);
+ }
+};
+
+#if defined(USE_AURA)
+// Compositing is always on for Aura.
+#define MAYBE_AcceleratedCompositingBlocked DISABLED_AcceleratedCompositingBlocked
+#else
+#define MAYBE_AcceleratedCompositingBlocked AcceleratedCompositingBlocked
+#endif
+
+IN_PROC_BROWSER_TEST_F(AcceleratedCompositingBlockedTest,
+ MAYBE_AcceleratedCompositingBlocked) {
EXPECT_TRUE(GpuDataManager::GetInstance()->IsFeatureBlacklisted(
gpu::GPU_FEATURE_TYPE_ACCELERATED_COMPOSITING));
@@ -358,18 +366,11 @@ IN_PROC_BROWSER_TEST_F(GpuFeatureTest, Canvas2DAllowed) {
if (gpu::GPUTestBotConfig::CurrentConfigMatches("XP"))
return;
- bool is_blacklisted = false;
-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
- // Blacklist rule #24 disables accelerated_2d_canvas on Linux.
- is_blacklisted = true;
-#endif
-
- EXPECT_EQ(is_blacklisted,
- GpuDataManager::GetInstance()->IsFeatureBlacklisted(
- gpu::GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS));
+ EXPECT_FALSE(GpuDataManager::GetInstance()->IsFeatureBlacklisted(
+ gpu::GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS));
const base::FilePath url(FILE_PATH_LITERAL("feature_canvas2d.html"));
- RunEventTest(url, kAcceleratedCanvasCreationEvent, !is_blacklisted);
+ RunEventTest(url, kAcceleratedCanvasCreationEvent, true);
}
IN_PROC_BROWSER_TEST_F(GpuFeatureTest, Canvas2DBlocked) {
diff --git a/content/browser/gpu/compositor_util.cc b/content/browser/gpu/compositor_util.cc
index 150005a..8afd0e9 100644
--- a/content/browser/gpu/compositor_util.cc
+++ b/content/browser/gpu/compositor_util.cc
@@ -6,7 +6,6 @@
#include "base/command_line.h"
#include "base/metrics/field_trial.h"
-#include "build/build_config.h"
#include "content/public/browser/gpu_data_manager.h"
#include "content/public/common/content_constants.h"
#include "content/public/common/content_switches.h"
@@ -37,6 +36,11 @@ bool CanDoAcceleratedCompositing() {
return true;
}
+bool IsForceCompositingModeBlacklisted() {
+ return GpuDataManager::GetInstance()->IsFeatureBlacklisted(
+ gpu::GPU_FEATURE_TYPE_FORCE_COMPOSITING_MODE);
+}
+
} // namespace
bool IsThreadedCompositingEnabled() {
@@ -45,17 +49,20 @@ bool IsThreadedCompositingEnabled() {
return true;
#endif
+ if (!CanDoAcceleratedCompositing())
+ return false;
+
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
// Command line switches take precedence over blacklist and field trials.
if (command_line.HasSwitch(switches::kDisableForceCompositingMode) ||
- command_line.HasSwitch(switches::kDisableThreadedCompositing)) {
+ command_line.HasSwitch(switches::kDisableThreadedCompositing))
return false;
- } else if (command_line.HasSwitch(switches::kEnableThreadedCompositing)) {
+
+ if (command_line.HasSwitch(switches::kEnableThreadedCompositing))
return true;
- }
- if (!CanDoAcceleratedCompositing())
+ if (IsForceCompositingModeBlacklisted())
return false;
base::FieldTrial* trial =
@@ -70,15 +77,19 @@ bool IsForceCompositingModeEnabled() {
return true;
#endif
+ if (!CanDoAcceleratedCompositing())
+ return false;
+
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
// Command line switches take precedence over blacklisting and field trials.
if (command_line.HasSwitch(switches::kDisableForceCompositingMode))
return false;
- else if (command_line.HasSwitch(switches::kForceCompositingMode))
+
+ if (command_line.HasSwitch(switches::kForceCompositingMode))
return true;
- if (!CanDoAcceleratedCompositing())
+ if (IsForceCompositingModeBlacklisted())
return false;
base::FieldTrial* trial =
diff --git a/content/browser/gpu/compositor_util_browsertest.cc b/content/browser/gpu/compositor_util_browsertest.cc
deleted file mode 100644
index d58db54..0000000
--- a/content/browser/gpu/compositor_util_browsertest.cc
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright 2013 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.
-
-#include "content/browser/gpu/compositor_util.h"
-#include "content/test/content_browser_test.h"
-
-#if defined(OS_WIN)
-#include "base/win/windows_version.h"
-#endif
-
-namespace content {
-
-typedef ContentBrowserTest CompositorUtilTest;
-
-// Test that threaded compositing and FCM are in the expected mode on the bots
-// for all platforms.
-IN_PROC_BROWSER_TEST_F(CompositorUtilTest, CompositingModeAsExpected) {
- enum CompositingMode {
- DISABLED,
- ENABLED,
- THREADED,
- } expected_mode = DISABLED;
-#if defined(OS_ANDROID) || defined(USE_AURA)
- expected_mode = THREADED;
-#endif
-
- EXPECT_EQ(expected_mode == ENABLED || expected_mode == THREADED,
- IsForceCompositingModeEnabled());
- EXPECT_EQ(expected_mode == THREADED, IsThreadedCompositingEnabled());
-}
-
-}
diff --git a/content/browser/gpu/gpu_data_manager_impl_private.cc b/content/browser/gpu/gpu_data_manager_impl_private.cc
index 08472e5..ee5463d 100644
--- a/content/browser/gpu/gpu_data_manager_impl_private.cc
+++ b/content/browser/gpu/gpu_data_manager_impl_private.cc
@@ -571,30 +571,13 @@ void GpuDataManagerImplPrivate::GetGLStrings(std::string* gl_vendor,
void GpuDataManagerImplPrivate::Initialize() {
TRACE_EVENT0("startup", "GpuDataManagerImpl::Initialize");
- const CommandLine* command_line = CommandLine::ForCurrentProcess();
- if (command_line->HasSwitch(switches::kSkipGpuDataLoading))
+ CommandLine* command_line = CommandLine::ForCurrentProcess();
+ if (command_line->HasSwitch(switches::kSkipGpuDataLoading) &&
+ !command_line->HasSwitch(switches::kUseGpuInTests))
return;
gpu::GPUInfo gpu_info;
- if (command_line->GetSwitchValueASCII(
- switches::kUseGL) == gfx::kGLImplementationOSMesaName) {
- // If using the OSMesa GL implementation, use fake vendor and device ids to
- // make sure it never gets blacklisted. This is better than simply
- // cancelling GPUInfo gathering as it allows us to proceed with loading the
- // blacklist below which may have non-device specific entries we want to
- // apply anyways (e.g., OS version blacklisting).
- gpu_info.gpu.vendor_id = 0xffff;
- gpu_info.gpu.device_id = 0xffff;
-
- // Hardcode some values otherwise some blacklisting rules in
- // kSoftwareRenderingListJson result in a positive match as GpuControlList
- // assumes a match (by design) when a property is required for the
- // verification yet not present in the GpuInfo.
- gpu_info.driver_vendor =
- gfx::kGLImplementationOSMesaName; // Bypass rule #74.
- gpu_info.driver_date = "2013.8"; // Bypass rules #12 and #55.
- gpu_info.driver_version = "9.0.3"; // Bypass rule #23.
- } else {
+ {
TRACE_EVENT0("startup",
"GpuDataManagerImpl::Initialize:CollectBasicGraphicsInfo");
gpu::CollectBasicGraphicsInfo(&gpu_info);
@@ -1075,10 +1058,6 @@ void GpuDataManagerImplPrivate::InitializeImpl(
if (!gpu_blacklist_json.empty()) {
gpu_blacklist_.reset(gpu::GpuBlacklist::Create());
- if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kLogGpuControlListDecisions)) {
- gpu_blacklist_->enable_control_list_logging();
- }
gpu_blacklist_->LoadList(
browser_version_string, gpu_blacklist_json,
gpu::GpuControlList::kCurrentOsOnly);
diff --git a/content/content_tests.gypi b/content/content_tests.gypi
index 3061d30..6b2aef6 100644
--- a/content/content_tests.gypi
+++ b/content/content_tests.gypi
@@ -812,11 +812,10 @@
'browser/download/mhtml_generation_browsertest.cc',
'browser/download/save_package_browsertest.cc',
'browser/fileapi/file_system_browsertest.cc',
- 'browser/gpu/compositor_util_browsertest.cc',
'browser/gpu/gpu_crash_browsertest.cc',
- 'browser/gpu/gpu_functional_browsertest.cc',
'browser/gpu/gpu_info_browsertest.cc',
'browser/gpu/gpu_ipc_browsertests.cc',
+ 'browser/gpu/gpu_functional_browsertest.cc',
'browser/gpu/gpu_memory_test.cc',
'browser/gpu/gpu_pixel_browsertest.cc',
'browser/gpu/webgl_conformance_test.cc',
diff --git a/content/public/common/content_switches.cc b/content/public/common/content_switches.cc
index 3e97bd6..2521315 100644
--- a/content/public/common/content_switches.cc
+++ b/content/public/common/content_switches.cc
@@ -611,9 +611,6 @@ const char kJavaScriptFlags[] = "js-flags";
// Load an NPAPI plugin from the specified path.
const char kLoadPlugin[] = "load-plugin";
-// Logs GPU control list decisions when enforcing blacklist rules.
-const char kLogGpuControlListDecisions[] = "log-gpu-control-list-decisions";
-
// Sets the minimum log level. Valid values are from 0 to 3:
// INFO = 0, WARNING = 1, LOG_ERROR = 2, LOG_FATAL = 3.
const char kLoggingLevel[] = "log-level";
@@ -764,8 +761,7 @@ const char kSitePerProcess[] = "site-per-process";
// Skip gpu info collection, blacklist loading, and blacklist auto-update
// scheduling at browser startup time.
// Therefore, all GPU features are available, and about:gpu page shows empty
-// content. The switch is intended only for layout tests.
-// TODO(gab): Get rid of this switch entirely.
+// content. The switch is intended only for tests.
const char kSkipGpuDataLoading[] = "skip-gpu-data-loading";
// Specifies the request key for the continuous speech recognition webservice.
diff --git a/content/public/common/content_switches.h b/content/public/common/content_switches.h
index 5c46dc8..b83a288 100644
--- a/content/public/common/content_switches.h
+++ b/content/public/common/content_switches.h
@@ -181,7 +181,6 @@ extern const char kInProcessGPU[];
extern const char kInProcessPlugins[];
CONTENT_EXPORT extern const char kJavaScriptFlags[];
extern const char kLoadPlugin[];
-CONTENT_EXPORT extern const char kLogGpuControlListDecisions[];
CONTENT_EXPORT extern const char kLoggingLevel[];
CONTENT_EXPORT extern const char kLogNetLog[];
extern const char kLogPluginMessages[];
diff --git a/content/public/test/browser_test_base.cc b/content/public/test/browser_test_base.cc
index bb8f3487..069ba5d 100644
--- a/content/public/test/browser_test_base.cc
+++ b/content/public/test/browser_test_base.cc
@@ -109,9 +109,7 @@ void BrowserTestBase::SetUp() {
command_line->AppendSwitch(switches::kDomAutomationController);
- // It is sometimes useful when looking at browser test failures to know which
- // GPU blacklisting decisions were made.
- command_line->AppendSwitch(switches::kLogGpuControlListDecisions);
+ command_line->AppendSwitch(switches::kSkipGpuDataLoading);
#if defined(USE_AURA)
// Use test contexts for browser tests unless they override and force us to
diff --git a/gpu/config/gpu_control_list.cc b/gpu/config/gpu_control_list.cc
index e106995..5eb09c4 100644
--- a/gpu/config/gpu_control_list.cc
+++ b/gpu/config/gpu_control_list.cc
@@ -10,7 +10,6 @@
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
-#include "base/strings/stringprintf.h"
#include "base/sys_info.h"
#include "gpu/config/gpu_info.h"
#include "gpu/config/gpu_util.h"
@@ -1037,12 +1036,6 @@ GpuControlList::GpuControlListEntry::StringToMultiGpuCategory(
return kMultiGpuCategoryNone;
}
-void GpuControlList::GpuControlListEntry::LogControlListMatch() const {
- static const char kControlListMatchMessage[] =
- "Control list match for rule #%u.";
- LOG(INFO) << base::StringPrintf(kControlListMatchMessage, id_);
-}
-
bool GpuControlList::GpuControlListEntry::Contains(
OsType os_type, const std::string& os_version,
const GPUInfo& gpu_info) const {
@@ -1199,8 +1192,7 @@ GpuControlList::GpuControlList()
: max_entry_id_(0),
contains_unknown_fields_(false),
needs_more_info_(false),
- supports_feature_type_all_(false),
- control_list_logging_enabled_(false) {
+ supports_feature_type_all_(false) {
}
GpuControlList::~GpuControlList() {
@@ -1317,8 +1309,6 @@ std::set<int> GpuControlList::MakeDecision(
for (size_t i = 0; i < entries_.size(); ++i) {
if (entries_[i]->Contains(os, os_version, gpu_info)) {
if (!entries_[i]->disabled()) {
- if (control_list_logging_enabled_)
- entries_[i]->LogControlListMatch();
MergeFeatureSets(&possible_features, entries_[i]->features());
if (!entries_[i]->NeedsMoreInfo(gpu_info))
MergeFeatureSets(&features, entries_[i]->features());
diff --git a/gpu/config/gpu_control_list.h b/gpu/config/gpu_control_list.h
index b6d8d5c..62b66ec 100644
--- a/gpu/config/gpu_control_list.h
+++ b/gpu/config/gpu_control_list.h
@@ -96,9 +96,6 @@ class GPU_EXPORT GpuControlList {
// Register whether "all" is recognized as all features.
void set_supports_feature_type_all(bool supported);
- // Enables logging of control list decisions.
- void enable_control_list_logging() { control_list_logging_enabled_ = true; }
-
private:
friend class GpuControlListEntryTest;
friend class MachineModelInfoTest;
@@ -295,9 +292,6 @@ class GPU_EXPORT GpuControlList {
const FeatureMap& feature_map,
bool supports_feature_type_all);
- // Logs a control list match for this rule.
- void LogControlListMatch() const;
-
// Determines if a given os/gc/machine_model/driver is included in the
// Entry set.
bool Contains(OsType os_type, const std::string& os_version,
@@ -501,8 +495,6 @@ class GPU_EXPORT GpuControlList {
// The features a GpuControlList recognizes and handles.
FeatureMap feature_map_;
bool supports_feature_type_all_;
-
- bool control_list_logging_enabled_;
};
} // namespace gpu
diff --git a/gpu/config/software_rendering_list_json.cc b/gpu/config/software_rendering_list_json.cc
index ef1c47c..4a2f0bf 100644
--- a/gpu/config/software_rendering_list_json.cc
+++ b/gpu/config/software_rendering_list_json.cc
@@ -67,7 +67,7 @@
// "number" is used for all "op" values except "any". "number" and "number2"
// are in the format of x, x.x, x.x.x, etc.
// Only "driver_version" supports lexical style if the format is major.minor;
-// in that case, major is still numerical, but minor is lexical.
+// in that case, major is still numerical, but minor is lexical.
//
// STRING includes "op" and "value". "op" can be any of the following values:
// "contains", "beginwith", "endwith", "=". "value" is a string.
@@ -89,7 +89,7 @@ const char kSoftwareRenderingListJson[] = LONG_STRING_CONST(
{
"name": "software rendering list",
// Please update the version number whenever you change this file.
- "version": "6.7",
+ "version": "6.6",
"entries": [
{
"id": 1,
@@ -1177,21 +1177,6 @@ LONG_STRING_CONST(
"features": [
"multisampling"
]
- },
- {
- "id": 78,
- "description": "Disable force compositing mode on all Windows versions prior to Vista.",
- "cr_bugs": [273920],
- "os": {
- "type": "win",
- "version": {
- "op": "<",
- "number": "6.0"
- }
- },
- "features": [
- "force_compositing_mode"
- ]
}
]
}
@@ -1199,3 +1184,4 @@ LONG_STRING_CONST(
); // LONG_STRING_CONST macro
} // namespace gpu
+