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

Unified Diff: webkit/glue/plugins/plugin_host.cc

Issue 1064003: Enable the Core Animation NPAPI drawing mode on 10.6 (except for QuickTime) (Closed)
Patch Set: Remove Flash wmode change Created 10 years, 9 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: webkit/glue/plugins/plugin_host.cc
diff --git a/webkit/glue/plugins/plugin_host.cc b/webkit/glue/plugins/plugin_host.cc
index 4cd5b3b74ebd4e34138a18d59b61a4f1df247280..6341bc05fbf10b268070cfbbff16f219add6f421 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;
}
« 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