replicant-frameworks_native/include/utils
Mathias Agopian f14a1046e7 Fix some issues with RefBase debugging.
First slipt sp<> out of RefBase into StrongPointer.h so it can be reused
more easily and to make it clear that it doesn't require RefBase.

Note: the rest of the change only affects the system when DEBUG_REFS is enabled.

The main problem we fix here is that the owner id associated with each
reference could get out of date when a sp<> or wp<> was moved, for
instance when they're used in a Vector< >.

We fix this issue by calling into RefBase::moveReferences from
a template specialization for sp<TYPE> and wp<TYPE> of the
type helpers. RefBase::moveReferences() has then a chance to
update the owner ids.

There is a little bit of trickery to implement this generically in
RefBase, where we need to use a templatized functor that can turn
a sp<TYPE>* casted to a void* into a RefBase*.

Introduced a new debug option DEBUG_REFS_FATAL_SANITY_CHECKS
currently set to 0 by default as there seem to be an issue
with sp<ANativeWindow> which trips the sanity checks.

Change-Id: I4825b21c8ec47d4a0ef35d760760ae0c9cdfbd7f
2011-02-23 22:21:41 -08:00
..
ashmem.h auto import from //depot/cupcake/@135843 2009-03-03 19:31:44 -08:00
Asset.h Change assets to use 64-bit API 2010-12-08 11:21:30 -08:00
AssetDir.h auto import from //depot/cupcake/@135843 2009-03-03 19:31:44 -08:00
AssetManager.h More native work. 2010-08-11 00:29:59 -07:00
Atomic.h auto import from //depot/cupcake/@135843 2009-03-03 19:31:44 -08:00
BackupHelpers.h Only report "unknown metadata" once per restore helper 2009-06-24 13:57:29 -07:00
BitSet.h Add suuport for splitting touch events across windows. 2010-09-26 22:20:12 -07:00
BufferedTextOutput.h auto import from //depot/cupcake/@135843 2009-03-03 19:31:44 -08:00
ByteOrder.h Implement the C++ class to write the backed up file data. 2009-05-15 10:37:10 -04:00
CallStack.h dump callstack on Surface use error 2010-12-10 15:37:48 -08:00
Compat.h Change assets to use 64-bit API 2010-12-08 11:21:30 -08:00
Debug.h Support for marshalling pointers / intptr_t in Parcel. 2009-08-17 15:31:25 -07:00
Endian.h auto import from //depot/cupcake/@135843 2009-03-03 19:31:44 -08:00
Errors.h fix [2068105] implement queueBuffer/lockBuffer/dequeueBuffer properly 2009-09-07 16:32:45 -07:00
FileMap.h Change assets to use 64-bit API 2010-12-08 11:21:30 -08:00
Flattenable.h remove a dependency of GraphicBuffer (libui) on Parcel (libbinder). 2010-02-21 23:27:25 -08:00
Functor.h Use optimized display lists for all hwaccelerated rendering 2011-01-24 08:43:20 -08:00
KeyedVector.h fix KeyedVector::replaceValueAt, which wouldn't even compile if used. 2009-04-10 20:27:25 -07:00
List.h Fix sim build. 2009-07-07 10:01:12 -07:00
Log.h auto import from //depot/cupcake/@135843 2009-03-03 19:31:44 -08:00
Looper.h Revert to using epoll_wait(). 2010-10-07 16:17:57 -07:00
misc.h get rid of utils.h 2009-05-31 19:13:00 -07:00
ObbFile.h OBB: use PBKDF2 for key generation. 2010-10-13 18:25:33 -07:00
Pool.h Native input dispatch rewrite work in progress. 2010-06-13 17:42:16 -07:00
PropertyMap.h Add initial support for cursor-based pointing devices. 2010-12-29 13:19:53 -08:00
RefBase.h Fix some issues with RefBase debugging. 2011-02-23 22:21:41 -08:00
ResourceTypes.h am a1f5e82f: am a30063d8: am 25eb0464: Merge "Normalize output from aapt d" 2011-01-29 23:07:48 -08:00
SharedBuffer.h auto import from //depot/cupcake/@135843 2009-03-03 19:31:44 -08:00
Singleton.h Purge Skia objects from GL caches as needed. 2010-09-08 18:04:33 -07:00
SortedVector.h improve Vector<> with types that can be trivially moved and remove some unused code. 2009-06-22 02:31:07 -07:00
StopWatch.h Native input dispatch rewrite work in progress. 2010-06-13 17:42:16 -07:00
StreamingZipInflater.h Change assets to use 64-bit API 2010-12-08 11:21:30 -08:00
String8.h Improve support for external keyboards. 2010-12-02 16:01:32 -08:00
String16.h Split UTF functions from String8/16 2010-11-12 15:53:40 -08:00
StringArray.h rename string_array.h to StringArray.h and move the implementation from the header file to a new cpp file. 2009-06-05 01:26:23 -07:00
StrongPointer.h Fix some issues with RefBase debugging. 2011-02-23 22:21:41 -08:00
SystemClock.h auto import from //depot/cupcake/@135843 2009-03-03 19:31:44 -08:00
TextOutput.h some work to try to reduce the code size of some native libraries 2009-05-26 16:12:20 -07:00
threads.h added RWLock C++ wrapper 2010-05-19 15:12:59 -07:00
Timers.h get rid of sleepForInterval() which didn't seem to be used anywhere in the source tree. Also get rid of ported.h which seem to be used only (possibly) in the sim. moved the implementation there. 2009-05-31 23:45:01 -07:00
Tokenizer.h Improve support for external keyboards. 2010-12-02 16:01:32 -08:00
TypeHelpers.h Fix some issues with RefBase debugging. 2011-02-23 22:21:41 -08:00
Unicode.h Split UTF functions from String8/16 2010-11-12 15:53:40 -08:00
Vector.h Even more native input dispatch work in progress. 2010-06-17 13:27:16 -07:00
VectorImpl.h Even more native input dispatch work in progress. 2010-06-17 13:27:16 -07:00
ZipFileCRO.h Change assets to use 64-bit API 2010-12-08 11:21:30 -08:00
ZipFileRO.h Change assets to use 64-bit API 2010-12-08 11:21:30 -08:00
ZipUtils.h auto import from //depot/cupcake/@135843 2009-03-03 19:31:44 -08:00