7 #include "sdlepocapi.h"
11 typedef void (*TCopyFunction
)(const CDsa
& aDsa
, TUint32
* aTarget
, const TUint8
* aSource
, TInt aBytes
, TInt aLineLen
);
13 NONSHARABLE_CLASS(CDsa
) : public CBase
18 ELastDsaRequest
= EpocSdlEnv::ELastService
,
21 inline TBool
IsDsaAvailable() const;
23 static CDsa
* CreateL(RWsSession
& aSession
);
27 TUint8
* LockHwSurface();
28 TInt
AllocSurface(const TSize
& aSize
, TDisplayMode aMode
);
29 inline TDisplayMode
DisplayMode() const;
31 TInt
SetPalette(TInt aFirst
, TInt aCount
, TUint32
* aPalette
);
32 void LockPalette(TBool aLock
);
33 TBool
AddUpdateRect(const TUint8
* aBits
, const TRect
& aUpdateRect
, const TRect
& aRect
);
34 void UpdateSwSurface();
38 TBool
Stopped() const;
39 RWsSession
& Session();
41 CDsa
* CreateGlesDsaL();
47 virtual void ConstructL(RWindow
& aWindow
, CWsScreenDevice
& aDevice
);
48 virtual void SetUpdating(TBool aUpdate
);
50 virtual TUint8
* LockSurface() = 0;
51 virtual void UnlockHwSurface() = 0;
52 virtual void Resume() = 0;
54 virtual void DoBlt(CFbsBitmap
& aBmp
);
56 bool m_updateWholeScreen
;
60 inline const TSize
& SwSize() const;
61 inline const TRect
& HwRect() const;
63 inline const TRect
& ScreenRect() const;
65 CDsa(RWsSession
& aSession
);
75 ESdlThreadSuspend
= 0x100,
76 ESdlThreadExplicitStop
= 0x200
80 virtual void CreateSurfaceL() = 0;
82 void ClipCopy(TUint8
* aTarget
, const TUint8
* aSource
, const TRect
& aUpdateRect
, const TRect
& aSourceRect
) const;
83 static void Copy256(const CDsa
& aDsa
, TUint32
* aTarget
, const TUint8
* aSource
, TInt aBytes
, TInt
);
84 static void CopySlow(const CDsa
& aDsa
, TUint32
* aTarget
, const TUint8
* aSource
, TInt aBytes
, TInt
);
85 static void CopyMem(const CDsa
& aDsa
, TUint32
* aTarget
, const TUint8
* aSource
, TInt aBytes
, TInt
);
87 void SetCopyFunction();
95 TDisplayMode iSourceMode
;
96 TDisplayMode iTargetMode
;
98 TCopyFunction iCopyFunction
;
100 TCopyFunction iCFTable
[3];
108 inline TDisplayMode
CDsa::DisplayMode() const
113 inline const TRect
& CDsa::HwRect() const
118 inline const TSize
& CDsa::SwSize() const
123 inline TBool
CDsa::IsDsaAvailable() const
125 return iStateFlags
& ERunning
;
128 inline const TRect
& CDsa::ScreenRect() const