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

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

Issue 250773007: content: Fix about:gpu "Rasterization" status field. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 8 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 | no next file » | 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 88e0d22bc59f3bd4eb5a3618ba0330361613f438..5098697b4b85506816fb14bf6f4dffa063e3ee42 100644
--- a/content/browser/gpu/compositor_util.cc
+++ b/content/browser/gpu/compositor_util.cc
@@ -16,6 +16,10 @@ namespace content {
namespace {
+const char* kGpuCompositingFeatureName = "gpu_compositing";
+const char* kWebGLFeatureName = "webgl";
+const char* kRasterizationFeatureName = "rasterization";
+
struct GpuFeatureInfo {
std::string name;
uint32 blocked;
@@ -41,7 +45,7 @@ const GpuFeatureInfo GetGpuFeatureInfo(size_t index, bool* eof) {
true
},
{
- "gpu_compositing",
+ kGpuCompositingFeatureName,
manager->IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_GPU_COMPOSITING),
false,
"Gpu compositing has been disabled, either via about:flags or"
@@ -50,7 +54,7 @@ const GpuFeatureInfo GetGpuFeatureInfo(size_t index, bool* eof) {
true
},
{
- "webgl",
+ kWebGLFeatureName,
manager->IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_WEBGL),
command_line.HasSwitch(switches::kDisableExperimentalWebGL),
"WebGL has been disabled, either via about:flags or command line.",
@@ -122,7 +126,7 @@ const GpuFeatureInfo GetGpuFeatureInfo(size_t index, bool* eof) {
},
#endif
{
- "rasterization",
+ kRasterizationFeatureName,
manager->IsFeatureBlacklisted(
gpu::GPU_FEATURE_TYPE_GPU_RASTERIZATION) &&
!IsGpuRasterizationEnabled() && !IsForceGpuRasterizationEnabled(),
@@ -239,7 +243,7 @@ base::Value* GetFeatureStatus() {
std::string status;
if (gpu_feature_info.disabled) {
status = "disabled";
- if (gpu_feature_info.name == "raster") {
+ if (gpu_feature_info.name == kRasterizationFeatureName) {
if (IsImplSidePaintingEnabled())
status += "_software_multithreaded";
else
@@ -261,15 +265,15 @@ base::Value* GetFeatureStatus() {
status += "_off";
} else {
status = "enabled";
- if (gpu_feature_info.name == "webgl" &&
+ if (gpu_feature_info.name == kWebGLFeatureName &&
manager->IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_GPU_COMPOSITING))
status += "_readback";
- if (gpu_feature_info.name == "raster") {
+ if (gpu_feature_info.name == kRasterizationFeatureName) {
if (IsForceGpuRasterizationEnabled())
status += "_force";
}
}
- if (gpu_feature_info.name == "gpu_compositing") {
+ if (gpu_feature_info.name == kGpuCompositingFeatureName) {
if (IsThreadedCompositingEnabled())
status += "_threaded";
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698