diff -r d8a3531bc6b8 -r 433cbbb6a04b uiacceltk/hitchcock/coretoolkit/src/HuiDisplay.cpp --- a/uiacceltk/hitchcock/coretoolkit/src/HuiDisplay.cpp Mon Feb 22 17:57:49 2010 +0200 +++ b/uiacceltk/hitchcock/coretoolkit/src/HuiDisplay.cpp Fri Mar 12 15:47:04 2010 +0200 @@ -48,6 +48,7 @@ #include #include "huiskinbackroundlayout.h" #include "HuiFxEngine.h" +#include "huiextension.h" const TUid KHuiInternalFbsBitmapBufferGcUid = {0x2000e5a3}; @@ -932,6 +933,7 @@ if (iForegroundTexture) { + UpdateForegroundTexture(dirtyRect); DrawForegroundTexture(); } @@ -1620,6 +1622,30 @@ return iForegroundTexture; } +void CHuiDisplay::UpdateForegroundTexture(const TRect& aRect) + { + if (iForegroundTexture && iForegroundBitmap && !aRect.IsEmpty()) + { + TRAP_IGNORE(DoUpdateForegroundTextureL(aRect)); + } + } + +void CHuiDisplay::DoUpdateForegroundTextureL(const TRect& aRect) + { + // First try to upload with faster mechanism + THuiTexturePartialBitmapUploadParams params; + params.iErrorCode = KErrNotSupported; + params.iRect = aRect; + params.iBitmap = iForegroundBitmap; + TAny* ptr = ¶ms; + + MHuiTexture* texture = iForegroundTexture; + texture->TextureExtension(KHuiTexturePartialBitmapUploadUid, &ptr); + if ( params.iErrorCode != KErrNone ) + { + iForegroundTexture->UploadL(*iForegroundBitmap, NULL); + } + } void CHuiDisplay::DrawForegroundTexture() {