diff options
author | ynovikov@chromium.org <ynovikov@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-15 22:19:31 +0000 |
---|---|---|
committer | ynovikov@chromium.org <ynovikov@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-15 22:19:31 +0000 |
commit | 7158db1b9afa495d38fb386e697ab19df176b435 (patch) | |
tree | ad2c597ff65a6e27a2eca5c1a2d29217d3f941f8 /content/browser | |
parent | 2eb3773566138c9193156d1cd5111d64f8354585 (diff) | |
download | chromium_src-7158db1b9afa495d38fb386e697ab19df176b435.zip chromium_src-7158db1b9afa495d38fb386e697ab19df176b435.tar.gz chromium_src-7158db1b9afa495d38fb386e697ab19df176b435.tar.bz2 |
Add "panel_fitting" GPU feature type and use it for mirror mode.
Panel fitting is used by mirror display mode on Chrome OS.
This GPU feature type will tell if it is supported by GPU hardware.
Initially enable it only for Ivy Bridge GPU via blacklisting everything else.
Also add a disable_panel_fitting command flag,
to be able to quickly turn the feature off.
When hardware supports panel fitting,
and there are no common modes between the internal and the external displays,
configure the internal display to the external's resolution,
and let the panel fitter take care of displaying it correctly.
BUG=chromium-os:34442
TEST=Panel Fitting should appear as Hardware Accelerated in about:gpu
on IVB Chrome OS, Unavailable everywhere else.
TEST=Tested mirror mode on device.
Review URL: https://chromiumcodereview.appspot.com/10909242
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161980 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser')
-rw-r--r-- | content/browser/gpu/gpu_blacklist.cc | 1 | ||||
-rw-r--r-- | content/browser/gpu/gpu_util.cc | 5 | ||||
-rw-r--r-- | content/browser/gpu/gpu_util_unittest.cc | 6 | ||||
-rw-r--r-- | content/browser/gpu/software_rendering_list.json | 20 |
4 files changed, 30 insertions, 2 deletions
diff --git a/content/browser/gpu/gpu_blacklist.cc b/content/browser/gpu/gpu_blacklist.cc index 28911b7..802905d 100644 --- a/content/browser/gpu/gpu_blacklist.cc +++ b/content/browser/gpu/gpu_blacklist.cc @@ -926,6 +926,7 @@ bool GpuBlacklist::GpuBlacklistEntry::SetBlacklistedFeatures( case content::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_DECODE: case content::GPU_FEATURE_TYPE_3D_CSS: case content::GPU_FEATURE_TYPE_ACCELERATED_VIDEO: + case content::GPU_FEATURE_TYPE_PANEL_FITTING: case content::GPU_FEATURE_TYPE_ALL: feature_type |= type; break; diff --git a/content/browser/gpu/gpu_util.cc b/content/browser/gpu/gpu_util.cc index fdd8c72..f3862db 100644 --- a/content/browser/gpu/gpu_util.cc +++ b/content/browser/gpu/gpu_util.cc @@ -30,6 +30,7 @@ const char kGpuFeatureNameTextureSharing[] = "texture_sharing"; const char kGpuFeatureNameAcceleratedVideoDecode[] = "accelerated_video_decode"; const char kGpuFeatureName3dCss[] = "3d_css"; const char kGpuFeatureNameAcceleratedVideo[] = "accelerated_video"; +const char kGpuFeatureNamePanelFitting[] = "panel_fitting"; const char kGpuFeatureNameAll[] = "all"; const char kGpuFeatureNameUnknown[] = "unknown"; @@ -109,6 +110,8 @@ GpuFeatureType StringToGpuFeatureType(const std::string& feature_string) { return content::GPU_FEATURE_TYPE_3D_CSS; if (feature_string == kGpuFeatureNameAcceleratedVideo) return content::GPU_FEATURE_TYPE_ACCELERATED_VIDEO; + if (feature_string == kGpuFeatureNamePanelFitting) + return content::GPU_FEATURE_TYPE_PANEL_FITTING; if (feature_string == kGpuFeatureNameAll) return content::GPU_FEATURE_TYPE_ALL; return content::GPU_FEATURE_TYPE_UNKNOWN; @@ -139,6 +142,8 @@ std::string GpuFeatureTypeToString(GpuFeatureType type) { matches.push_back(kGpuFeatureName3dCss); if (type & content::GPU_FEATURE_TYPE_ACCELERATED_VIDEO) matches.push_back(kGpuFeatureNameAcceleratedVideo); + if (type & content::GPU_FEATURE_TYPE_PANEL_FITTING) + matches.push_back(kGpuFeatureNamePanelFitting); if (!matches.size()) matches.push_back(kGpuFeatureNameUnknown); } diff --git a/content/browser/gpu/gpu_util_unittest.cc b/content/browser/gpu/gpu_util_unittest.cc index 7a8a643..fd2daf2 100644 --- a/content/browser/gpu/gpu_util_unittest.cc +++ b/content/browser/gpu/gpu_util_unittest.cc @@ -30,6 +30,8 @@ TEST(GpuUtilsTest, GpuFeatureTypFromString) { content::GPU_FEATURE_TYPE_3D_CSS); EXPECT_EQ(gpu_util::StringToGpuFeatureType("accelerated_video"), content::GPU_FEATURE_TYPE_ACCELERATED_VIDEO); + EXPECT_EQ(gpu_util::StringToGpuFeatureType("panel_fitting"), + content::GPU_FEATURE_TYPE_PANEL_FITTING); EXPECT_EQ(gpu_util::StringToGpuFeatureType("all"), content::GPU_FEATURE_TYPE_ALL); EXPECT_EQ(gpu_util::StringToGpuFeatureType("xxx"), @@ -80,6 +82,10 @@ TEST(GpuUtilsTest, GpuFeatureTypeToString) { "accelerated_video"); EXPECT_STREQ( gpu_util::GpuFeatureTypeToString( + content::GPU_FEATURE_TYPE_PANEL_FITTING).c_str(), + "panel_fitting"); + EXPECT_STREQ( + gpu_util::GpuFeatureTypeToString( content::GPU_FEATURE_TYPE_ALL).c_str(), "all"); EXPECT_STREQ(gpu_util::GpuFeatureTypeToString( diff --git a/content/browser/gpu/software_rendering_list.json b/content/browser/gpu/software_rendering_list.json index d5d4c0d..a4f08a0 100644 --- a/content/browser/gpu/software_rendering_list.json +++ b/content/browser/gpu/software_rendering_list.json @@ -41,7 +41,7 @@ // 19. "blacklist" is a list of gpu feature strings, valid values include // "accelerated_2d_canvas", "accelerated_compositing", "webgl", // "multisampling", "flash_3d", "flash_stage3d", "texture_sharing", -// "accelerated_video_decode", and "all". +// "accelerated_video_decode", "panel_fitting", and "all". // This field is mandatory. // 20. "description" has the description of the entry. // 21. "webkit_bugs" is an array of associated webkit bug numbers. @@ -74,7 +74,7 @@ { "name": "software rendering list", // Please update the version number whenever you change this file. - "version": "3.8", + "version": "3.9", "entries": [ { "id": 1, @@ -855,6 +855,22 @@ "flash_3d", "flash_stage3d" ] + }, + { + "id": 57, + "description": "Enable panel fitting capability on ChromeOS only on Ivy Bridge Graphics Controller.", + "exceptions": [ + { + "os": { + "type": "chromeos" + }, + "vendor_id": "0x8086", + "device_id": ["0x0166"] + } + ], + "blacklist": [ + "panel_fitting" + ] } ] } |