Avoid type redefinitions.
[SDL.s60v3.git] / symbian / include / internal / dsa.h
blobf634b06e9d320151119c8ed3425a308434d32bcc
1 #ifndef __DSA_H__
2 #define __DSA_H__
4 #include <e32base.h>
5 #include <w32std.h>
6 #include "epoc_sdl.h"
7 #include "sdlepocapi.h"
9 class CDsa;
11 typedef void (*TCopyFunction)(const CDsa& aDsa, TUint32* aTarget, const TUint8* aSource, TInt aBytes);
13 class CDsa : public CBase
15 public:
16 inline bool IsDsaAvailable() const;
18 static CDsa* CreateL(RWsSession& aSession);
20 CDsa();
21 virtual ~CDsa();
23 TInt AllocSurface(int bpp);
25 TInt SetPalette(TInt aFirst, TInt aCount, TUint32* aPalette);
26 bool Blit(const TUint8* aBits, const TSize& aSize);
28 RWsSession& Session();
29 RWindow* Window();
30 CDsa* CreateGlesDsaL();
32 virtual void Free();
34 virtual void ConstructL(RWindow& aWindow, CWsScreenDevice& aDevice);
36 virtual TUint8* LockSurface() = 0;
37 virtual void UnlockHwSurface() = 0;
38 virtual void Stop();
40 bool m_updateWholeScreen;
41 TInt iSourceBpp;
42 TUint32* iLut256;
44 protected:
45 CDsa(RWsSession& aSession);
46 void Start();
48 CFbsBitmap* iBmp;
50 private:
51 virtual void CreateSurfaceL() = 0;
53 void ClipCopy(TUint8* aTarget, const TUint8* aSource, const TRect& aUpdateRect, const TRect& aSourceRect) const;
54 static void Copy256(const CDsa& aDsa, TUint32* aTarget, const TUint8* aSource, TInt aBytes);
55 static void CopySlow(const CDsa& aDsa, TUint32* aTarget, const TUint8* aSource, TInt aBytes);
56 static void CopyMem(const CDsa& aDsa, TUint32* aTarget, const TUint8* aSource, TInt aBytes);
58 void SetCopyFunction();
60 bool iRunning;
61 RWsSession& iSession;
63 TInt iTargetBpp;
64 TCopyFunction iCopyFunction;
65 TUint8* iTargetAddr;
66 TCopyFunction iCFTable[3];
67 TInt iNewFlags;
68 RWindow* iWindow;
71 inline bool CDsa::IsDsaAvailable() const
73 return iRunning;
76 #endif