From 20aa32bacfe9b46c15adb6b8eccfa7788f991027 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 8 Mar 2009 22:27:57 +0100 Subject: [PATCH] Force hardware pixel format to 565. From now on hardware pixel format will always be 565. --- src/main/symbian/SDL_main.cpp | 15 +- src/main/symbian/sdlexe.cpp | 1 + src/video/symbian/SDL_epocvideo.cpp | 83 ++-------- src/video/symbian/dsa.cpp | 315 +++++++++++------------------------- symbian/include/internal/dsa.h | 14 +- symbian/include/internal/epoc_sdl.h | 3 +- symbian/include/sdlepocapi.h | 4 +- 7 files changed, 120 insertions(+), 315 deletions(-) diff --git a/src/main/symbian/SDL_main.cpp b/src/main/symbian/SDL_main.cpp index f33dbda..7ccf2df 100644 --- a/src/main/symbian/SDL_main.cpp +++ b/src/main/symbian/SDL_main.cpp @@ -147,9 +147,9 @@ bool EpocSdlEnv::IsDsaAvailable() return gEpocEnv->iDsa != NULL && gEpocEnv->iDsa->IsDsaAvailable(); } -int EpocSdlEnv::AllocSurface(const TSize& aSize, TDisplayMode aMode) +int EpocSdlEnv::AllocSurface(const TSize& aSize, int bpp) { - return gEpocEnv->iDsa->AllocSurface(aSize, aMode); + return gEpocEnv->iDsa->AllocSurface(aSize, bpp); } void EpocSdlEnv::UnlockHwSurface() @@ -172,11 +172,6 @@ bool EpocSdlEnv::AddUpdateRect(TUint8* aAddress, const TRect& aUpdateRect, const return gEpocEnv->iDsa->AddUpdateRect(aAddress, aUpdateRect, aRect); } -TDisplayMode EpocSdlEnv::DisplayMode() -{ - return gEpocEnv->iDsa == NULL ? ENone : gEpocEnv->iDsa->DisplayMode(); -} - int EpocSdlEnv::SetPalette(int aFirstcolor, int aColorCount, TUint32* aPalette) { return gEpocEnv->iDsa->SetPalette(aFirstcolor, aColorCount, aPalette); @@ -363,7 +358,7 @@ void CSDL::Resize() { if(m_orientationWait) { - EpocSdlEnv::AllocSurface(m_size, m_mode); + EpocSdlEnv::AllocSurface(m_size, m_bpp); m_orientationWait = false; } else @@ -373,11 +368,11 @@ void CSDL::Resize() } } -void CSDL::SetOrientation(CAknAppUi::TAppUiOrientation orientation, const TSize& aSize, TDisplayMode aMode) +void CSDL::SetOrientation(CAknAppUi::TAppUiOrientation orientation, const TSize& aSize, int bpp) { m_orientationWait = true; m_size = aSize; - m_mode = aMode; + m_bpp = bpp; TRAPD(err, static_cast(CEikonEnv::Static()->EikAppUi())->SetOrientationL(orientation)); } diff --git a/src/main/symbian/sdlexe.cpp b/src/main/symbian/sdlexe.cpp index 1f3df54..131434a 100644 --- a/src/main/symbian/sdlexe.cpp +++ b/src/main/symbian/sdlexe.cpp @@ -46,6 +46,7 @@ CSDLWin::CSDLWin( const TRect& aRect ) CreateWindowL(); SetRect(aRect); ActivateL(); + Window().SetRequiredDisplayMode(EColor64K); } void CSDLWin::Draw(const TRect& /*aRect*/) const diff --git a/src/video/symbian/SDL_epocvideo.cpp b/src/video/symbian/SDL_epocvideo.cpp index 90b70c0..c5ab00b 100644 --- a/src/video/symbian/SDL_epocvideo.cpp +++ b/src/video/symbian/SDL_epocvideo.cpp @@ -183,12 +183,10 @@ int S60_VideoInit(_THIS, SDL_PixelFormat *vformat) { /* Initialise Epoc frame buffer */ - const TDisplayMode displayMode = EpocSdlEnv::DisplayMode(); - /* The "best" video format should be returned to caller. */ - vformat->BitsPerPixel = TDisplayModeUtils::NumDisplayModeBitsPerPixel(displayMode); - vformat->BytesPerPixel = TDisplayModeUtils::NumDisplayModeBitsPerPixel(displayMode) / 8; + vformat->BitsPerPixel = 16; + vformat->BytesPerPixel = 2; Private->iRect = new SDL_Rect*[3]; Private->iRect[0] = new SDL_Rect; @@ -249,53 +247,17 @@ int S60_SetColors(_THIS, int firstcolor, int ncolors, SDL_Color *colors) if ((firstcolor+ncolors) > 256) return -1; TUint32 palette[256]; - const TDisplayMode mode = EpocSdlEnv::DisplayMode(); int c = 0; - if(TDisplayModeUtils::NumDisplayModeColors(mode) == 4096) - { - // Set 12 bit palette - for(int i = firstcolor; i < firstcolor+ncolors; i++) - { - // 4k value: 0000 rrrr gggg bbbb - TUint32 color4K = (colors[c].r & 0x0000f0) << 4; - color4K |= (colors[c].g & 0x0000f0); - color4K |= (colors[c].b & 0x0000f0) >> 4; - palette[i] = color4K; - c++; - } - } - else if(TDisplayModeUtils::NumDisplayModeColors(mode) == 65536) - { - for(int i = firstcolor; i < firstcolor+ncolors; i++) - { - // 64k-colour displays effectively support RGB values - // with 5 bits allocated to red, 6 to green and 5 to blue - // 64k value: rrrr rggg gggb bbbb - TUint32 color64K = (colors[c].r & 0x0000f8) << 8; - color64K |= (colors[c].g & 0x0000fc) << 3; - color64K |= (colors[c].b & 0x0000f8) >> 3; - palette[i] = color64K; - c++; - } - } - else if(TDisplayModeUtils::NumDisplayModeColors(mode) == 16777216) - { - for(int i = firstcolor; i < firstcolor+ncolors; i++) - { - // 16M-colour - //0000 0000 rrrr rrrr gggg gggg bbbb bbbb - TUint32 color16M = colors[c].r << 16; - color16M |= colors[c].g << 8; - color16M |= colors[c].b; - palette[i] = color16M; - c++; - } - } - else + for(int i = firstcolor; i < firstcolor+ncolors; i++) { - return -2; + TUint32 color64K = (colors[c].r & 0x0000f8) << 8; + color64K |= (colors[c].g & 0x0000fc) << 3; + color64K |= (colors[c].b & 0x0000f8) >> 3; + palette[i] = color64K; + c++; } + if(EpocSdlEnv::SetPalette(firstcolor, ncolors, palette) == KErrNone) { // palette has been updated, redraw whole screen to include changes @@ -426,27 +388,6 @@ void S60_GlesSwapBuffers(_THIS) _this->gl_data->iSurface); } -TDisplayMode GetDisplayMode(int aBitsPerPixel) -{ - const TDisplayMode displayMode = EpocSdlEnv::DisplayMode(); - int dmode = EColorLast; - if(TDisplayModeUtils::NumDisplayModeBitsPerPixel(displayMode) == aBitsPerPixel) - { - dmode = displayMode; - } - else - { - do - { - --dmode; - } - while(TDisplayModeUtils::IsDisplayModeColor(TDisplayMode(dmode)) && - TDisplayModeUtils::NumDisplayModeBitsPerPixel(TDisplayMode(dmode)) != aBitsPerPixel); - } - return TDisplayMode(dmode); -} - - static void glAssert(_THIS) { const EGLint err = DC(eglGetError)(); @@ -614,7 +555,7 @@ SDL_Surface *S60_SetVideoMode(_THIS, SDL_Surface *current, int width, int height if(sz.iWidth < sz.iHeight && orientation != CAknAppUi::EAppUiOrientationPortrait || sz.iWidth > sz.iHeight && orientation != CAknAppUi::EAppUiOrientationLandscape) { - g_SDL->SetOrientation(orientation, TSize(width, height), GetDisplayMode(current->format->BitsPerPixel)); + g_SDL->SetOrientation(orientation, TSize(width, height), current->format->BitsPerPixel / 8); } else { @@ -627,7 +568,7 @@ SDL_Surface *S60_SetVideoMode(_THIS, SDL_Surface *current, int width, int height TRAPD(err, static_cast(CEikonEnv::Static()->EikAppUi())->SetOrientationL(CAknAppUi::EAppUiOrientationUnspecified)); } - const int err = EpocSdlEnv::AllocSurface(TSize(width, height), GetDisplayMode(current->format->BitsPerPixel)); + const int err = EpocSdlEnv::AllocSurface(TSize(width, height), current->format->BitsPerPixel / 8); if(err != KErrNone) return NULL; } @@ -644,7 +585,7 @@ SDL_Surface *S60_SetVideoMode(_THIS, SDL_Surface *current, int width, int height static int S60_AllocHWSurface(_THIS, SDL_Surface* surface) { - return KErrNone == EpocSdlEnv::AllocSurface(TSize(surface->w, surface->h), GetDisplayMode(surface->format->BitsPerPixel)); + return KErrNone == EpocSdlEnv::AllocSurface(TSize(surface->w, surface->h), surface->format->BitsPerPixel / 8); } static void S60_FreeHWSurface(_THIS, SDL_Surface* /*surface*/) diff --git a/src/video/symbian/dsa.cpp b/src/video/symbian/dsa.cpp index 387cd65..fcb7e33 100644 --- a/src/video/symbian/dsa.cpp +++ b/src/video/symbian/dsa.cpp @@ -3,13 +3,6 @@ #include #include -static int BytesPerPixel(TDisplayMode aMode) -{ - return ((TDisplayModeUtils::NumDisplayModeBitsPerPixel(aMode) - 1) >> 3) + 1; -} - -////////////////////////////////////////////////////////////////////// - class CDsaGles : public CDsa { public: @@ -26,7 +19,7 @@ class CDsaGles : public CDsa class CDsaBase : public CDsa, public MDirectScreenAccess { public: - CDsaBase(RWsSession& aSession) : CDsa(aSession) { m_updateWholeScreen = false; } + CDsaBase(RWsSession& aSession) : CDsa(aSession), iBmp( NULL ) { m_updateWholeScreen = false; } ~CDsaBase(); protected: @@ -89,7 +82,7 @@ void CDsaBase::Free() TUint8* CDsaBase::LockSurface() { iBmp->LockHeap(); - return reinterpret_cast(iBmp->DataAddress()); + return (TUint8*)iBmp->DataAddress(); } void CDsaBase::UnlockHwSurface() @@ -103,7 +96,7 @@ void CDsaBase::CreateSurfaceL(const TSize& aSize) { Free(); iBmp = new CFbsBitmap(); - User::LeaveIfError(iBmp->Create(aSize, DisplayMode())); + User::LeaveIfError(iBmp->Create(aSize, EColor64K)); } void CDsaBase::AbortNow(RDirectScreenAccess::TTerminationReasons /*aReason*/) @@ -132,34 +125,60 @@ void CDsaBase::Stop() /////////////////////////////////////////////////////////////////////// -class TDsa +void ClipCopy1(const CDsa& iDsa, TUint8* aTarget, + const TUint8* aSource, + const TRect& aUpdateRect, + const TRect& aSourceRect) { - public: - inline TDsa(const CDsa& aDsa) : iDsa(aDsa) {} - inline void Copy(TUint32* aTarget, const TUint8* aSrc, int aBytes) const; - private: - const CDsa& iDsa; -}; + const TUint8* source = (const TUint8*)aSource; + const int lineWidth = aSourceRect.Width(); -inline void TDsa::Copy(TUint32* aTarget, const TUint8* aSrc, int aBytes) const -{ - iDsa.iCopyFunction(iDsa, aTarget, aSrc, aBytes); + source += (aUpdateRect.iTl.iY * lineWidth); + const int sourceStartOffset = aUpdateRect.iTl.iX; + source += sourceStartOffset; + + TUint16* targetPtr = (TUint16*)aTarget; + + int scanLineWidth = aSourceRect.iBr.iX; + + targetPtr += aUpdateRect.iTl.iY * scanLineWidth; + const int targetStartOffset = aUpdateRect.iTl.iX; + + targetPtr += targetStartOffset; + + const int height = aUpdateRect.Height(); + + const int copyLen = aUpdateRect.Width(); + const int lineMove = lineWidth - copyLen; + scanLineWidth -= copyLen; + + for(int i = 0; i < height; i++) //source is always smaller + { + int w = copyLen; + do + { + *targetPtr++ = iDsa.iLut256[*source++]; + } + while(--w); + + source += lineMove; + targetPtr += scanLineWidth; + } } -template -void ClipCopy(const TDsa& iDsa, TUint8* aTarget, +void ClipCopy2(const CDsa& iDsa, TUint8* aTarget, const TUint8* aSource, const TRect& aUpdateRect, const TRect& aSourceRect) { - const S* source = reinterpret_cast(aSource); + const TUint16* source = (const TUint16*)aSource; const int lineWidth = aSourceRect.Width(); source += (aUpdateRect.iTl.iY * lineWidth); const int sourceStartOffset = aUpdateRect.iTl.iX; source += sourceStartOffset; - T* targetPtr = reinterpret_cast(aTarget); + TUint16* targetPtr = (TUint16*)aTarget; const int scanLineWidth = aSourceRect.iBr.iX; @@ -171,11 +190,56 @@ void ClipCopy(const TDsa& iDsa, TUint8* aTarget, const int height = aUpdateRect.Height(); const int lineMove = lineWidth; + const int copyLen = aUpdateRect.Width() * 2; + + for(int i = 0; i < height; i++) //source is always smaller + { + memcpy( targetPtr, source, copyLen ); + source += lineMove; + targetPtr += scanLineWidth; + } +} + +void ClipCopy4(const CDsa& iDsa, TUint8* aTarget, + const TUint8* aSource, + const TRect& aUpdateRect, + const TRect& aSourceRect) +{ + const TUint32* source = (const TUint32*)aSource; + const int lineWidth = aSourceRect.Width(); + + source += (aUpdateRect.iTl.iY * lineWidth); + const int sourceStartOffset = aUpdateRect.iTl.iX; + source += sourceStartOffset; + + TUint16* targetPtr = (TUint16*)aTarget; + + int scanLineWidth = aSourceRect.iBr.iX; + + targetPtr += aUpdateRect.iTl.iY * scanLineWidth; + const int targetStartOffset = aUpdateRect.iTl.iX; + + targetPtr += targetStartOffset; + + const int height = aUpdateRect.Height(); + const int copyLen = aUpdateRect.Width(); + const int lineMove = lineWidth - copyLen; + scanLineWidth -= copyLen; for(int i = 0; i < height; i++) //source is always smaller { - iDsa.Copy(reinterpret_cast(targetPtr), reinterpret_cast(source), copyLen); + int w = copyLen; + do + { + *targetPtr++ = + ( ( *source & 0xF80000 ) >> 8 ) | + ( ( *source & 0x00FC00 ) >> 5 ) | + ( ( *source & 0x0000F8 ) >> 3 ); + source++; + } + while(--w); + source += lineMove; targetPtr += scanLineWidth; } @@ -201,8 +265,6 @@ void CDsa::ConstructL(RWindow& aWindow, CWsScreenDevice& /*aDevice*/) { if(iLut256 == NULL) iLut256 = new TUint32[256]; - iTargetMode = aWindow.DisplayMode(); - iTargetBpp = BytesPerPixel(DisplayMode()); iWindow = &aWindow; } @@ -222,9 +284,6 @@ CDsa::CDsa(RWsSession& aSession) : iSession(aSession) { - iCFTable[0] = CopyMem; - iCFTable[1] = Copy256; - iCFTable[2] = CopySlow; } RWsSession& CDsa::Session() @@ -232,17 +291,14 @@ RWsSession& CDsa::Session() return iSession; } -int CDsa::AllocSurface(const TSize& aSize, TDisplayMode aMode) +int CDsa::AllocSurface(const TSize& aSize, int bpp) { - iSourceMode = aMode; - iSourceBpp = BytesPerPixel(aMode); + iSourceBpp = bpp; TRAPD(err, CreateSurfaceL(aSize)); if(err != KErrNone) return err; - SetCopyFunction(); - return KErrNone; } @@ -251,31 +307,20 @@ void CDsa::ClipCopy(TUint8* aTarget, const TRect& aUpdateRect, const TRect& aSourceRect) const { - const TDsa dsa(*this); switch(iSourceBpp) { case 1: - ::ClipCopy(dsa, aTarget, aSource, aUpdateRect, aSourceRect); + ::ClipCopy1(*this, aTarget, aSource, aUpdateRect, aSourceRect); break; case 2: - ::ClipCopy(dsa, aTarget, aSource, aUpdateRect, aSourceRect); + ::ClipCopy2(*this, aTarget, aSource, aUpdateRect, aSourceRect); break; case 4: - ::ClipCopy(dsa, aTarget, aSource, aUpdateRect, aSourceRect); + ::ClipCopy4(*this, aTarget, aSource, aUpdateRect, aSourceRect); break; } } -void CDsa::SetCopyFunction() -{ - if(iSourceMode == DisplayMode()) - iCopyFunction = iCFTable[0]; - else if(iSourceMode == EColor256) - iCopyFunction = iCFTable[1]; - else - iCopyFunction = iCFTable[2]; -} - bool CDsa::AddUpdateRect(const TUint8* aBits, const TRect& aUpdateRect, const TRect& aRect) { if(iTargetAddr == NULL) @@ -290,15 +335,7 @@ bool CDsa::AddUpdateRect(const TUint8* aBits, const TRect& aUpdateRect, const TR TRect sourceRect = aRect; TRect updateRect = aUpdateRect; - if(iSourceMode != DisplayMode() || aRect != aUpdateRect) - { - ClipCopy(target, aBits, aUpdateRect, aRect); - } - else - { - const int byteCount = aRect.Width() * aRect.Height() * iSourceBpp; //this could be stored - memcpy(target, aBits, byteCount); - } + ClipCopy(target, aBits, aUpdateRect, aRect); return true; } @@ -306,7 +343,7 @@ bool CDsa::AddUpdateRect(const TUint8* aBits, const TRect& aUpdateRect, const TR void CDsa::UpdateSwSurface() { iTargetAddr = NULL; - UnlockHwSurface(); //could be faster if does not use AO, but only check status before redraw, then no context switch needed + UnlockHwSurface(); } void CDsa::Stop() @@ -336,167 +373,7 @@ CDsa* CDsa::CreateGlesDsaL() ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// -void CDsa::Copy256(const CDsa& aDsa, TUint32* aTarget, const TUint8* aSource, int aBytes) -{ - TUint32* target = aTarget; - const TUint32* endt = target + aBytes; - const TUint8* source = aSource; - while(target < endt) - { - *target++ = aDsa.iLut256[*source++]; - } -} - void CDsa::CopyMem(const CDsa& /*aDsa*/, TUint32* aTarget, const TUint8* aSource, int aBytes) { memcpy(aTarget, aSource, aBytes << 2); } - -class MRgbCopy -{ - public: - virtual void Copy(TUint32* aTarget, const TUint8* aSource, int aBytes) = 0; -}; - -template -class TRgbCopy : public MRgbCopy -{ - public: - TRgbCopy(TDisplayMode aMode); - void* operator new(TUint aBytes, void* aMem); - void Copy(TUint32* aTarget, const TUint8* aSource, int aBytes); - static TUint32 Gray256(const TUint8& aPixel); - static TUint32 Color256(const TUint8& aPixel); - static TUint32 Color4K(const TUint16& aPixel); - static TUint32 Color64K(const TUint16& aPixel); - static TUint32 Color16M(const TUint32& aPixel); - static TUint32 Color16MU(const TUint32& aPixel); - static TUint32 Color16MA(const TUint32& aPixel); - private: - typedef TUint32 (*TRgbFunc) (const T& aValue); - TRgbFunc iFunc; -}; - -template -void* TRgbCopy::operator new(TUint /*aBytes*/, void* aMem) -{ - return aMem; -} - -template -TRgbCopy::TRgbCopy(TDisplayMode aMode) -{ - switch(aMode) - { - case EGray256 : iFunc = (TRgbFunc) Gray256; break; - case EColor256 : iFunc = (TRgbFunc) Color256; break; - case EColor4K : iFunc = (TRgbFunc) Color4K; break; - case EColor64K : iFunc = (TRgbFunc) Color64K; break; - case EColor16M : iFunc = (TRgbFunc) Color16M; break; - case EColor16MU : iFunc = (TRgbFunc) Color16MU; break; - case EColor16MA : iFunc = (TRgbFunc) Color16MA; break; - default: - PANIC(KErrNotSupported); - } -} - -template -void TRgbCopy::Copy(TUint32* aTarget, const TUint8* aSource, int aBytes) -{ - const T* source = reinterpret_cast(aSource); - TUint32* target = aTarget; - TUint32* endt = target + aBytes; - - while(target < endt) - { - const T value = *source++; - *target++ = iFunc(value); - } -} - -template -TUint32 TRgbCopy::Gray256(const TUint8& aPixel) -{ - const TUint32 px = aPixel << 16 | aPixel << 8 | aPixel; - return px; -} - -template -TUint32 TRgbCopy::Color256(const TUint8& aPixel) -{ - return TRgb::Color256(aPixel).Value(); -} - -template -TUint32 TRgbCopy::Color4K(const TUint16& aPixel) -{ - TUint32 col = (aPixel & 0xF00) << 12; - col |= (aPixel & 0xF00) << 8; - - col |= (aPixel & 0x0F0) << 8; - col |= (aPixel & 0x0F0); - - col |= (aPixel & 0x00F) << 4; - col |= (aPixel & 0x00F); - - return col; -} - -template -TUint32 TRgbCopy::Color64K(const TUint16& aPixel) -{ - TUint32 col = (aPixel & 0xF800)<< 8; - col |= (aPixel & 0xE000) << 3; - - col |= (aPixel & 0x07E0) << 5; - col |= (aPixel & 0xC0) >> 1; - - col |= (aPixel & 0x07E0) << 3; - col |= (aPixel & 0x1C) >> 2; - - return col; -} - -template -TUint32 TRgbCopy::Color16M(const TUint32& aPixel) -{ - return TRgb::Color16M(aPixel).Value(); -} - -template -TUint32 TRgbCopy::Color16MU(const TUint32& aPixel) -{ - return TRgb::Color16MU(aPixel).Value(); -} - -template -TUint32 TRgbCopy::Color16MA(const TUint32& aPixel) -{ - return TRgb::Color16MA(aPixel).Value(); -} - -typedef TUint64 TStackMem; - -static MRgbCopy* GetCopy(void* mem, TDisplayMode aMode) -{ - if(aMode == EColor256 || aMode == EGray256) - { - return new (mem) TRgbCopy(aMode); - } - if(aMode == EColor4K || aMode == EColor64K) - { - return new (mem) TRgbCopy(aMode); - } - if(aMode == EColor16M || aMode == EColor16MU || aMode == EColor16MA) - { - return new (mem) TRgbCopy(aMode); - } - PANIC(KErrNotSupported); - return NULL; -} - -void CDsa::CopySlow(const CDsa& aDsa, TUint32* aTarget, const TUint8* aSource, int aBytes) -{ - TStackMem mem = 0; - GetCopy(&mem, aDsa.iSourceMode)->Copy(aTarget, aSource, aBytes); -} diff --git a/symbian/include/internal/dsa.h b/symbian/include/internal/dsa.h index c39a0b6..ce4c2bb 100644 --- a/symbian/include/internal/dsa.h +++ b/symbian/include/internal/dsa.h @@ -19,8 +19,7 @@ class CDsa : public CBase ~CDsa(); - TInt AllocSurface(const TSize& aSize, TDisplayMode aMode); - inline TDisplayMode DisplayMode() const; + TInt AllocSurface(const TSize& aSize, int bpp); TInt SetPalette(TInt aFirst, TInt aCount, TUint32* aPalette); bool AddUpdateRect(const TUint8* aBits, const TRect& aUpdateRect, const TRect& aRect); @@ -39,6 +38,8 @@ class CDsa : public CBase virtual void Stop(); bool m_updateWholeScreen; + TInt iSourceBpp; + TUint32* iLut256; protected: CDsa(RWsSession& aSession); @@ -58,10 +59,6 @@ class CDsa : public CBase RWsSession& iSession; TInt iTargetBpp; - TInt iSourceBpp; - TDisplayMode iSourceMode; - TDisplayMode iTargetMode; - TUint32* iLut256; TCopyFunction iCopyFunction; TUint8* iTargetAddr; TCopyFunction iCFTable[3]; @@ -70,11 +67,6 @@ class CDsa : public CBase friend class TDsa; }; -inline TDisplayMode CDsa::DisplayMode() const -{ - return iTargetMode; -} - inline bool CDsa::IsDsaAvailable() const { return iRunning; diff --git a/symbian/include/internal/epoc_sdl.h b/symbian/include/internal/epoc_sdl.h index 008cd5c..326a11e 100644 --- a/symbian/include/internal/epoc_sdl.h +++ b/symbian/include/internal/epoc_sdl.h @@ -39,9 +39,8 @@ class TSdlCleanupItem class EpocSdlEnv { public: - static TDisplayMode DisplayMode(); static bool IsDsaAvailable(); - static TInt AllocSurface(const TSize& aSize, TDisplayMode aMode); + static TInt AllocSurface(const TSize& aSize, int bpp); static void UnlockHwSurface(); static TUint8* LockHwSurface(); static void UpdateSwSurface(); diff --git a/symbian/include/sdlepocapi.h b/symbian/include/sdlepocapi.h index 6be520b..e1604f0 100644 --- a/symbian/include/sdlepocapi.h +++ b/symbian/include/sdlepocapi.h @@ -47,7 +47,7 @@ class CSDL : public MRemConCoreApiTargetObserver, public MProfileWatcher void Resize(); CEventQueue* EventQueue() { return m_eventQueue; } - void SetOrientation(CAknAppUi::TAppUiOrientation orientation, const TSize& aSize, TDisplayMode aMode); + void SetOrientation(CAknAppUi::TAppUiOrientation orientation, const TSize& aSize, int bpp); int GetSoundPauseReason() const { return m_soundPauseReason; } void SetFocus(bool focused); @@ -59,7 +59,7 @@ class CSDL : public MRemConCoreApiTargetObserver, public MProfileWatcher CEventQueue* m_eventQueue; bool m_orientationWait; TSize m_size; - TDisplayMode m_mode; + int m_bpp; int m_soundPauseReason; ProfileWatcher* m_profileWatcher; }; -- 2.11.4.GIT