diff options
author | Narayan Kamath <narayan@google.com> | 2014-02-11 16:40:27 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-02-11 16:40:27 +0000 |
commit | a1cffb429c57eb961282160ae4631d70bfa55204 (patch) | |
tree | cec0a249f43ad0a632200592f02b1038cfad9129 /core/jni/android/graphics | |
parent | 3ff18faac21553f027cdb1ff4a98447f333750bd (diff) | |
parent | d350af9695018e81f85600fb7dd906003cbaf62e (diff) | |
download | frameworks_base-a1cffb429c57eb961282160ae4631d70bfa55204.zip frameworks_base-a1cffb429c57eb961282160ae4631d70bfa55204.tar.gz frameworks_base-a1cffb429c57eb961282160ae4631d70bfa55204.tar.bz2 |
am d350af96: am b90fc64b: am f44a3f1e: Merge "Use long for pointers in EmojiFactory and PdfDocument"
* commit 'd350af9695018e81f85600fb7dd906003cbaf62e':
Use long for pointers in EmojiFactory and PdfDocument
Diffstat (limited to 'core/jni/android/graphics')
-rw-r--r-- | core/jni/android/graphics/pdf/PdfDocument.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/core/jni/android/graphics/pdf/PdfDocument.cpp b/core/jni/android/graphics/pdf/PdfDocument.cpp index 6175a8f..d54aaa8 100644 --- a/core/jni/android/graphics/pdf/PdfDocument.cpp +++ b/core/jni/android/graphics/pdf/PdfDocument.cpp @@ -113,24 +113,24 @@ private: PageRecord* mCurrentPage; }; -static jint nativeCreateDocument(JNIEnv* env, jobject thiz) { - return reinterpret_cast<jint>(new PdfDocument()); +static jlong nativeCreateDocument(JNIEnv* env, jobject thiz) { + return reinterpret_cast<jlong>(new PdfDocument()); } -static jint nativeStartPage(JNIEnv* env, jobject thiz, jint documentPtr, +static jlong nativeStartPage(JNIEnv* env, jobject thiz, jlong documentPtr, jint pageWidth, jint pageHeight, jint contentLeft, jint contentTop, jint contentRight, jint contentBottom) { PdfDocument* document = reinterpret_cast<PdfDocument*>(documentPtr); - return reinterpret_cast<jint>(document->startPage(pageWidth, pageHeight, + return reinterpret_cast<jlong>(document->startPage(pageWidth, pageHeight, contentLeft, contentTop, contentRight, contentBottom)); } -static void nativeFinishPage(JNIEnv* env, jobject thiz, jint documentPtr) { +static void nativeFinishPage(JNIEnv* env, jobject thiz, jlong documentPtr) { PdfDocument* document = reinterpret_cast<PdfDocument*>(documentPtr); document->finishPage(); } -static void nativeWriteTo(JNIEnv* env, jobject thiz, jint documentPtr, jobject out, +static void nativeWriteTo(JNIEnv* env, jobject thiz, jlong documentPtr, jobject out, jbyteArray chunk) { PdfDocument* document = reinterpret_cast<PdfDocument*>(documentPtr); SkWStream* skWStream = CreateJavaOutputStreamAdaptor(env, out, chunk); @@ -138,17 +138,17 @@ static void nativeWriteTo(JNIEnv* env, jobject thiz, jint documentPtr, jobject o delete skWStream; } -static void nativeClose(JNIEnv* env, jobject thiz, jint documentPtr) { +static void nativeClose(JNIEnv* env, jobject thiz, jlong documentPtr) { PdfDocument* document = reinterpret_cast<PdfDocument*>(documentPtr); document->close(); } static JNINativeMethod gPdfDocument_Methods[] = { - {"nativeCreateDocument", "()I", (void*) nativeCreateDocument}, - {"nativeStartPage", "(IIIIIII)I", (void*) nativeStartPage}, - {"nativeFinishPage", "(I)V", (void*) nativeFinishPage}, - {"nativeWriteTo", "(ILjava/io/OutputStream;[B)V", (void*) nativeWriteTo}, - {"nativeClose", "(I)V", (void*) nativeClose} + {"nativeCreateDocument", "()J", (void*) nativeCreateDocument}, + {"nativeStartPage", "(JIIIIII)J", (void*) nativeStartPage}, + {"nativeFinishPage", "(J)V", (void*) nativeFinishPage}, + {"nativeWriteTo", "(JLjava/io/OutputStream;[B)V", (void*) nativeWriteTo}, + {"nativeClose", "(J)V", (void*) nativeClose} }; int register_android_graphics_pdf_PdfDocument(JNIEnv* env) { |