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

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: 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') | gpu/config/software_rendering_list_json.cc » ('J')
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..8800d0d527f54f79253f3d3b1a4bbc5e7df63492 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,20 @@ namespace content {
namespace {
+static bool IsGpuRasterizationBlacklisted() {
+ bool field_trial_enabled =
+ (base::FieldTrialList::FindFullName(
+ "GpuRasterizationExpandedDeviceWhitelist") == "Enabled");
+
+ GpuDataManagerImpl* manager = GpuDataManagerImpl::GetInstance();
+ if (field_trial_enabled) {
+ return 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 +133,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 +235,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') | gpu/config/software_rendering_list_json.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698