--- a/uiacceltk/hitchcock/ServerCore/Src/alfwindow.cpp Thu Aug 19 10:48:02 2010 +0300
+++ b/uiacceltk/hitchcock/ServerCore/Src/alfwindow.cpp Tue Aug 31 16:07:35 2010 +0300
@@ -28,10 +28,6 @@
#include <string.h>
#include <s32mem.h>
-#ifdef ALF_MEMORYLOGGING
-#include <hal.h>
-#endif
-
// ---------------------------------------------------------------------------
// NewL
// ---------------------------------------------------------------------------
@@ -63,30 +59,7 @@
delete iData;
}
}
-
-void CAlfWindow::ReportOOM()
- {
-#ifdef ALF_MEMORYLOGGING
- RDebug::Printf("CAlfWindow::ReportOOM");
- TInt totalSpaceAllocated = 0;
- TInt cellAllocatedInHeap = User::AllocSize(totalSpaceAllocated);
- TInt largestFreeBlock = 0;
- TInt totalFreeSpaceInHeap = User::Available(largestFreeBlock);
- TInt freeRAM = 0;
- if ( HAL::Get( HALData::EMemoryRAMFree, freeRAM ) != KErrNone )
- {
- freeRAM = -1;
- }
-
- RDebug::Printf("CAlfWindow::ReportOOM - Allocated space: %d, Amount of allocated cells: %d, Largest free block: %d, Free space in heap: %d",
- totalSpaceAllocated,
- cellAllocatedInHeap,
- largestFreeBlock,
- totalFreeSpaceInHeap);
- RDebug::Printf("CAlfWindow::ReportOOM - Free RAM in system: %d", freeRAM);
-#endif
- }
-
+
// ---------------------------------------------------------------------------
// WsInfo
// ---------------------------------------------------------------------------
@@ -534,28 +507,21 @@
const TInt size = ( 4*aRegion.Count() + 4 ) * sizeof(TInt32);
TAny* data = (TAny*)iData->iWindowManager->Bridge()->AppendVarDataL( size, aOffset );
- if (data)
+ RMemWriteStream str( data, size );
+ str.WriteInt32L( aScreenNumber );
+ str.WriteInt32L( aOrigin.iX );
+ str.WriteInt32L( aOrigin.iY );
+ str.WriteInt32L( aRegion.Count() );
+
+ for (TInt i = 0; i < aRegion.Count(); ++i )
{
- RMemWriteStream str( data, size );
- str.WriteInt32L( aScreenNumber );
- str.WriteInt32L( aOrigin.iX );
- str.WriteInt32L( aOrigin.iY );
- str.WriteInt32L( aRegion.Count() );
-
- for (TInt i = 0; i < aRegion.Count(); ++i )
- {
- const TRect rect(aRegion[i]);
- str.WriteInt32L(rect.iTl.iX);
- str.WriteInt32L(rect.iTl.iY);
- str.WriteInt32L(rect.iBr.iX);
- str.WriteInt32L(rect.iBr.iY);
- }
+ const TRect rect(aRegion[i]);
+ str.WriteInt32L(rect.iTl.iX);
+ str.WriteInt32L(rect.iTl.iY);
+ str.WriteInt32L(rect.iBr.iX);
+ str.WriteInt32L(rect.iBr.iY);
}
- else
- {
- CAlfWindow::ReportOOM();
- }
-
+
return data;
}
@@ -663,56 +629,6 @@
}
// ---------------------------------------------------------------------------
-// SetScreenDeviceValid
-// ---------------------------------------------------------------------------
-//
-void CAlfWindow::SetScreenDeviceValid(TBool aValid)
- {
- if ( WsInfo().iNodeType != MWsWindowTreeNode::EWinTreeNodeClient )
- {
- // We intentionally omit other than client windows. Actually, we
- // we should get this valid information only for top level windows.
- return;
- }
-
- if (!IsInsertedToScene())
- {
- iData->iScreenDeviceValid = aValid;
- return;
- }
-
- TAlfWServInfo wservInfo = WsInfo();
-
- TInt offset;
- TAlfWindowAttributes* windowAttributes = CreateWindowAttributes(offset);
- if ( windowAttributes )
- {
- windowAttributes->iActive = aValid;
- windowAttributes->iScreenNumber = wservInfo.iScreenNumber;
-
- TAlfBridgerData d;
- d.Set(EAlfDSSetScreenDeviceValid,
- wservInfo.iRefId.iWindowGroupId,
- wservInfo.iRefId.iWindowIdentifer,
- (TAny*)offset);
-
- if (iData->iWindowManager->PostIt(d))
- {
- iData->iScreenDeviceValid = aValid;
- }
- }
- }
-
-// ---------------------------------------------------------------------------
-// IsScreenDeviceValid
-// ---------------------------------------------------------------------------
-//
-TBool CAlfWindow::IsScreenDeviceValid() const
- {
- return iData->iScreenDeviceValid;
- }
-
-// ---------------------------------------------------------------------------
// IsIncludedToVisibilityCalculation
// ---------------------------------------------------------------------------
//
@@ -791,7 +707,6 @@
iData->iWindowArea = RRegion();
iData->iTransparencyAlphaChannel = EFalse;
iData->iIncludeToVisibilityCalculation = EFalse;
- iData->iScreenDeviceValid = ETrue;
SetSize(aSizeInPixels);
}
@@ -976,10 +891,6 @@
// ???
}
}
- else
- {
- ReportOOM();
- }
}
@@ -1013,10 +924,6 @@
// ???
}
}
- else
- {
- CAlfWindow::ReportOOM();
- }
}
// ---------------------------------------------------------------------------
@@ -1048,10 +955,6 @@
{
*attributes = empty;
}
- else
- {
- CAlfWindow::ReportOOM();
- }
return attributes;
}
@@ -1068,9 +971,5 @@
{
*windowCommandBuffer = empty;
}
- else
- {
- CAlfWindow::ReportOOM();
- }
return windowCommandBuffer;
}