Add MMP files to build libOpenVG_sw.lib which uses LINKAS to redirect to libOpenVG.dll (and
the same for libEGL_sw.lib and libOpenVGU_sw.lib).
Only the libEGL_sw.lib redirection isn't activated - this can't happen until there is a merged
libEGL.dll which supports the OpenWF synchronisation and also implements the graphical support functions.
The overall aim is to eliminate the *_sw.dll implementations, at least as a compile-time way of choosing
a software-only implementation.The correct way to choose is to put the right set of libraries into a ROM
with suitable renaming, and in the emulator to use the "switching DLL" technique to pick the right set.
As the Symbian Foundation doesn't have any alternative implementations, we don't need the switching DLLs
and we can build directly to the correct name.
// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
// which accompanies this distribution, and is available
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
//
// Initial Contributors:
// Nokia Corporation - initial contribution.
//
// Contributors:
//
// Description:
//
/**
@file
@internalComponent
*/
#ifndef SGDRIVERIMPL_INL
#define SGDRIVERIMPL_INL
inline void Panic(TSgResourceAdapterPanicReason aReason)
{
User::Panic(KSgResourceAdapterPanicCategory, aReason);
}
// XSgBase
inline XSgBase::XSgBase(XSgDriverImpl& aDriverImpl)
: iDriverImpl(aDriverImpl)
{}
inline void XSgBase::IncRefCount()
{
__ASSERT_DEBUG(iDriverImpl.IsMutexHeld(), Panic(ESgPanicMutexNotHeld));
__ASSERT_DEBUG(iRefCount >= 0, Panic(ESgPanicBadReferenceCount));
++iRefCount;
}
inline TInt XSgBase::DecRefCount()
{
__ASSERT_DEBUG(iDriverImpl.IsMutexHeld(), Panic(ESgPanicMutexNotHeld));
__ASSERT_DEBUG(iRefCount > 0, Panic(ESgPanicBadReferenceCount));
return --iRefCount;
}
/**
@internalComponent
@test
*/
inline TInt XSgBase::RefCount() const
{
return iRefCount;
}
inline TAny* XSgBase::operator new(TUint aSize, TAny* aBase)
{
Mem::FillZ(aBase, aSize);
return aBase;
}
// XSgDriverImpl
inline XSgDriverImpl::XSgDriverImpl(RHeap* aHeap)
: iHeap(aHeap)
{}
inline TAny* XSgDriverImpl::operator new(TUint aSize, TAny* aBase)
{
Mem::FillZ(aBase, aSize);
return aBase;
}
inline void XSgDriverImpl::Wait()
{
iMutex.Wait();
}
inline void XSgDriverImpl::Signal()
{
iMutex.Signal();
}
inline TBool XSgDriverImpl::IsMutexHeld() const
{
return iMutex.IsHeld();
}
inline TAny* XSgDriverImpl::Alloc(TInt aSize)
{
return iHeap->Alloc(aSize);
}
inline void XSgDriverImpl::Free(TAny* aCell)
{
iHeap->Free(aCell);
}
inline TInt XSgDriverImpl::CreateSurface(const RSurfaceManager::TSurfaceCreationAttributesBuf& aReqs, TSurfaceId& aSurfaceId)
{
return iSurfaceManager.CreateSurface(aReqs, aSurfaceId);
}
inline TInt XSgDriverImpl::CreateSurface(const RSurfaceManager::TSurfaceCreationAttributesBuf& aReqs, TSurfaceId& aSurfaceId, const RChunk& aChunk)
{
return iSurfaceManager.CreateSurface(aReqs, aSurfaceId, aChunk);
}
inline TInt XSgDriverImpl::OpenSurface(const TSurfaceId& aSurfaceId)
{
return iSurfaceManager.OpenSurface(aSurfaceId);
}
inline TInt XSgDriverImpl::CloseSurface(const TSurfaceId& aSurfaceId)
{
return iSurfaceManager.CloseSurface(aSurfaceId);
}
inline TInt XSgDriverImpl::SurfaceInfo(const TSurfaceId& aSurfaceId, RSurfaceManager::TInfoBuf& aInfo)
{
return iSurfaceManager.SurfaceInfo(aSurfaceId, aInfo);
}
inline TInt XSgDriverImpl::SynchronizeCache(const TSurfaceId& aSurfaceId, TInt aBuffer, RSurfaceManager::TSyncOperation aOperation)
{
return iSurfaceManager.SynchronizeCache(aSurfaceId, aBuffer, aOperation);
}
inline TInt XSgDriverImpl::GetSurfaceHint(const TSurfaceId& aSurfaceId, RSurfaceManager::THintPair& aHint)
{
return iSurfaceManager.GetSurfaceHint(aSurfaceId, aHint);
}
#endif // SGDRIVERIMPL_INL