Hi, all.

I'm watching the initiating process of SurfaceFlinger(frameworks/
base/
libs/surfaceflinger/SurfaceFlinger.cpp).

void SurfaceFlinger::instantiate() {
    defaultServiceManager()->addService(
            String16("SurfaceFlinger"), new SurfaceFlinger());
}


I know the Threads::run method is invoked at onFirstRef function.
And SurfaceFlinger::onFirstRef() function is called by
RefBase::incStrong.
But I don't know how exactly RefBase::incStrong method is invoked.
SurfaceFlinger class is derived from the RefBase calss.
(SurfaceFlinger -> BnSurfaceComposer -> ISurfaceComposer ->
IInterface
-> RefBase)
Is there any constructor using RefBase::incStrong method?
Is it related with strong pointer template(<sp>)?

template<typename T> template<typename U>
sp<T>::sp(U* other) : m_ptr(other)
{
    if (other) other->incStrong(this);


-- 
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting

Reply via email to