summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2009-08-12 12:36:12 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2009-08-12 12:36:12 -0700
commit878d647b5b77f040cdae810e7e05be23a105e1eb (patch)
treed8f23c6bf57d7f57680df75a8eb38201c8f04483 /include
parentfac300462060a69dc5aa83b493f8cbdd28ea7d27 (diff)
parentf2c6fe29bbfab1db743a3ccce327d3d920643629 (diff)
downloadframeworks_native-878d647b5b77f040cdae810e7e05be23a105e1eb.zip
frameworks_native-878d647b5b77f040cdae810e7e05be23a105e1eb.tar.gz
frameworks_native-878d647b5b77f040cdae810e7e05be23a105e1eb.tar.bz2
am b8546001: Merge change 20878 into donut
Merge commit 'b8546001701405a76dad7e6235046e592296fac2' * commit 'b8546001701405a76dad7e6235046e592296fac2': Fix issue #2048263: More debugging information
Diffstat (limited to 'include')
-rw-r--r--include/utils/Asset.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/utils/Asset.h b/include/utils/Asset.h
index 453a204..5908bcc 100644
--- a/include/utils/Asset.h
+++ b/include/utils/Asset.h
@@ -45,6 +45,7 @@ public:
virtual ~Asset(void);
static int32_t getGlobalCount();
+ static String8 getAssetAllocations();
/* used when opening an asset */
typedef enum AccessMode {
@@ -110,6 +111,12 @@ public:
virtual int openFileDescriptor(off_t* outStart, off_t* outLength) const = 0;
/*
+ * Return whether this asset's buffer is allocated in RAM (not mmapped).
+ * Note: not virtual so it is safe to call even when being destroyed.
+ */
+ virtual bool isAllocated(void) const { return false; }
+
+ /*
* Get a string identifying the asset's source. This might be a full
* path, it might be a colon-separated list of identifiers.
*
@@ -197,6 +204,9 @@ private:
AccessMode mAccessMode; // how the asset was opened
String8 mAssetSource; // debug string
+
+ Asset* mNext; // linked list.
+ Asset* mPrev;
};
@@ -239,6 +249,7 @@ public:
virtual off_t getLength(void) const { return mLength; }
virtual off_t getRemainingLength(void) const { return mLength-mOffset; }
virtual int openFileDescriptor(off_t* outStart, off_t* outLength) const;
+ virtual bool isAllocated(void) const { return mBuf != NULL; }
private:
off_t mStart; // absolute file offset of start of chunk
@@ -295,6 +306,7 @@ public:
virtual off_t getLength(void) const { return mUncompressedLen; }
virtual off_t getRemainingLength(void) const { return mUncompressedLen-mOffset; }
virtual int openFileDescriptor(off_t* outStart, off_t* outLength) const { return -1; }
+ virtual bool isAllocated(void) const { return mBuf != NULL; }
private:
off_t mStart; // offset to start of compressed data