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

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

Issue 313703002: Expand GPU rasterization device whitelist for Finch experiment (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove already-whitelisted devices from field trial whitelist Created 6 years, 6 months 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
« no previous file with comments | « no previous file | gpu/config/gpu_blacklist.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gpu/compositor_util.cc
diff --git a/content/browser/gpu/compositor_util.cc b/content/browser/gpu/compositor_util.cc
index b54b99756634f2ba0de7dd92bb2fdca4b6fc3164..de9fa1c06422b90ef1607d9144c24399c5e9d6a2 100644
--- a/content/browser/gpu/compositor_util.cc
+++ b/content/browser/gpu/compositor_util.cc
@@ -6,6 +6,7 @@
#include "base/command_line.h"
#include "base/logging.h"
+#include "base/metrics/field_trial.h"
#include "build/build_config.h"
#include "cc/base/switches.h"
#include "content/browser/gpu/gpu_data_manager_impl.h"
@@ -16,6 +17,23 @@ namespace content {
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* kWebGLFeatureName = "webgl";
const char* kRasterizationFeatureName = "rasterization";
@@ -118,12 +136,10 @@ const GpuFeatureInfo GetGpuFeatureInfo(size_t index, bool* eof) {
#endif
{
kRasterizationFeatureName,
- manager->IsFeatureBlacklisted(
- gpu::GPU_FEATURE_TYPE_GPU_RASTERIZATION) &&
+ IsGpuRasterizationBlacklisted() &&
!IsGpuRasterizationEnabled() && !IsForceGpuRasterizationEnabled(),
!IsGpuRasterizationEnabled() && !IsForceGpuRasterizationEnabled() &&
- !manager->IsFeatureBlacklisted(
- gpu::GPU_FEATURE_TYPE_GPU_RASTERIZATION),
+ !IsGpuRasterizationBlacklisted(),
"Accelerated rasterization has not been enabled or"
" is not supported by the current system.",
true
@@ -222,8 +238,7 @@ bool IsGpuRasterizationEnabled() {
else if (command_line.HasSwitch(switches::kEnableGpuRasterization))
return true;
- if (GpuDataManagerImpl::GetInstance()->IsFeatureBlacklisted(
- gpu::GPU_FEATURE_TYPE_GPU_RASTERIZATION)) {
+ if (IsGpuRasterizationBlacklisted()) {
return false;
}
« no previous file with comments | « no previous file | gpu/config/gpu_blacklist.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698