summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--platform/android/viewer/Makefile4
-rw-r--r--platform/android/viewer/jni/mupdf.c23
2 files changed, 27 insertions, 0 deletions
diff --git a/platform/android/viewer/Makefile b/platform/android/viewer/Makefile
index 9d061919..cc557b85 100644
--- a/platform/android/viewer/Makefile
+++ b/platform/android/viewer/Makefile
@@ -1,3 +1,7 @@
default:
ndk-build
ant debug
+
+install:
+ ndk-build
+ ant debug install
diff --git a/platform/android/viewer/jni/mupdf.c b/platform/android/viewer/jni/mupdf.c
index e7ef8f38..c8c01866 100644
--- a/platform/android/viewer/jni/mupdf.c
+++ b/platform/android/viewer/jni/mupdf.c
@@ -689,10 +689,32 @@ static void update_changed_rects(globals *glo, page_cache *pc, pdf_document *ido
fz_bound_annot(ctx, annot, &node->rect);
node->next = pc->hq_changed_rects;
pc->hq_changed_rects = node;
+
+ pannot->changed = 0;
}
}
}
+static void update_changed_rects_all_page(globals *glo, page_cache *pc, pdf_document *idoc)
+{
+ fz_context *ctx = glo->ctx;
+ fz_page *page = pc->page;
+ rect_node *node;
+
+ drop_changed_rects(ctx, &pc->hq_changed_rects);
+ drop_changed_rects(ctx, &pc->changed_rects);
+
+ node = fz_malloc_struct(ctx, rect_node);
+ fz_bound_page(ctx, page, &node->rect);
+ node->next = pc->changed_rects;
+ pc->changed_rects = node;
+
+ node = fz_malloc_struct(ctx, rect_node);
+ fz_bound_page(ctx, page, &node->rect);
+ node->next = pc->hq_changed_rects;
+ pc->hq_changed_rects = node;
+}
+
JNIEXPORT jboolean JNICALL
JNI_FN(MuPDFCore_drawPage)(JNIEnv *env, jobject thiz, jobject bitmap,
int pageW, int pageH, int patchX, int patchY, int patchW, int patchH, jlong cookiePtr)
@@ -1749,6 +1771,7 @@ JNI_FN(MuPDFCore_deleteAnnotationInternal)(JNIEnv * env, jobject thiz, int annot
if (annot)
{
pdf_delete_annot(ctx, (pdf_page *)pc->page, (pdf_annot *)annot);
+ update_changed_rects_all_page(glo, pc, idoc);
dump_annotation_display_lists(glo);
}
}