--- a/uiacceltk/hitchcock/AlfRenderStage/src/alfrenderstage.cpp Mon Feb 22 17:57:49 2010 +0200
+++ b/uiacceltk/hitchcock/AlfRenderStage/src/alfrenderstage.cpp Fri Mar 12 15:47:04 2010 +0200
@@ -71,7 +71,15 @@
delete iWsGraphicsContext;
delete iGoomSession;
- // Used just as a temporary holding place, do not delete!
+ #ifdef USE_MODULE_TEST_HOOKS_FOR_ALF
+ if (Dll::Tls()!=NULL)
+ {
+ delete AMT_CONTROL();
+ Dll::FreeTls();
+ }
+ #endif
+
+ // Used just as a temporary holding place, do not delete!
iWindowDrawingNode = NULL;
}
@@ -109,6 +117,15 @@
compcntrl->AlfBridgeCallback(MAlfBridge::ESetWindowTreeObserver,(MAlfCompositionAgnosticWindowTreeObserver*)this);
}
+ #ifdef USE_MODULE_TEST_HOOKS_FOR_ALF
+ // Setup TLS and open global module testing chunk and mutex
+ if (Dll::Tls()==NULL) // create only for the first render stage!
+ {
+ User::LeaveIfError(Dll::SetTls(new(ELeave) CAlfModuleTestDataControl()));
+ User::LeaveIfError(AMT_CONTROL()->OpenGlobalObjects());
+ }
+ #endif
+
__ALFLOGSTRING("CAlfRenderStage: ready to rock");
}
@@ -348,17 +365,46 @@
drawRegion.AddRect( aExtent );
TRegionFix<1> clipRegion;
clipRegion.AddRect( aClipRect );
-
+
+ TRgb penColor = TRgb(0x555555);
+ TRgb brushColor = TRgb(0x555555);
+ TRgb dotColor = TRgb(0xBBBBBB);
+
WindowRedrawStart( aWindowTreeNode, drawRegion );
iWsGraphicsContext->Reset();
iWsGraphicsContext->SetDrawMode( MWsGraphicsContext::EDrawModePEN );
iWsGraphicsContext->SetBrushStyle( MWsGraphicsContext::ESolidBrush );
iWsGraphicsContext->SetPenStyle( MWsGraphicsContext::ESolidPen );
- iWsGraphicsContext->SetBrushColor( KRgbBlack ); // color from interface is white, so temporirily putting black
- //const TRect clipRect = cursor->ClipRect();
- //const TRect cursorRect = cursor->Rect();
- iWsGraphicsContext->SetClippingRegion( clipRegion );
+ iWsGraphicsContext->SetBrushColor( brushColor );
+ iWsGraphicsContext->SetPenColor( penColor );
+ iWsGraphicsContext->SetClippingRegion( clipRegion );
iWsGraphicsContext->DrawRect( aCursorRect );
+
+ // Draw pattern to cursor so that it is visible in any color backgrounds.
+ iWsGraphicsContext->SetPenColor( dotColor );
+ TPoint start = aCursorRect.iTl;
+ TPoint end = TPoint(aCursorRect.iTl.iX, aCursorRect.iBr.iY);
+
+ for (TInt i=0; i<aCursorRect.Width();i++)
+ {
+ TPoint point = start;
+ for (TInt j=0; j<aCursorRect.Height();j++)
+ {
+ if ((i % 2))
+ {
+ if (j % 2)
+ iWsGraphicsContext->Plot(point);
+ }
+ else
+ {
+ if (!(j % 2))
+ iWsGraphicsContext->Plot(point);
+ }
+ point.iY++;
+ }
+ start.iX++;
+ }
+
WindowRedrawEnd( aWindowTreeNode );
}
@@ -544,6 +590,10 @@
}
#endif
iAlfSendBuffer->CommitL();
+
+ AMT_INC_COUNTER_IF(nodeType==MWsWindowTreeNode::EWinTreeNodeClient, iRsWindowNodeCount );
+ AMT_INC_COUNTER_IF(nodeType==MWsWindowTreeNode::EWinTreeNodeGroup, iRsWindowGroupNodeCount );
+ AMT_INC_COUNTER(iRsWindowGroupNodeCount );
}
// ---------------------------------------------------------------------------
@@ -584,6 +634,9 @@
__ALFLOGSTRING("CAlfRenderStage::NodeReleased - WARNING: Node not found!!");
}
+ AMT_DEC_COUNTER_IF(nodeType==MWsWindowTreeNode::EWinTreeNodeClient, iRsWindowNodeCount );
+ AMT_DEC_COUNTER_IF(nodeType==MWsWindowTreeNode::EWinTreeNodeGroup, iRsWindowGroupNodeCount );
+ AMT_DEC_COUNTER(iRsWindowGroupNodeCount );
}
// ---------------------------------------------------------------------------
@@ -601,6 +654,8 @@
iAlfSendBuffer->CommitL();
__ALFLOGSTRING("CAlfRenderStage::NodeActivated <<");
+
+ AMT_INC_COUNTER_IF(nodeType==MWsWindowTreeNode::EWinTreeNodeClient, iRsWindowNodeActivatedCount );
}
// ---------------------------------------------------------------------------
@@ -637,6 +692,9 @@
);
}
iAlfSendBuffer->CommitL();
+
+ AMT_INC_COUNTER( iRsNodeExtentChangedCount );
+ AMT_SET_VALUE( iRsLatestNodeExtentRect, aRect );
}
// ---------------------------------------------------------------------------
@@ -669,6 +727,8 @@
aNewValue,
&aWindowTreeNode );
iAlfSendBuffer->CommitL();
+
+ AMT_INC_COUNTER( iRsTotalNodeFlagChangedCount );
}
// ---------------------------------------------------------------------------
@@ -731,7 +791,9 @@
}
}
iAlfSendBuffer->CommitL();
- }
+
+ AMT_INC_COUNTER( iRsTotalNodeAttributeChangedCount );
+ }
}
// ---------------------------------------------------------------------------