Commit 8f3f6598 authored by ajuma@chromium.org's avatar ajuma@chromium.org

Expand GPU rasterization device whitelist for field trial

This creates an expanded GPU rasterization device whitelist
for a field trial.

BUG=380694

Review URL: https://codereview.chromium.org/313703002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275572 0039d316-1c4b-4281-b951-d872f2087c98
parent 3a44c451
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include "base/command_line.h" #include "base/command_line.h"
#include "base/logging.h" #include "base/logging.h"
#include "base/metrics/field_trial.h"
#include "build/build_config.h" #include "build/build_config.h"
#include "cc/base/switches.h" #include "cc/base/switches.h"
#include "content/browser/gpu/gpu_data_manager_impl.h" #include "content/browser/gpu/gpu_data_manager_impl.h"
...@@ -16,6 +17,23 @@ namespace content { ...@@ -16,6 +17,23 @@ namespace content {
namespace { namespace {
static bool IsGpuRasterizationBlacklisted() {
GpuDataManagerImpl* manager = GpuDataManagerImpl::GetInstance();
bool field_trial_enabled =
(base::FieldTrialList::FindFullName(
"GpuRasterizationExpandedDeviceWhitelist") == "Enabled");
if (field_trial_enabled) {
return manager->IsFeatureBlacklisted(
gpu::GPU_FEATURE_TYPE_GPU_RASTERIZATION) &&
manager->IsFeatureBlacklisted(
gpu::GPU_FEATURE_TYPE_GPU_RASTERIZATION_FIELD_TRIAL);
}
return manager->IsFeatureBlacklisted(
gpu::GPU_FEATURE_TYPE_GPU_RASTERIZATION);
}
const char* kGpuCompositingFeatureName = "gpu_compositing"; const char* kGpuCompositingFeatureName = "gpu_compositing";
const char* kWebGLFeatureName = "webgl"; const char* kWebGLFeatureName = "webgl";
const char* kRasterizationFeatureName = "rasterization"; const char* kRasterizationFeatureName = "rasterization";
...@@ -118,12 +136,10 @@ const GpuFeatureInfo GetGpuFeatureInfo(size_t index, bool* eof) { ...@@ -118,12 +136,10 @@ const GpuFeatureInfo GetGpuFeatureInfo(size_t index, bool* eof) {
#endif #endif
{ {
kRasterizationFeatureName, kRasterizationFeatureName,
manager->IsFeatureBlacklisted( IsGpuRasterizationBlacklisted() &&
gpu::GPU_FEATURE_TYPE_GPU_RASTERIZATION) &&
!IsGpuRasterizationEnabled() && !IsForceGpuRasterizationEnabled(), !IsGpuRasterizationEnabled() && !IsForceGpuRasterizationEnabled(),
!IsGpuRasterizationEnabled() && !IsForceGpuRasterizationEnabled() && !IsGpuRasterizationEnabled() && !IsForceGpuRasterizationEnabled() &&
!manager->IsFeatureBlacklisted( !IsGpuRasterizationBlacklisted(),
gpu::GPU_FEATURE_TYPE_GPU_RASTERIZATION),
"Accelerated rasterization has not been enabled or" "Accelerated rasterization has not been enabled or"
" is not supported by the current system.", " is not supported by the current system.",
true true
...@@ -222,8 +238,7 @@ bool IsGpuRasterizationEnabled() { ...@@ -222,8 +238,7 @@ bool IsGpuRasterizationEnabled() {
else if (command_line.HasSwitch(switches::kEnableGpuRasterization)) else if (command_line.HasSwitch(switches::kEnableGpuRasterization))
return true; return true;
if (GpuDataManagerImpl::GetInstance()->IsFeatureBlacklisted( if (IsGpuRasterizationBlacklisted()) {
gpu::GPU_FEATURE_TYPE_GPU_RASTERIZATION)) {
return false; return false;
} }
......
...@@ -38,6 +38,8 @@ GpuBlacklist* GpuBlacklist::Create() { ...@@ -38,6 +38,8 @@ GpuBlacklist* GpuBlacklist::Create() {
GPU_FEATURE_TYPE_PANEL_FITTING); GPU_FEATURE_TYPE_PANEL_FITTING);
list->AddSupportedFeature("gpu_rasterization", list->AddSupportedFeature("gpu_rasterization",
GPU_FEATURE_TYPE_GPU_RASTERIZATION); GPU_FEATURE_TYPE_GPU_RASTERIZATION);
list->AddSupportedFeature("gpu_rasterization_field_trial",
GPU_FEATURE_TYPE_GPU_RASTERIZATION_FIELD_TRIAL);
list->set_supports_feature_type_all(true); list->set_supports_feature_type_all(true);
return list; return list;
} }
......
...@@ -128,4 +128,8 @@ GPU_BLACKLIST_FEATURE_TEST(GpuRasterization, ...@@ -128,4 +128,8 @@ GPU_BLACKLIST_FEATURE_TEST(GpuRasterization,
"gpu_rasterization", "gpu_rasterization",
GPU_FEATURE_TYPE_GPU_RASTERIZATION) GPU_FEATURE_TYPE_GPU_RASTERIZATION)
GPU_BLACKLIST_FEATURE_TEST(GpuRasterizationFieldTrial,
"gpu_rasterization_field_trial",
GPU_FEATURE_TYPE_GPU_RASTERIZATION_FIELD_TRIAL)
} // namespace gpu } // namespace gpu
...@@ -21,6 +21,7 @@ enum GpuFeatureType { ...@@ -21,6 +21,7 @@ enum GpuFeatureType {
GPU_FEATURE_TYPE_PANEL_FITTING, GPU_FEATURE_TYPE_PANEL_FITTING,
GPU_FEATURE_TYPE_FLASH_STAGE3D_BASELINE, GPU_FEATURE_TYPE_FLASH_STAGE3D_BASELINE,
GPU_FEATURE_TYPE_GPU_RASTERIZATION, GPU_FEATURE_TYPE_GPU_RASTERIZATION,
GPU_FEATURE_TYPE_GPU_RASTERIZATION_FIELD_TRIAL,
NUMBER_OF_GPU_FEATURE_TYPES NUMBER_OF_GPU_FEATURE_TYPES
}; };
......
...@@ -18,7 +18,7 @@ const char kSoftwareRenderingListJson[] = LONG_STRING_CONST( ...@@ -18,7 +18,7 @@ const char kSoftwareRenderingListJson[] = LONG_STRING_CONST(
{ {
"name": "software rendering list", "name": "software rendering list",
// Please update the version number whenever you change this file. // Please update the version number whenever you change this file.
"version": "8.4", "version": "8.5",
"entries": [ "entries": [
{ {
"id": 1, "id": 1,
...@@ -1171,6 +1171,28 @@ LONG_STRING_CONST( ...@@ -1171,6 +1171,28 @@ LONG_STRING_CONST(
"features": [ "features": [
"gpu_rasterization" "gpu_rasterization"
] ]
},
{
"id": 97,
"description": "Additional GPU rasterization whitelist for field trial",
"cr_bugs": [380694],
"exceptions": [
{
"os": {
"type": "android"
},
"machine_model_name": ["HTC One",
"C5303", "C6603", "C6903",
"GT-I8262", "GT-I8552", "GT-I9195", "GT-I9300",
"GT-I9500", "GT-I9505", "GT-N7100",
"SAMSUNG-SCH-I337", "SCH-I545", "SGH-M919",
"SM-N900", "SM-N9005", "SPH-L720",
"XT907", "XT1032", "XT1033", "XT1080"]
}
],
"features": [
"gpu_rasterization_field_trial"
]
} }
] ]
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment