summaryrefslogtreecommitdiff
path: root/android/src/com/artifex/mupdfdemo/MuPDFActivity.java
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2013-05-22 19:57:25 +0100
committerRobin Watts <robin.watts@artifex.com>2013-05-24 18:28:47 +0100
commit0c6bc40564d4e15f2801266115e7a7a137451907 (patch)
treefb46dcb1ee71d064de2fd7451e2761babbb669f9 /android/src/com/artifex/mupdfdemo/MuPDFActivity.java
parent6cc1ecc4d35a31b845e361cce2707ad4cb8041c0 (diff)
downloadmupdf-0c6bc40564d4e15f2801266115e7a7a137451907.tar.xz
Bug 694092: Android: Redraw performance (overdraw) fixes
Thanks to Goncalo Ferreira(*) (aka monxalo) for this patch. Firstly, we move our textured background off the layout and into a style applied to MuPDFActivity. By using "windowBackground", we avoid the default background being redrawn only to be overlaid with ours. This cuts out one level of overdrawing. Secondly, when drawing each PageView, the old code would render the background for the page, then would draw the bitmap over the top of that. While it's important to draw the background of the page before we have a bitmap for the page, we can avoid that stage once a page bitmap arrives. (* apologies for not being able to put the cedilla on the 'c' in your name, but git gives problems with top bit set chars.)
Diffstat (limited to 'android/src/com/artifex/mupdfdemo/MuPDFActivity.java')
-rw-r--r--android/src/com/artifex/mupdfdemo/MuPDFActivity.java2
1 files changed, 0 insertions, 2 deletions
diff --git a/android/src/com/artifex/mupdfdemo/MuPDFActivity.java b/android/src/com/artifex/mupdfdemo/MuPDFActivity.java
index 5fea13e3..3133fc17 100644
--- a/android/src/com/artifex/mupdfdemo/MuPDFActivity.java
+++ b/android/src/com/artifex/mupdfdemo/MuPDFActivity.java
@@ -578,8 +578,6 @@ public class MuPDFActivity extends Activity
RelativeLayout layout = new RelativeLayout(this);
layout.addView(mDocView);
layout.addView(mButtonsView);
- layout.setBackgroundResource(R.drawable.tiled_background);
- //layout.setBackgroundResource(R.color.canvas);
setContentView(layout);
}