Remove CBitmapSurface.
[SDL.s60v3.git] / symbian / include / internal / dsa.h
blobc39a0b66690e85512182b852d5738076e2511d57
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();
22 TInt AllocSurface(const TSize& aSize, TDisplayMode aMode);
23 inline TDisplayMode DisplayMode() const;
25 TInt SetPalette(TInt aFirst, TInt aCount, TUint32* aPalette);
26 bool AddUpdateRect(const TUint8* aBits, const TRect& aUpdateRect, const TRect& aRect);
27 void UpdateSwSurface();
29 RWsSession& Session();
30 RWindow* Window();
31 CDsa* CreateGlesDsaL();
33 virtual void Free();
35 virtual void ConstructL(RWindow& aWindow, CWsScreenDevice& aDevice);
37 virtual TUint8* LockSurface() = 0;
38 virtual void UnlockHwSurface() = 0;
39 virtual void Stop();
41 bool m_updateWholeScreen;
43 protected:
44 CDsa(RWsSession& aSession);
45 void Start();
47 private:
48 virtual void CreateSurfaceL(const TSize& aSize) = 0;
50 void ClipCopy(TUint8* aTarget, const TUint8* aSource, const TRect& aUpdateRect, const TRect& aSourceRect) const;
51 static void Copy256(const CDsa& aDsa, TUint32* aTarget, const TUint8* aSource, TInt aBytes);
52 static void CopySlow(const CDsa& aDsa, TUint32* aTarget, const TUint8* aSource, TInt aBytes);
53 static void CopyMem(const CDsa& aDsa, TUint32* aTarget, const TUint8* aSource, TInt aBytes);
55 void SetCopyFunction();
57 bool iRunning;
58 RWsSession& iSession;
60 TInt iTargetBpp;
61 TInt iSourceBpp;
62 TDisplayMode iSourceMode;
63 TDisplayMode iTargetMode;
64 TUint32* iLut256;
65 TCopyFunction iCopyFunction;
66 TUint8* iTargetAddr;
67 TCopyFunction iCFTable[3];
68 TInt iNewFlags;
69 RWindow* iWindow;
70 friend class TDsa;
73 inline TDisplayMode CDsa::DisplayMode() const
75 return iTargetMode;
78 inline bool CDsa::IsDsaAvailable() const
80 return iRunning;
83 #endif