summaryrefslogtreecommitdiff
path: root/android/src/com/artifex/mupdfdemo/PageView.java
diff options
context:
space:
mode:
Diffstat (limited to 'android/src/com/artifex/mupdfdemo/PageView.java')
-rw-r--r--android/src/com/artifex/mupdfdemo/PageView.java18
1 files changed, 9 insertions, 9 deletions
diff --git a/android/src/com/artifex/mupdfdemo/PageView.java b/android/src/com/artifex/mupdfdemo/PageView.java
index 064ce3f8..8e784b24 100644
--- a/android/src/com/artifex/mupdfdemo/PageView.java
+++ b/android/src/com/artifex/mupdfdemo/PageView.java
@@ -140,7 +140,7 @@ public abstract class PageView extends ViewGroup {
mPatchBmh = new BitmapHolder();
}
- protected abstract Bitmap drawPage(BitmapHolder h, int sizeX, int sizeY, int patchX, int patchY, int patchWidth, int patchHeight);
+ protected abstract Bitmap drawPage(int sizeX, int sizeY, int patchX, int patchY, int patchWidth, int patchHeight);
protected abstract Bitmap updatePage(BitmapHolder h, int sizeX, int sizeY, int patchX, int patchY, int patchWidth, int patchHeight);
protected abstract LinkInfo[] getLinkInfo();
protected abstract TextWord[][] getText();
@@ -255,7 +255,7 @@ public abstract class PageView extends ViewGroup {
// Render the page in the background
mDrawEntire = new AsyncTask<Void,Void,Bitmap>() {
protected Bitmap doInBackground(Void... v) {
- return drawPage(mEntireBmh, mSize.x, mSize.y, 0, 0, mSize.x, mSize.y);
+ return drawPage(mSize.x, mSize.y, 0, 0, mSize.x, mSize.y);
}
protected void onPreExecute() {
@@ -529,7 +529,7 @@ public abstract class PageView extends ViewGroup {
// previously invoked task, and possibly for a different
// area, so we cannot risk the bitmap generated by this task
// being passed to it
- mPatchBmh.setBm(null);
+ mPatchBmh.drop();
mPatchBmh = new BitmapHolder();
}
@@ -544,13 +544,13 @@ public abstract class PageView extends ViewGroup {
mDrawPatch = new AsyncTask<PatchInfo,Void,PatchInfo>() {
protected PatchInfo doInBackground(PatchInfo... v) {
if (v[0].completeRedraw) {
- v[0].bm = drawPage(v[0].bmh, v[0].patchViewSize.x, v[0].patchViewSize.y,
- v[0].patchArea.left, v[0].patchArea.top,
- v[0].patchArea.width(), v[0].patchArea.height());
+ v[0].bm = drawPage(v[0].patchViewSize.x, v[0].patchViewSize.y,
+ v[0].patchArea.left, v[0].patchArea.top,
+ v[0].patchArea.width(), v[0].patchArea.height());
} else {
- v[0].bm = updatePage(v[0].bmh, v[0].patchViewSize.x, v[0].patchViewSize.y,
- v[0].patchArea.left, v[0].patchArea.top,
- v[0].patchArea.width(), v[0].patchArea.height());
+ v[0].bm = updatePage(v[0].bmh, v[0].patchViewSize.x, v[0].patchViewSize.y,
+ v[0].patchArea.left, v[0].patchArea.top,
+ v[0].patchArea.width(), v[0].patchArea.height());
}
return v[0];