diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2013-06-19 15:29:44 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2013-06-20 16:45:35 +0200 |
commit | 0a927854a10e1e6b9770a81e2e1d9f3093631757 (patch) | |
tree | 3d65d820d9fdba2d0d394d99c36290c851b78ca0 /platform/android/src/com/artifex/mupdfdemo/BitmapHolder.java | |
parent | 1ae8f19179c5f0f8c6352b3c7855465325d5449a (diff) | |
download | mupdf-0a927854a10e1e6b9770a81e2e1d9f3093631757.tar.xz |
Rearrange source files.
Diffstat (limited to 'platform/android/src/com/artifex/mupdfdemo/BitmapHolder.java')
-rw-r--r-- | platform/android/src/com/artifex/mupdfdemo/BitmapHolder.java | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/platform/android/src/com/artifex/mupdfdemo/BitmapHolder.java b/platform/android/src/com/artifex/mupdfdemo/BitmapHolder.java new file mode 100644 index 00000000..5816e7bb --- /dev/null +++ b/platform/android/src/com/artifex/mupdfdemo/BitmapHolder.java @@ -0,0 +1,25 @@ +package com.artifex.mupdfdemo; + +import android.graphics.Bitmap; + +public class BitmapHolder { + private Bitmap bm; + + public BitmapHolder() { + bm = null; + } + + public synchronized void setBm(Bitmap abm) { + if (bm != null && bm != abm) + bm.recycle(); + bm = abm; + } + + public synchronized void drop() { + bm = null; + } + + public synchronized Bitmap getBm() { + return bm; + } +} |