diff options
author | stuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-22 23:28:38 +0000 |
---|---|---|
committer | stuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-22 23:28:38 +0000 |
commit | 393dec2d90a18825ad27b72e65b5fc2d2816955a (patch) | |
tree | 5f0bfb617a14bffa530114c9cc839239d20c8c95 /webkit/glue | |
parent | 69382e04bbb8784d9e09a85de254c2736a79836e (diff) | |
download | chromium_src-393dec2d90a18825ad27b72e65b5fc2d2816955a.zip chromium_src-393dec2d90a18825ad27b72e65b5fc2d2816955a.tar.gz chromium_src-393dec2d90a18825ad27b72e65b5fc2d2816955a.tar.bz2 |
Enable the Core Animation NPAPI drawing mode on 10.6 (except for QuickTime)
Allows plugins other than QuickTime (see http://crbug.com/38336) to negotiate the Core Animation drawing model.
Note that for the moment, our wmode hack will prevent Flash from trying to use Core Animation; that will be removed later.
BUG=32012
TEST=On 10.6: Unity3D should not use any renderer CPU on most sites, and should now have good performance; QuickTime and Flash10.1 should be unchanged for now. On 10.5: Everything should be unchanged.
Review URL: http://codereview.chromium.org/1064003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42285 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue')
-rw-r--r-- | webkit/glue/plugins/plugin_host.cc | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/webkit/glue/plugins/plugin_host.cc b/webkit/glue/plugins/plugin_host.cc index 4cd5b3b..6341bc0 100644 --- a/webkit/glue/plugins/plugin_host.cc +++ b/webkit/glue/plugins/plugin_host.cc @@ -45,12 +45,7 @@ static NPAPI::PluginInstance* FindInstance(NPP id) { static bool SupportsSharingAcceleratedSurfaces() { int32 major, minor, bugfix; base::SysInfo::OperatingSystemVersionNumbers(&major, &minor, &bugfix); -#if PINK_USE_COREANIMATION - // TODO(pinkerton): enable this, http://crbug.com/32012 return major > 10 || (major == 10 && minor > 5); -#else - return false; -#endif } #endif @@ -799,7 +794,16 @@ NPError NPN_GetValue(NPP id, NPNVariable variable, void* value) { case NPNVsupportsCoreAnimationBool: { // We only support the Core Animation model on 10.6 and higher NPBool* supports_model = reinterpret_cast<NPBool*>(value); - *supports_model = SupportsSharingAcceleratedSurfaces() ? TRUE : FALSE; + // Our Core Animation support currently doesn't handle QuickTime correctly + // (see <http://crbug.com/38336>), so for now we don't allow QuickTime to + // negotiate that model. + scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id); + if (plugin && + plugin->plugin_lib()->plugin_info().name.find(L"QuickTime") != + std::wstring::npos) + *supports_model = FALSE; + else + *supports_model = SupportsSharingAcceleratedSurfaces() ? TRUE : FALSE; rv = NPERR_NO_ERROR; break; } |