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

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

Issue 2902773004: cc: Add finch feature flag for checker-imaging. (Closed)
Patch Set: pass Created 3 years, 7 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 | « content/browser/gpu/compositor_util.h ('k') | content/browser/renderer_host/render_process_host_impl.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 bcd0f5bbc6e2c03f30ef7f8092c47c2e19a13f37..cc007d4658667efb1291efcc12ef2ccc63d0b12d 100644
--- a/content/browser/gpu/compositor_util.cc
+++ b/content/browser/gpu/compositor_util.cc
@@ -46,6 +46,7 @@ const char kRasterizationFeatureName[] = "rasterization";
const char kMultipleRasterThreadsFeatureName[] = "multiple_raster_threads";
const char kNativeGpuMemoryBuffersFeatureName[] = "native_gpu_memory_buffers";
const char kWebGL2FeatureName[] = "webgl2";
+const char kCheckerImagingFeatureName[] = "checker_imaging";
const int kMinRasterThreads = 1;
const int kMaxRasterThreads = 4;
@@ -146,6 +147,9 @@ const GpuFeatureInfo GetGpuFeatureInfo(size_t index, bool* eof) {
manager->IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_WEBGL2),
command_line.HasSwitch(switches::kDisableES3APIs),
"WebGL2 has been disabled via blacklist or the command line.", false},
+ {kCheckerImagingFeatureName, false, !IsCheckerImagingEnabled(),
+ "Checker-imaging has been disabled via finch trial or the command line.",
+ false},
};
DCHECK(index < arraysize(kGpuFeatureInfo));
*eof = (index == arraysize(kGpuFeatureInfo) - 1);
@@ -293,6 +297,17 @@ bool IsMainFrameBeforeActivationEnabled() {
return true;
}
+bool IsCheckerImagingEnabled() {
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ cc::switches::kEnableCheckerImaging))
+ return true;
+
+ if (base::FeatureList::IsEnabled(features::kCheckerImaging))
+ return true;
+
+ return false;
+}
+
base::DictionaryValue* GetFeatureStatus() {
GpuDataManagerImpl* manager = GpuDataManagerImpl::GetInstance();
std::string gpu_access_blocked_reason;
@@ -335,6 +350,13 @@ base::DictionaryValue* GetFeatureStatus() {
}
if (gpu_feature_info.name == kMultipleRasterThreadsFeatureName)
status += "_on";
+ if (gpu_feature_info.name == kCheckerImagingFeatureName) {
+ const base::CommandLine& command_line =
+ *base::CommandLine::ForCurrentProcess();
+ if (command_line.HasSwitch(cc::switches::kEnableCheckerImaging))
+ status += "_force";
+ status += "_on";
+ }
}
if (gpu_feature_info.name == kWebGLFeatureName &&
(gpu_feature_info.blocked || gpu_access_blocked) &&
« no previous file with comments | « content/browser/gpu/compositor_util.h ('k') | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698