diff options
Diffstat (limited to 'webkit/glue/plugins/plugin_host.cc')
-rw-r--r-- | webkit/glue/plugins/plugin_host.cc | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/webkit/glue/plugins/plugin_host.cc b/webkit/glue/plugins/plugin_host.cc index a1a6d5f..b0fe8fa 100644 --- a/webkit/glue/plugins/plugin_host.cc +++ b/webkit/glue/plugins/plugin_host.cc @@ -797,16 +797,21 @@ NPError NPN_GetValue(NPP id, NPNVariable variable, void* value) { rv = NPERR_NO_ERROR; break; } - case NPNVsupportsCoreAnimationBool: - case NPNVsupportsInvalidatingCoreAnimationBool: { + case NPNVsupportsCoreAnimationBool: { // We only support the Core Animation model on 10.6 and higher // TODO(stuartmorgan): Once existing CA plugins have implemented the - // invalidating version, remove support for the other version. + // invalidating version, remove support for this one. NPBool* supports_model = reinterpret_cast<NPBool*>(value); *supports_model = SupportsSharingAcceleratedSurfaces() ? true : false; rv = NPERR_NO_ERROR; break; } + case NPNVsupportsInvalidatingCoreAnimationBool: { + NPBool* supports_model = reinterpret_cast<NPBool*>(value); + *supports_model = true; + rv = NPERR_NO_ERROR; + break; + } case NPNVsupportsOpenGLBool: { // This drawing model was never widely supported, and we don't plan to // support it. @@ -871,12 +876,10 @@ NPError NPN_SetValue(NPP id, NPPVariable variable, void* value) { #if defined(OS_MACOSX) case NPPVpluginDrawingModel: { int model = reinterpret_cast<int>(value); - if (model == NPDrawingModelCoreGraphics) { - plugin->set_drawing_model(static_cast<NPDrawingModel>(model)); - return NPERR_NO_ERROR; - } else if ((model == NPDrawingModelCoreAnimation || - model == NPDrawingModelInvalidatingCoreAnimation) && - SupportsSharingAcceleratedSurfaces()) { + if (model == NPDrawingModelCoreGraphics || + model == NPDrawingModelInvalidatingCoreAnimation || + (model == NPDrawingModelCoreAnimation && + SupportsSharingAcceleratedSurfaces())) { plugin->set_drawing_model(static_cast<NPDrawingModel>(model)); return NPERR_NO_ERROR; } |