--- a/uiacceltk/hitchcock/coretoolkit/src/huicanvaswspainter.cpp Wed May 26 16:47:36 2010 +0300
+++ b/uiacceltk/hitchcock/coretoolkit/src/huicanvaswspainter.cpp Tue Jun 08 13:16:48 2010 +0300
@@ -44,6 +44,7 @@
#ifdef HUI_DEBUG_TRACK_DRAWING
#include "alfloggingconfiguration.h"
#include "alfcommanddebug.h"
+#include "huistatictlsdata.h"
#endif
#include <e32cmn.h>
#include <AknLayoutFont.h>
@@ -126,13 +127,16 @@
// Never happens, right.
}
- iWsCommandBufferReader = new (ELeave) CHuiCanvasCmdBufferReader();
-#ifdef HUI_DEBUG_TRACK_DRAWING
- iCommandDebugger = CAlfCommandDebug::NewL();
- CHuiCanvasWsGc* realGc = iCanvasWsGc;
- iCanvasWsGc = CHuiCanvasDebugWsGc::NewL( realGc, *iCommandDebugger );
+ iWsCommandBufferReader = new (ELeave) CHuiCanvasCmdBufferReader();
-#endif
+ #ifdef HUI_DEBUG_TRACK_DRAWING
+ if (!iCanvasDebugWsGc)
+ {
+ iCanvasDebugWsGc = CHuiCanvasDebugWsGc::NewL( iCanvasWsGc, *TTlsData::CommandDebugger() );
+ iCanvasWsGc = iCanvasDebugWsGc;
+ }
+
+ #endif
}
@@ -157,7 +161,7 @@
iTempCurrentSubRegion.Close();
iTempIntersectingRegion.Close();
#ifdef HUI_DEBUG_TRACK_DRAWING
- delete iCommandDebugger;
+ delete iCanvasDebugWsGc;
#endif
iFullUpdateRegion.Close();
iShapeRegion.Close();
@@ -566,6 +570,12 @@
// Clip drawing to update area. This seems to improve performance although
// it may depend on used HW.
+
+ // Set position delta to zero, otherwise updateregion is adjusted incorrectly
+ // in SW mode. No effect on HW mode as it does not adjust the updateregion in
+ // EnableUpdateRegion call...
+ TPoint delta(0,0);
+ iCanvasWsGc->SetPositionDelta(delta);
iCanvasWsGc->EnableUpdateRegion(iCommandBuffers[cb]->iUpdateRegion, aClearBeforeHandlingBuffers);
#ifdef HUI_DEBUG_PRINT_PERFORMANCE_INTERVAL
@@ -761,7 +771,7 @@
}
}
- iCommandDebugger->StartFrame();
+ TTlsData::CommandDebugger()->StartFrame();
if ( commandBuffer->iProcessName )
{
// UNCOMMENT THIS IF YOU WANT TO PRINT EVERYTHING
@@ -797,7 +807,7 @@
{
command = readerStream.ReadUint8L();
#ifdef HUI_DEBUG_TRACK_DRAWING
- iCommandDebugger->SetDescription( command );
+ TTlsData::CommandDebugger()->SetDescription( command );
#endif
// Command cases are ordered approximately in the order so that most common ones are at first
@@ -1286,7 +1296,7 @@
} while( offset < bufLength );
#ifdef HUI_DEBUG_TRACK_DRAWING
- iCommandDebugger->EndFrame();
+ TTlsData::CommandDebugger()->EndFrame();
#endif
}
@@ -2140,7 +2150,7 @@
if (aIndex==-1) return; //TP
// Update region is modified when new buffers are added after this buffer,
// so store the region only at first read.
- if (iCommandBuffers[aIndex]->iChanged && iCommandBuffers[aIndex]->iUpdateRegion.Count() == 0)
+ if (iCommandBuffers[aIndex]->iChanged && iCommandBuffers[aIndex]->iOriginalUpdateRegion.Count() == 0)
{
// Check first that the coordiates are not insane (sometimes thay are)
TInt count = iTempRegion.Count();
@@ -2752,8 +2762,16 @@
}
#ifdef HUI_DEBUG_TRACK_DRAWING
- CHuiCanvasWsGc* realGc = iCanvasWsGc;
- iCanvasWsGc = CHuiCanvasDebugWsGc::NewL( realGc, *iCommandDebugger );
+ if (!iCanvasDebugWsGc)
+ {
+ iCanvasDebugWsGc = CHuiCanvasDebugWsGc::NewL( iCanvasWsGc, *TTlsData::CommandDebugger() );
+ }
+ else if(iCanvasWsGc!=iCanvasDebugWsGc)
+ {
+ iCanvasDebugWsGc->SetInternalGc(iCanvasWsGc);
+ }
+
+ iCanvasWsGc = iCanvasDebugWsGc;
#endif
AMT_MAP_CANVAS_WS_PAINTER_SELECT_GC();