os/graphics/graphicsresourceservices/graphicsresourceadaptation/inc/sgimageimpl.inl
Update contrib.
1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
21 #ifndef SGIMAGEIMPL_INL
22 #define SGIMAGEIMPL_INL
27 inline XSgImageImplBase::XSgImageImplBase(XSgDriverImpl& aDriverImpl)
28 : XSgBase(aDriverImpl)
32 inline XSgImageImplBase::XSgImageImplBase(XSgDriverImpl& aDriverImpl, const TSgDrawableId& aId)
33 : XSgBase(aDriverImpl), iId(aId)
37 inline const TSgImageMetaData& XSgImageImplBase::MetaData() const
39 return iState->MetaData();
45 inline XSgImageStateBase::XSgImageStateBase(XSgDriverImpl& aDriverImpl)
46 : XSgBase(aDriverImpl)
50 inline XSgImageStateBase::XSgImageStateBase(XSgDriverImpl& aDriverImpl, TInt aDataStride)
51 : XSgBase(aDriverImpl), iDataStride(aDataStride)
55 inline TInt XSgImageStateBase::DataStride() const
61 #ifndef SYMBIAN_GRAPHICS_USE_GPU
65 inline TBool TSgImageId_SwLocal::IsMatch(const TSgDrawableId& aId)
67 return reinterpret_cast<const TSgImageId_SwLocal&>(aId).iMinusOne == KErrNotFound;
71 // XSgImageImpl_SwLocal
73 inline XSgImageImpl_SwLocal::XSgImageImpl_SwLocal(XSgDriverImpl& aDriverImpl, const TSgDrawableId& aId)
74 : XSgImageImplBase(aDriverImpl, aId)
78 inline XSgImageImpl_SwLocal::XSgImageImpl_SwLocal(const XSgImageImpl_SwLocal& aImage, TUint32 aFlags)
79 : XSgImageImplBase(aImage, aFlags)
85 // TSgImageId_SurfaceManager
87 inline TBool TSgImageId_SurfaceManager::IsMatch(const TSgDrawableId& aId)
89 return reinterpret_cast<const TSgImageId_SurfaceManager&>(aId).iBufferIndex >= 0
90 && reinterpret_cast<const TSgImageId_SurfaceManager&>(aId).iMetaDataIndex >= 0;
94 // XSgImageImpl_SurfaceManager
96 inline XSgImageImpl_SurfaceManager::XSgImageImpl_SurfaceManager(XSgDriverImpl& aDriverImpl)
97 : XSgImageImplBase(aDriverImpl)
101 inline XSgImageImpl_SurfaceManager::XSgImageImpl_SurfaceManager(XSgDriverImpl& aDriverImpl, const TSgDrawableId& aId)
102 : XSgImageImplBase(aDriverImpl, aId)
106 inline XSgImageImpl_SurfaceManager::XSgImageImpl_SurfaceManager(const XSgImageImpl_SurfaceManager& aImage, TUint32 aFlags)
107 : XSgImageImplBase(aImage, aFlags)
111 // XSgImageState_SurfaceManager
113 inline XSgImageState_SurfaceManager::XSgImageState_SurfaceManager(XSgDriverImpl& aDriverImpl)
114 : XSgImageStateBase(aDriverImpl)
118 inline const TSurfaceId& XSgImageState_SurfaceManager::SurfaceId() const
124 inline const RChunk& XSgImageState_SurfaceManager::DataChunk() const
130 inline TInt XSgImageState_SurfaceManager::DataOffset() const
136 #endif // SGIMAGEIMPL_INL