69 iScreen = NULL; |
69 iScreen = NULL; |
70 delete iAlfSendBuffer; |
70 delete iAlfSendBuffer; |
71 delete iWsGraphicsContext; |
71 delete iWsGraphicsContext; |
72 delete iGoomSession; |
72 delete iGoomSession; |
73 |
73 |
74 // Used just as a temporary holding place, do not delete! |
74 #ifdef USE_MODULE_TEST_HOOKS_FOR_ALF |
|
75 if (Dll::Tls()!=NULL) |
|
76 { |
|
77 delete AMT_CONTROL(); |
|
78 Dll::FreeTls(); |
|
79 } |
|
80 #endif |
|
81 |
|
82 // Used just as a temporary holding place, do not delete! |
75 iWindowDrawingNode = NULL; |
83 iWindowDrawingNode = NULL; |
76 } |
84 } |
77 |
85 |
78 // --------------------------------------------------------------------------- |
86 // --------------------------------------------------------------------------- |
79 // ConstructL |
87 // ConstructL |
107 if (compcntrl) |
115 if (compcntrl) |
108 { |
116 { |
109 compcntrl->AlfBridgeCallback(MAlfBridge::ESetWindowTreeObserver,(MAlfCompositionAgnosticWindowTreeObserver*)this); |
117 compcntrl->AlfBridgeCallback(MAlfBridge::ESetWindowTreeObserver,(MAlfCompositionAgnosticWindowTreeObserver*)this); |
110 } |
118 } |
111 |
119 |
|
120 #ifdef USE_MODULE_TEST_HOOKS_FOR_ALF |
|
121 // Setup TLS and open global module testing chunk and mutex |
|
122 if (Dll::Tls()==NULL) // create only for the first render stage! |
|
123 { |
|
124 User::LeaveIfError(Dll::SetTls(new(ELeave) CAlfModuleTestDataControl())); |
|
125 User::LeaveIfError(AMT_CONTROL()->OpenGlobalObjects()); |
|
126 } |
|
127 #endif |
|
128 |
112 __ALFLOGSTRING("CAlfRenderStage: ready to rock"); |
129 __ALFLOGSTRING("CAlfRenderStage: ready to rock"); |
113 } |
130 } |
114 |
131 |
115 // --------------------------------------------------------------------------- |
132 // --------------------------------------------------------------------------- |
116 // InitL |
133 // InitL |
346 |
363 |
347 TRegionFix<1> drawRegion; |
364 TRegionFix<1> drawRegion; |
348 drawRegion.AddRect( aExtent ); |
365 drawRegion.AddRect( aExtent ); |
349 TRegionFix<1> clipRegion; |
366 TRegionFix<1> clipRegion; |
350 clipRegion.AddRect( aClipRect ); |
367 clipRegion.AddRect( aClipRect ); |
351 |
368 |
|
369 TRgb penColor = TRgb(0x555555); |
|
370 TRgb brushColor = TRgb(0x555555); |
|
371 TRgb dotColor = TRgb(0xBBBBBB); |
|
372 |
352 WindowRedrawStart( aWindowTreeNode, drawRegion ); |
373 WindowRedrawStart( aWindowTreeNode, drawRegion ); |
353 iWsGraphicsContext->Reset(); |
374 iWsGraphicsContext->Reset(); |
354 iWsGraphicsContext->SetDrawMode( MWsGraphicsContext::EDrawModePEN ); |
375 iWsGraphicsContext->SetDrawMode( MWsGraphicsContext::EDrawModePEN ); |
355 iWsGraphicsContext->SetBrushStyle( MWsGraphicsContext::ESolidBrush ); |
376 iWsGraphicsContext->SetBrushStyle( MWsGraphicsContext::ESolidBrush ); |
356 iWsGraphicsContext->SetPenStyle( MWsGraphicsContext::ESolidPen ); |
377 iWsGraphicsContext->SetPenStyle( MWsGraphicsContext::ESolidPen ); |
357 iWsGraphicsContext->SetBrushColor( KRgbBlack ); // color from interface is white, so temporirily putting black |
378 iWsGraphicsContext->SetBrushColor( brushColor ); |
358 //const TRect clipRect = cursor->ClipRect(); |
379 iWsGraphicsContext->SetPenColor( penColor ); |
359 //const TRect cursorRect = cursor->Rect(); |
380 iWsGraphicsContext->SetClippingRegion( clipRegion ); |
360 iWsGraphicsContext->SetClippingRegion( clipRegion ); |
|
361 iWsGraphicsContext->DrawRect( aCursorRect ); |
381 iWsGraphicsContext->DrawRect( aCursorRect ); |
|
382 |
|
383 // Draw pattern to cursor so that it is visible in any color backgrounds. |
|
384 iWsGraphicsContext->SetPenColor( dotColor ); |
|
385 TPoint start = aCursorRect.iTl; |
|
386 TPoint end = TPoint(aCursorRect.iTl.iX, aCursorRect.iBr.iY); |
|
387 |
|
388 for (TInt i=0; i<aCursorRect.Width();i++) |
|
389 { |
|
390 TPoint point = start; |
|
391 for (TInt j=0; j<aCursorRect.Height();j++) |
|
392 { |
|
393 if ((i % 2)) |
|
394 { |
|
395 if (j % 2) |
|
396 iWsGraphicsContext->Plot(point); |
|
397 } |
|
398 else |
|
399 { |
|
400 if (!(j % 2)) |
|
401 iWsGraphicsContext->Plot(point); |
|
402 } |
|
403 point.iY++; |
|
404 } |
|
405 start.iX++; |
|
406 } |
|
407 |
362 WindowRedrawEnd( aWindowTreeNode ); |
408 WindowRedrawEnd( aWindowTreeNode ); |
363 } |
409 } |
364 |
410 |
365 // --------------------------------------------------------------------------- |
411 // --------------------------------------------------------------------------- |
366 // NodeCreated |
412 // NodeCreated |
542 { |
588 { |
543 iAlfSendBuffer->WriteIntsL( EAlfDebugTrackNode, 2, (TInt32)&aWindowTreeNode, 1 ); |
589 iAlfSendBuffer->WriteIntsL( EAlfDebugTrackNode, 2, (TInt32)&aWindowTreeNode, 1 ); |
544 } |
590 } |
545 #endif |
591 #endif |
546 iAlfSendBuffer->CommitL(); |
592 iAlfSendBuffer->CommitL(); |
|
593 |
|
594 AMT_INC_COUNTER_IF(nodeType==MWsWindowTreeNode::EWinTreeNodeClient, iRsWindowNodeCount ); |
|
595 AMT_INC_COUNTER_IF(nodeType==MWsWindowTreeNode::EWinTreeNodeGroup, iRsWindowGroupNodeCount ); |
|
596 AMT_INC_COUNTER(iRsWindowGroupNodeCount ); |
547 } |
597 } |
548 |
598 |
549 // --------------------------------------------------------------------------- |
599 // --------------------------------------------------------------------------- |
550 // NodeReleased |
600 // NodeReleased |
551 // --------------------------------------------------------------------------- |
601 // --------------------------------------------------------------------------- |
582 else |
632 else |
583 { |
633 { |
584 __ALFLOGSTRING("CAlfRenderStage::NodeReleased - WARNING: Node not found!!"); |
634 __ALFLOGSTRING("CAlfRenderStage::NodeReleased - WARNING: Node not found!!"); |
585 } |
635 } |
586 |
636 |
|
637 AMT_DEC_COUNTER_IF(nodeType==MWsWindowTreeNode::EWinTreeNodeClient, iRsWindowNodeCount ); |
|
638 AMT_DEC_COUNTER_IF(nodeType==MWsWindowTreeNode::EWinTreeNodeGroup, iRsWindowGroupNodeCount ); |
|
639 AMT_DEC_COUNTER(iRsWindowGroupNodeCount ); |
587 } |
640 } |
588 |
641 |
589 // --------------------------------------------------------------------------- |
642 // --------------------------------------------------------------------------- |
590 // NodeActivated |
643 // NodeActivated |
591 // --------------------------------------------------------------------------- |
644 // --------------------------------------------------------------------------- |
599 nodeType, |
652 nodeType, |
600 &aWindowTreeNode ); |
653 &aWindowTreeNode ); |
601 |
654 |
602 iAlfSendBuffer->CommitL(); |
655 iAlfSendBuffer->CommitL(); |
603 __ALFLOGSTRING("CAlfRenderStage::NodeActivated <<"); |
656 __ALFLOGSTRING("CAlfRenderStage::NodeActivated <<"); |
|
657 |
|
658 AMT_INC_COUNTER_IF(nodeType==MWsWindowTreeNode::EWinTreeNodeClient, iRsWindowNodeActivatedCount ); |
604 } |
659 } |
605 |
660 |
606 // --------------------------------------------------------------------------- |
661 // --------------------------------------------------------------------------- |
607 // NodeExtentChanged |
662 // NodeExtentChanged |
608 // --------------------------------------------------------------------------- |
663 // --------------------------------------------------------------------------- |
635 aRect.iBr.iY, |
690 aRect.iBr.iY, |
636 &aWindowTreeNode |
691 &aWindowTreeNode |
637 ); |
692 ); |
638 } |
693 } |
639 iAlfSendBuffer->CommitL(); |
694 iAlfSendBuffer->CommitL(); |
|
695 |
|
696 AMT_INC_COUNTER( iRsNodeExtentChangedCount ); |
|
697 AMT_SET_VALUE( iRsLatestNodeExtentRect, aRect ); |
640 } |
698 } |
641 |
699 |
642 // --------------------------------------------------------------------------- |
700 // --------------------------------------------------------------------------- |
643 // SiblingOrderChanged |
701 // SiblingOrderChanged |
644 // --------------------------------------------------------------------------- |
702 // --------------------------------------------------------------------------- |
729 aWindowTreeNode.StandardTextCursor()->Color().Internal() ); |
789 aWindowTreeNode.StandardTextCursor()->Color().Internal() ); |
730 break; |
790 break; |
731 } |
791 } |
732 } |
792 } |
733 iAlfSendBuffer->CommitL(); |
793 iAlfSendBuffer->CommitL(); |
734 } |
794 |
|
795 AMT_INC_COUNTER( iRsTotalNodeAttributeChangedCount ); |
|
796 } |
735 } |
797 } |
736 |
798 |
737 // --------------------------------------------------------------------------- |
799 // --------------------------------------------------------------------------- |
738 // FadeCountChanged |
800 // FadeCountChanged |
739 // --------------------------------------------------------------------------- |
801 // --------------------------------------------------------------------------- |