diff options
author | Jason Sams <rjsams@android.com> | 2009-11-17 18:07:54 -0800 |
---|---|---|
committer | Jason Sams <rjsams@android.com> | 2009-11-17 18:07:54 -0800 |
commit | 644a0e320d4bda1871f38858e63aad2c9864570f (patch) | |
tree | dbe08bd7d8c08e8366b51a1c835e755ccbd856ac /libs | |
parent | e30c29feea0300dbf5355d08bbf90c0f85584e87 (diff) | |
parent | f630904134a81e9e5edbd7b2bd77e402c180782f (diff) | |
download | frameworks_base-644a0e320d4bda1871f38858e63aad2c9864570f.zip frameworks_base-644a0e320d4bda1871f38858e63aad2c9864570f.tar.gz frameworks_base-644a0e320d4bda1871f38858e63aad2c9864570f.tar.bz2 |
resolved conflicts for merge of f6309041 to master
Diffstat (limited to 'libs')
-rw-r--r-- | libs/rs/rs.spec | 4 | ||||
-rw-r--r-- | libs/rs/rsAllocation.cpp | 18 | ||||
-rw-r--r-- | libs/rs/rsAllocation.h | 2 | ||||
-rw-r--r-- | libs/rs/rsContext.cpp | 5 | ||||
-rw-r--r-- | libs/rs/rsObjectBase.cpp | 12 | ||||
-rw-r--r-- | libs/rs/rsObjectBase.h | 1 |
6 files changed, 42 insertions, 0 deletions
diff --git a/libs/rs/rs.spec b/libs/rs/rs.spec index be988e7..a4e72d9 100644 --- a/libs/rs/rs.spec +++ b/libs/rs/rs.spec @@ -42,6 +42,10 @@ ContextSetSurface { param void *sur } +ContextDump { + param int32_t bits +} + ContextSetPriority { param int32_t priority } diff --git a/libs/rs/rsAllocation.cpp b/libs/rs/rsAllocation.cpp index 7f4cf38..bc62f92 100644 --- a/libs/rs/rsAllocation.cpp +++ b/libs/rs/rsAllocation.cpp @@ -209,6 +209,24 @@ void Allocation::removeProgramToDirty(const Program *p) rsAssert(0); } +void Allocation::dumpLOGV(const char *prefix) const +{ + ObjectBase::dumpLOGV(prefix); + + String8 s(prefix); + s.append(" type "); + if (mType.get()) { + mType->dumpLOGV(s.string()); + } + + LOGV("%s allocation ptr=%p mCpuWrite=%i, mCpuRead=%i, mGpuWrite=%i, mGpuRead=%i", + prefix, mPtr, mCpuWrite, mCpuRead, mGpuWrite, mGpuRead); + + LOGV("%s allocation mIsTexture=%i mIsTextureID=%i, mIsVertexBuffer=%i, mBufferID=%i", + prefix, mIsTexture, mTextureID, mIsVertexBuffer, mBufferID); + +} + void Allocation::sendDirty() const { for (size_t ct=0; ct < mToDirtyList.size(); ct++) { diff --git a/libs/rs/rsAllocation.h b/libs/rs/rsAllocation.h index cf3ea9e..ac2edf8 100644 --- a/libs/rs/rsAllocation.h +++ b/libs/rs/rsAllocation.h @@ -68,6 +68,8 @@ public: void addProgramToDirty(const Program *); void removeProgramToDirty(const Program *); + virtual void dumpLOGV(const char *prefix) const; + protected: void sendDirty() const; diff --git a/libs/rs/rsContext.cpp b/libs/rs/rsContext.cpp index 0bfbd24..5cca60f 100644 --- a/libs/rs/rsContext.cpp +++ b/libs/rs/rsContext.cpp @@ -811,6 +811,11 @@ void rsi_ContextSetPriority(Context *rsc, int32_t p) rsc->setPriority(p); } +void rsi_ContextDump(Context *rsc, int32_t bits) +{ + ObjectBase::dumpAll(rsc); +} + } } diff --git a/libs/rs/rsObjectBase.cpp b/libs/rs/rsObjectBase.cpp index b7d67cc..05791cb 100644 --- a/libs/rs/rsObjectBase.cpp +++ b/libs/rs/rsObjectBase.cpp @@ -190,3 +190,15 @@ void ObjectBase::zeroAllUserRef(Context *rsc) } } +void ObjectBase::dumpAll(Context *rsc) +{ + if (rsc->props.mLogObjects) { + LOGV("Dumping all objects"); + const ObjectBase * o = rsc->mObjHead; + while (o) { + o->dumpLOGV(" "); + o = o->mNext; + } + } +} + diff --git a/libs/rs/rsObjectBase.h b/libs/rs/rsObjectBase.h index dc85ac7..f247022 100644 --- a/libs/rs/rsObjectBase.h +++ b/libs/rs/rsObjectBase.h @@ -49,6 +49,7 @@ public: void setContext(Context *); static void zeroAllUserRef(Context *rsc); + static void dumpAll(Context *rsc); virtual void dumpLOGV(const char *prefix) const; |