diff options
author | zmo@chromium.org <zmo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-17 17:34:41 +0000 |
---|---|---|
committer | zmo@chromium.org <zmo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-17 17:34:41 +0000 |
commit | 723f7c505ba9d21c820710fe88cedd3fd8b07e18 (patch) | |
tree | 9383c41bec1dee97e10da57bba275c0beedd159c | |
parent | 0fd6361d32af2669f2da47d5a3202b9741719a72 (diff) | |
download | chromium_src-723f7c505ba9d21c820710fe88cedd3fd8b07e18.zip chromium_src-723f7c505ba9d21c820710fe88cedd3fd8b07e18.tar.gz chromium_src-723f7c505ba9d21c820710fe88cedd3fd8b07e18.tar.bz2 |
Add GPU_RASTERIZATION as one of the gpu blacklist features.
BUG=362782
TEST=gpu_unittests
R=ajuma@chromium.org, kbr@chromium.org
Review URL: https://codereview.chromium.org/240243005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@264564 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | content/browser/gpu/compositor_util.cc | 22 | ||||
-rw-r--r-- | content/browser/resources/gpu/info_view.js | 2 | ||||
-rw-r--r-- | gpu/config/gpu_blacklist.cc | 2 | ||||
-rw-r--r-- | gpu/config/gpu_blacklist_unittest.cc | 4 | ||||
-rw-r--r-- | gpu/config/gpu_feature_type.h | 1 |
5 files changed, 26 insertions, 5 deletions
diff --git a/content/browser/gpu/compositor_util.cc b/content/browser/gpu/compositor_util.cc index 0d82711..bb2f0db 100644 --- a/content/browser/gpu/compositor_util.cc +++ b/content/browser/gpu/compositor_util.cc @@ -150,9 +150,13 @@ const GpuFeatureInfo GetGpuFeatureInfo(size_t index, bool* eof) { false }, { - "raster", - false, + "rasterization", + manager->IsFeatureBlacklisted( + gpu::GPU_FEATURE_TYPE_GPU_RASTERIZATION) && !IsGpuRasterizationEnabled() && !IsForceGpuRasterizationEnabled(), + !IsGpuRasterizationEnabled() && !IsForceGpuRasterizationEnabled() && + !manager->IsFeatureBlacklisted( + gpu::GPU_FEATURE_TYPE_GPU_RASTERIZATION), "Accelerated rasterization has not been enabled or" " is not supported by the current system.", true @@ -274,8 +278,18 @@ bool IsGpuRasterizationEnabled() { else if (command_line.HasSwitch(switches::kEnableGpuRasterization)) return true; - return command_line.HasSwitch( - switches::kEnableBleedingEdgeRenderingFastPaths); + if (command_line.HasSwitch( + switches::kEnableBleedingEdgeRenderingFastPaths)) { + return true; + } + + if (GpuDataManagerImpl::GetInstance()->IsFeatureBlacklisted( + gpu::GPU_FEATURE_TYPE_GPU_RASTERIZATION)) { + return false; + } + + // Change this to true to turn on the feature by default. + return false; } bool IsForceGpuRasterizationEnabled() { diff --git a/content/browser/resources/gpu/info_view.js b/content/browser/resources/gpu/info_view.js index a680d57..53b5b4e 100644 --- a/content/browser/resources/gpu/info_view.js +++ b/content/browser/resources/gpu/info_view.js @@ -98,7 +98,7 @@ cr.define('gpu', function() { 'gpu_switching': 'GPU Switching', 'panel_fitting': 'Panel Fitting', 'force_compositing_mode': 'Force Compositing Mode', - 'raster': 'Rasterization', + 'rasterization': 'Rasterization', }; var statusLabelMap = { 'disabled_software': 'Software only. Hardware acceleration disabled.', diff --git a/gpu/config/gpu_blacklist.cc b/gpu/config/gpu_blacklist.cc index c7d9448..ad072b0 100644 --- a/gpu/config/gpu_blacklist.cc +++ b/gpu/config/gpu_blacklist.cc @@ -40,6 +40,8 @@ GpuBlacklist* GpuBlacklist::Create() { GPU_FEATURE_TYPE_ACCELERATED_VIDEO); list->AddSupportedFeature("panel_fitting", GPU_FEATURE_TYPE_PANEL_FITTING); + list->AddSupportedFeature("gpu_rasterization", + GPU_FEATURE_TYPE_GPU_RASTERIZATION); list->set_supports_feature_type_all(true); return list; } diff --git a/gpu/config/gpu_blacklist_unittest.cc b/gpu/config/gpu_blacklist_unittest.cc index 63ac692..f850f10 100644 --- a/gpu/config/gpu_blacklist_unittest.cc +++ b/gpu/config/gpu_blacklist_unittest.cc @@ -131,4 +131,8 @@ GPU_BLACKLIST_FEATURE_TEST(PanelFitting, "panel_fitting", GPU_FEATURE_TYPE_PANEL_FITTING) +GPU_BLACKLIST_FEATURE_TEST(GpuRasterization, + "gpu_rasterization", + GPU_FEATURE_TYPE_GPU_RASTERIZATION) + } // namespace gpu diff --git a/gpu/config/gpu_feature_type.h b/gpu/config/gpu_feature_type.h index d27a910..86b075d 100644 --- a/gpu/config/gpu_feature_type.h +++ b/gpu/config/gpu_feature_type.h @@ -22,6 +22,7 @@ enum GpuFeatureType { GPU_FEATURE_TYPE_ACCELERATED_VIDEO, GPU_FEATURE_TYPE_PANEL_FITTING, GPU_FEATURE_TYPE_FLASH_STAGE3D_BASELINE, + GPU_FEATURE_TYPE_GPU_RASTERIZATION, NUMBER_OF_GPU_FEATURE_TYPES }; |