summaryrefslogtreecommitdiffstats
path: root/android_webview/public
diff options
context:
space:
mode:
authorleandrogracia@chromium.org <leandrogracia@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-30 20:32:57 +0000
committerleandrogracia@chromium.org <leandrogracia@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-30 20:32:57 +0000
commit0943b71cfbf7d6fb894882427cbf2fefb53f9574 (patch)
treef2ea75167140c659fc36115c323f86afd02485cc /android_webview/public
parentb31d645164494c33d74a1a8493ea37e5de9cd21f (diff)
downloadchromium_src-0943b71cfbf7d6fb894882427cbf2fefb53f9574.zip
chromium_src-0943b71cfbf7d6fb894882427cbf2fefb53f9574.tar.gz
chromium_src-0943b71cfbf7d6fb894882427cbf2fefb53f9574.tar.bz2
[Android WebView] Implement the capture picture API.
BUG=167908 Review URL: https://chromiumcodereview.appspot.com/11823027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@179693 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'android_webview/public')
-rw-r--r--android_webview/public/browser/draw_sw.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/android_webview/public/browser/draw_sw.h b/android_webview/public/browser/draw_sw.h
index e2e1dbf..2cdb45b 100644
--- a/android_webview/public/browser/draw_sw.h
+++ b/android_webview/public/browser/draw_sw.h
@@ -12,6 +12,8 @@
#error "Can't mix C and C++ when using jni.h"
#endif
+class SkPicture;
+
// Holds the information required to implement the SW draw to system canvas.
struct AwPixelInfo {
int config; // In SkBitmap::Config format.
@@ -34,11 +36,22 @@ typedef AwPixelInfo* (AwAccessPixelsFunction)(JNIEnv* env, jobject canvas);
// (i.e. that returned true).
typedef void (AwReleasePixelsFunction)(AwPixelInfo* pixels);
+// Called to create an Android Picture object encapsulating a native SkPicture.
+typedef jobject (AwCreatePictureFunction)(JNIEnv* env, SkPicture* picture);
+
+// Method that returns the current Skia function.
+typedef void (SkiaVersionFunction)(int* major, int* minor, int* patch);
+
+// Called to verify if the Skia versions are compatible.
+typedef bool (AwIsSkiaVersionCompatibleFunction)(SkiaVersionFunction function);
+
// "vtable" for the functions declared in this file. An instance must be set via
// AwContents.setAwDrawSWFunctionTable
struct AwDrawSWFunctionTable {
AwAccessPixelsFunction* access_pixels;
AwReleasePixelsFunction* release_pixels;
+ AwCreatePictureFunction* create_picture;
+ AwIsSkiaVersionCompatibleFunction* is_skia_version_compatible;
};
#endif // ANDROID_WEBVIEW_PUBLIC_BROWSER_DRAW_SW_H_