diff options
Diffstat (limited to 'Source/WebCore/plugins/android/PluginViewAndroid.cpp')
-rw-r--r-- | Source/WebCore/plugins/android/PluginViewAndroid.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/Source/WebCore/plugins/android/PluginViewAndroid.cpp b/Source/WebCore/plugins/android/PluginViewAndroid.cpp index fdf6e03..24a14aa 100644 --- a/Source/WebCore/plugins/android/PluginViewAndroid.cpp +++ b/Source/WebCore/plugins/android/PluginViewAndroid.cpp @@ -55,7 +55,6 @@ #include "Touch.h" #include "TouchEvent.h" #include "TouchList.h" -#include "android_graphics.h" #include "SkCanvas.h" #include "npruntime_impl.h" // #include "runtime_root.h" @@ -405,7 +404,7 @@ bool PluginView::platformGetValueStatic(NPNVariable variable, void* value, NPErr // our interface query is valid with no NPP instance *result = NPERR_GENERIC_ERROR; - switch (variable) { + switch ((int)variable) { case NPNVisOfflineBool: { if (value != NULL) { bool* retValue = static_cast<bool*>(value); @@ -422,7 +421,7 @@ bool PluginView::platformGetValueStatic(NPNVariable variable, void* value, NPErr return true; } default: - ; // do nothing + break; // do nothing } (void)anp_getInterface(variable, value, result); @@ -490,7 +489,7 @@ void PluginView::setNPWindowIfNeeded() bool PluginView::platformGetValue(NPNVariable variable, void* value, NPError* result) { - switch (variable) { + switch ((int)variable) { case NPNVWindowNPObject: { NPObject* windowScriptObject = m_parentFrame->script()->windowScriptNPObject(); @@ -581,7 +580,7 @@ NPError PluginView::platformSetValue(NPPVariable variable, void* value) { NPError error = NPERR_GENERIC_ERROR; - switch (variable) { + switch ((int)variable) { case kRequestDrawingModel_ANPSetValue: { ANPDrawingModel model = reinterpret_cast<ANPDrawingModel>(value); if (m_window->setDrawingModel(model)) @@ -690,15 +689,12 @@ void PluginView::paint(GraphicsContext* context, const IntRect& rect) notification of its global position change. */ updatePluginWidget(); - SkCanvas* canvas = context->platformContext()->getCanvas(); - if (!canvas) - return; - m_window->setSurfaceClip(canvas->getTotalClip().getBounds()); + m_window->setSurfaceClip(context->platformContext()->getTotalClipBounds()); } else { m_window->inval(rect, false); context->save(); context->translate(frame.x(), frame.y()); - m_window->draw(android_gc2canvas(context)); + m_window->draw(context->platformContext()); context->restore(); } |