diff options
author | Mathias Agopian <mathias@google.com> | 2009-04-17 14:15:18 -0700 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2009-04-24 15:00:41 -0700 |
commit | 9f88afb013a7560bf1362d7999a4609e38d0ea77 (patch) | |
tree | f81ee097e51f3bc147be91327f1a07b082bc7a5f /libs | |
parent | f35e00c9cf82b45152031fdc743b60af5742bad4 (diff) | |
download | frameworks_native-9f88afb013a7560bf1362d7999a4609e38d0ea77.zip frameworks_native-9f88afb013a7560bf1362d7999a4609e38d0ea77.tar.gz frameworks_native-9f88afb013a7560bf1362d7999a4609e38d0ea77.tar.bz2 |
Squashed commit of the following:
commit e5c24638f98162c3b75b4c67a16b510d38e31341
Author: Mathias Agopian <mathias@google.com>
Date: Fri Apr 17 14:09:03 2009 -0700
oops forgot this file.
commit 282642632d0cb12882eecf42e0fdfb2343275de1
Author: Mathias Agopian <mathias@google.com>
Date: Fri Apr 17 14:07:32 2009 -0700
use a helper macro for creating Singleton<>'s static attributes instances.
Diffstat (limited to 'libs')
-rw-r--r-- | libs/surfaceflinger/BufferAllocator.cpp | 3 | ||||
-rw-r--r-- | libs/ui/BufferMapper.cpp | 3 | ||||
-rw-r--r-- | libs/ui/Surface.cpp | 3 |
3 files changed, 3 insertions, 6 deletions
diff --git a/libs/surfaceflinger/BufferAllocator.cpp b/libs/surfaceflinger/BufferAllocator.cpp index 28fe810..fec7c87 100644 --- a/libs/surfaceflinger/BufferAllocator.cpp +++ b/libs/surfaceflinger/BufferAllocator.cpp @@ -34,8 +34,7 @@ namespace android { // --------------------------------------------------------------------------- -template<class BufferAllocator> Mutex Singleton<BufferAllocator>::sLock; -template<> BufferAllocator* Singleton<BufferAllocator>::sInstance(0); +ANDROID_SINGLETON_STATIC_INSTANCE( BufferAllocator ) Mutex BufferAllocator::sLock; KeyedVector<buffer_handle_t, BufferAllocator::alloc_rec_t> BufferAllocator::sAllocList; diff --git a/libs/ui/BufferMapper.cpp b/libs/ui/BufferMapper.cpp index e6ca239..85a029b 100644 --- a/libs/ui/BufferMapper.cpp +++ b/libs/ui/BufferMapper.cpp @@ -44,8 +44,7 @@ namespace android { // --------------------------------------------------------------------------- -template<class BufferMapper> Mutex Singleton<BufferMapper>::sLock; -template<> BufferMapper* Singleton<BufferMapper>::sInstance(0); +ANDROID_SINGLETON_STATIC_INSTANCE( BufferMapper ) BufferMapper::BufferMapper() : mAllocMod(0) diff --git a/libs/ui/Surface.cpp b/libs/ui/Surface.cpp index 47880f5..fb105b3 100644 --- a/libs/ui/Surface.cpp +++ b/libs/ui/Surface.cpp @@ -50,8 +50,7 @@ namespace android { // SurfaceBuffer // ============================================================================ -template<class SurfaceBuffer> Mutex Singleton<SurfaceBuffer>::sLock; -template<> SurfaceBuffer* Singleton<SurfaceBuffer>::sInstance(0); +ANDROID_SINGLETON_STATIC_INSTANCE( SurfaceBuffer ) SurfaceBuffer::SurfaceBuffer() : BASE(), handle(0), mOwner(false) |