os/graphics/graphicsresourceservices/graphicsresourceadaptation/inc/sgimageimpl.inl
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/graphics/graphicsresourceservices/graphicsresourceadaptation/inc/sgimageimpl.inl	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,136 @@
     1.4 +// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +//
    1.18 +
    1.19 +/**
    1.20 + @file
    1.21 + @internalComponent
    1.22 +*/
    1.23 +
    1.24 +#ifndef SGIMAGEIMPL_INL
    1.25 +#define SGIMAGEIMPL_INL
    1.26 +
    1.27 +
    1.28 +// XSgImageImplBase
    1.29 +
    1.30 +inline XSgImageImplBase::XSgImageImplBase(XSgDriverImpl& aDriverImpl)
    1.31 +	: XSgBase(aDriverImpl)
    1.32 +	{}
    1.33 +
    1.34 +
    1.35 +inline XSgImageImplBase::XSgImageImplBase(XSgDriverImpl& aDriverImpl, const TSgDrawableId& aId)
    1.36 +	: XSgBase(aDriverImpl), iId(aId)
    1.37 +	{}
    1.38 +
    1.39 +
    1.40 +inline const TSgImageMetaData& XSgImageImplBase::MetaData() const
    1.41 +	{
    1.42 +	return iState->MetaData();
    1.43 +	}
    1.44 +
    1.45 +
    1.46 +// XSgImageStateBase
    1.47 +
    1.48 +inline XSgImageStateBase::XSgImageStateBase(XSgDriverImpl& aDriverImpl)
    1.49 +	: XSgBase(aDriverImpl)
    1.50 +	{}
    1.51 +
    1.52 +
    1.53 +inline XSgImageStateBase::XSgImageStateBase(XSgDriverImpl& aDriverImpl, TInt aDataStride)
    1.54 +	: XSgBase(aDriverImpl), iDataStride(aDataStride)
    1.55 +	{}
    1.56 +
    1.57 +
    1.58 +inline TInt XSgImageStateBase::DataStride() const
    1.59 +	{
    1.60 +	return iDataStride;
    1.61 +	}
    1.62 +
    1.63 +
    1.64 +#ifndef SYMBIAN_GRAPHICS_USE_GPU
    1.65 +
    1.66 +// TSgImageId_SwLocal
    1.67 +
    1.68 +inline TBool TSgImageId_SwLocal::IsMatch(const TSgDrawableId& aId)
    1.69 +	{
    1.70 +	return reinterpret_cast<const TSgImageId_SwLocal&>(aId).iMinusOne == KErrNotFound;
    1.71 +	}
    1.72 +
    1.73 +
    1.74 +// XSgImageImpl_SwLocal
    1.75 +
    1.76 +inline XSgImageImpl_SwLocal::XSgImageImpl_SwLocal(XSgDriverImpl& aDriverImpl, const TSgDrawableId& aId)
    1.77 +	: XSgImageImplBase(aDriverImpl, aId)
    1.78 +	{}
    1.79 +
    1.80 +
    1.81 +inline XSgImageImpl_SwLocal::XSgImageImpl_SwLocal(const XSgImageImpl_SwLocal& aImage, TUint32 aFlags)
    1.82 +	: XSgImageImplBase(aImage, aFlags)
    1.83 +	{}
    1.84 +
    1.85 +#endif
    1.86 +
    1.87 +
    1.88 +// TSgImageId_SurfaceManager
    1.89 +
    1.90 +inline TBool TSgImageId_SurfaceManager::IsMatch(const TSgDrawableId& aId)
    1.91 +	{
    1.92 +	return reinterpret_cast<const TSgImageId_SurfaceManager&>(aId).iBufferIndex >= 0
    1.93 +	       && reinterpret_cast<const TSgImageId_SurfaceManager&>(aId).iMetaDataIndex >= 0;
    1.94 +	}
    1.95 +
    1.96 +
    1.97 +// XSgImageImpl_SurfaceManager
    1.98 +
    1.99 +inline XSgImageImpl_SurfaceManager::XSgImageImpl_SurfaceManager(XSgDriverImpl& aDriverImpl)
   1.100 +	: XSgImageImplBase(aDriverImpl)
   1.101 +	{}
   1.102 +
   1.103 +
   1.104 +inline XSgImageImpl_SurfaceManager::XSgImageImpl_SurfaceManager(XSgDriverImpl& aDriverImpl, const TSgDrawableId& aId)
   1.105 +	: XSgImageImplBase(aDriverImpl, aId)
   1.106 +	{}
   1.107 +
   1.108 +
   1.109 +inline XSgImageImpl_SurfaceManager::XSgImageImpl_SurfaceManager(const XSgImageImpl_SurfaceManager& aImage, TUint32 aFlags)
   1.110 +	: XSgImageImplBase(aImage, aFlags)
   1.111 +	{}
   1.112 +
   1.113 +
   1.114 +// XSgImageState_SurfaceManager
   1.115 +
   1.116 +inline XSgImageState_SurfaceManager::XSgImageState_SurfaceManager(XSgDriverImpl& aDriverImpl)
   1.117 +	: XSgImageStateBase(aDriverImpl)
   1.118 +	{}
   1.119 +
   1.120 +
   1.121 +inline const TSurfaceId& XSgImageState_SurfaceManager::SurfaceId() const
   1.122 +	{
   1.123 +	return iSurfaceId;
   1.124 +	}
   1.125 +
   1.126 +
   1.127 +inline const RChunk& XSgImageState_SurfaceManager::DataChunk() const
   1.128 +	{
   1.129 +	return iDataChunk;
   1.130 +	}
   1.131 +
   1.132 +
   1.133 +inline TInt XSgImageState_SurfaceManager::DataOffset() const
   1.134 +	{
   1.135 +	return iDataOffset;
   1.136 +	}
   1.137 +
   1.138 +
   1.139 +#endif // SGIMAGEIMPL_INL