diff options
author | Stephen Hines <srhines@google.com> | 2013-04-02 16:32:34 -0700 |
---|---|---|
committer | Stephen Hines <srhines@google.com> | 2013-04-02 16:56:03 -0700 |
commit | d216dafa216f3329577ab624cdc5a5d1860ec035 (patch) | |
tree | 731dcf0fc4bc4d82fc53368aa81ba2c6acfad948 /rsObjectBase.cpp | |
parent | 2fdf9cd285374c54a12744f24d7aca97be7e4326 (diff) | |
download | rs-d216dafa216f3329577ab624cdc5a5d1860ec035.tar.gz |
Add DebugHelper to ObjectBase.
This enables us to easily use things like CallStack for our debug runtime.
Without this abstraction, we end up with size/offset mismatches against
libbcc's implementation of set/getElementAt.
Change-Id: I91ae0ef709fa5b8ab7dda905cd07d1c565dd0212
Diffstat (limited to 'rsObjectBase.cpp')
-rw-r--r-- | rsObjectBase.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/rsObjectBase.cpp b/rsObjectBase.cpp index b66bb738..17064a55 100644 --- a/rsObjectBase.cpp +++ b/rsObjectBase.cpp @@ -28,9 +28,10 @@ ObjectBase::ObjectBase(Context *rsc) { mRSC = rsc; mNext = NULL; mPrev = NULL; + mDH = NULL; #if RS_OBJECT_DEBUG - mStack.update(2); + mDH = new DebugHelper(); #endif rsAssert(rsc); @@ -41,7 +42,9 @@ ObjectBase::ObjectBase(Context *rsc) { ObjectBase::~ObjectBase() { //ALOGV("~ObjectBase %p ref %i,%i", this, mUserRefCount, mSysRefCount); #if RS_OBJECT_DEBUG - mStack.dump(); + mDH->dump(); + delete mDH; + mDH = NULL; #endif if (mPrev || mNext) { @@ -113,7 +116,7 @@ bool ObjectBase::decUserRef() const { #if RS_OBJECT_DEBUG //ALOGV("ObjectBase %p decU ref %i, %i", this, mUserRefCount, mSysRefCount); if (mUserRefCount <= 0) { - mStack.dump(); + mDH->dump(); } #endif |