diff options
author | John Reck <jreck@google.com> | 2012-08-03 16:00:32 -0700 |
---|---|---|
committer | John Reck <jreck@google.com> | 2012-08-06 17:46:09 -0700 |
commit | 3718b58e4da76b7025aa5316a51264c5e38f2569 (patch) | |
tree | 862c59605fa3e2bd61ae279930f1d6cf70edb1f3 /Source/WebKit/android/plugins | |
parent | 6228f1617d7525d64a23edd3b497791c6a06e842 (diff) | |
download | external_webkit-3718b58e4da76b7025aa5316a51264c5e38f2569.zip external_webkit-3718b58e4da76b7025aa5316a51264c5e38f2569.tar.gz external_webkit-3718b58e4da76b7025aa5316a51264c5e38f2569.tar.bz2 |
Remove usages of getCanvas
Everything goes through either PlatformGraphicsContext or recordingCanvas()
Change-Id: I375a4294d2e8d4b467b70c6b8a7f0b96f402f252
Diffstat (limited to 'Source/WebKit/android/plugins')
-rw-r--r-- | Source/WebKit/android/plugins/ANPSurfaceInterface.cpp | 1 | ||||
-rw-r--r-- | Source/WebKit/android/plugins/PluginWidgetAndroid.cpp | 8 | ||||
-rw-r--r-- | Source/WebKit/android/plugins/PluginWidgetAndroid.h | 3 |
3 files changed, 6 insertions, 6 deletions
diff --git a/Source/WebKit/android/plugins/ANPSurfaceInterface.cpp b/Source/WebKit/android/plugins/ANPSurfaceInterface.cpp index 92dbbcd..2b593e2 100644 --- a/Source/WebKit/android/plugins/ANPSurfaceInterface.cpp +++ b/Source/WebKit/android/plugins/ANPSurfaceInterface.cpp @@ -30,7 +30,6 @@ #include "PluginView.h" #include "PluginWidgetAndroid.h" #include "SkANP.h" -#include "android_graphics.h" #include <JNIUtility.h> #include <gui/Surface.h> #include <ui/Rect.h> diff --git a/Source/WebKit/android/plugins/PluginWidgetAndroid.cpp b/Source/WebKit/android/plugins/PluginWidgetAndroid.cpp index 09bb24e..2fd2ef4 100644 --- a/Source/WebKit/android/plugins/PluginWidgetAndroid.cpp +++ b/Source/WebKit/android/plugins/PluginWidgetAndroid.cpp @@ -42,7 +42,6 @@ #include "SkString.h" #include "SkTime.h" #include "WebViewCore.h" -#include "android_graphics.h" #include <JNIUtility.h> //#define PLUGIN_DEBUG_LOCAL // controls the printing of log messages @@ -225,7 +224,7 @@ void PluginWidgetAndroid::viewInvalidate() { m_core->viewInvalidate(rect); } -void PluginWidgetAndroid::draw(SkCanvas* canvas) { +void PluginWidgetAndroid::draw(PlatformGraphicsContext* context) { if (NULL == m_flipPixelRef || !m_flipPixelRef->isDirty()) { return; } @@ -249,10 +248,11 @@ void PluginWidgetAndroid::draw(SkCanvas* canvas) { bitmap) && pkg->pluginFuncs()->event(instance, &event)) { - if (canvas && m_pluginWindow) { + if (context && m_pluginWindow) { SkBitmap bm(bitmap); bm.setPixelRef(m_flipPixelRef); - canvas->drawBitmap(bm, 0, 0); + IntRect dst(0, 0, bm.width(), bm.height()); + context->drawBitmapRect(bm, 0, dst); } } break; diff --git a/Source/WebKit/android/plugins/PluginWidgetAndroid.h b/Source/WebKit/android/plugins/PluginWidgetAndroid.h index 87612dd..73b116b 100644 --- a/Source/WebKit/android/plugins/PluginWidgetAndroid.h +++ b/Source/WebKit/android/plugins/PluginWidgetAndroid.h @@ -28,6 +28,7 @@ #include "android_npapi.h" #include "ANPSystem_npapi.h" +#include "GraphicsContext.h" #include "IntPoint.h" #include "IntRect.h" #include "MediaLayer.h" @@ -98,7 +99,7 @@ struct PluginWidgetAndroid { /* Called to draw into the plugin's bitmap. If canvas is non-null, the bitmap itself is then drawn into the canvas. */ - void draw(SkCanvas* canvas = NULL); + void draw(PlatformGraphicsContext* context = NULL); /* Send this event to the plugin instance. A non-zero value will be returned if the plugin handled the event. |