From c16cadec123f6150cee4008aa4836fbb8ffb0db6 Mon Sep 17 00:00:00 2001 From: Paul Gardiner Date: Mon, 29 Oct 2012 11:22:29 +0000 Subject: Add fz_update_page Regenerate dirty appearance streams and report changed annotations since last call. Also include a partial revert of changes in 96f335bc, that turn out not to be necessary. fz_update_page must now be called between each document-changing event and the next render. pdfapp.c and the android app have been updated to do so, but do not yet take advantage of the possibility to render only the updated areas of the screen. --- android/jni/mupdf.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'android') diff --git a/android/jni/mupdf.c b/android/jni/mupdf.c index 18b4db40..2f5376ca 100644 --- a/android/jni/mupdf.c +++ b/android/jni/mupdf.c @@ -156,6 +156,14 @@ Java_com_artifex_mupdf_MuPDFCore_gotoPageInternal(JNIEnv *env, jobject thiz, int JNIEXPORT void JNICALL Java_com_artifex_mupdf_MuPDFCore_markDirtyInternal(JNIEnv *env, jobject thiz, int page) { + if (currentPage) + { + fz_interactive *idoc = fz_interact(doc); + + if (idoc) + fz_update_page(idoc, currentPage, NULL, NULL); + } + if (currentAnnotationList != NULL && page == pagenum) { fz_free_display_list(ctx, currentAnnotationList); -- cgit v1.2.3