graphicscomposition/surfaceupdate/src/surfaceupdateclient.cpp
changeset 36 01a6848ebfd7
parent 0 5d03bc08d59c
child 164 25ffed67c7ef
equal deleted inserted replaced
0:5d03bc08d59c 36:01a6848ebfd7
    16 /**
    16 /**
    17  @file
    17  @file
    18 */
    18 */
    19 
    19 
    20 #include <graphics/surfaceupdateclient.h>
    20 #include <graphics/surfaceupdateclient.h>
       
    21 #include <e32debug.h>
    21 #include "surfaceupdate.h"
    22 #include "surfaceupdate.h"
    22 
    23 
    23 inline void SurfaceUpdateAssert(TInt aCond)	{__ASSERT_ALWAYS(aCond, User::Panic(_L("surfaceupdateclient.cpp; assertion failed"), __LINE__));}
    24 inline void SurfaceUpdateAssert(TInt aCond)	{__ASSERT_ALWAYS(aCond, User::Panic(_L("surfaceupdateclient.cpp; assertion failed"), __LINE__));}
    24 
    25 
    25 EXPORT_C RSurfaceUpdateSession::RSurfaceUpdateSession() :
    26 EXPORT_C RSurfaceUpdateSession::RSurfaceUpdateSession() :
    26 	RSessionBase(), 
    27 	RSessionBase(), 
    27 	iStatusAvailable(NULL), iStatusDisplayed(NULL), iStatusDisplayedXTimes(NULL)
    28 	iStatusAvailable(NULL), iStatusDisplayed(NULL), iStatusDisplayedXTimes(NULL), iTimeStamp(NULL), iCount(0)
    28 	{
    29 	{
    29 	}
    30 	}
    30 
    31 
    31 EXPORT_C TInt RSurfaceUpdateSession::Connect(TInt aMessageSlots)
    32 EXPORT_C TInt RSurfaceUpdateSession::Connect(TInt aMessageSlots)
    32 	{
    33 	{
    59 
    60 
    60 EXPORT_C TInt RSurfaceUpdateSession::SubmitUpdate(TInt aScreen, const TSurfaceId& aSurfaceId, 
    61 EXPORT_C TInt RSurfaceUpdateSession::SubmitUpdate(TInt aScreen, const TSurfaceId& aSurfaceId, 
    61 									TInt aBuffer, const TRegion* aDirtyRegion)
    62 									TInt aBuffer, const TRegion* aDirtyRegion)
    62 	{
    63 	{
    63 	SurfaceUpdateAssert(Handle() != KNullHandle);
    64 	SurfaceUpdateAssert(Handle() != KNullHandle);
    64 	
    65 
       
    66 #if defined _DEBUG
       
    67 	if (aScreen != KAllScreens)
       
    68 		RDebug::Printf("You should use KAllScreens as the argument for the screen: (other values OK for test)");
       
    69 #endif
       
    70 
    65 	if(aScreen < 0 || aBuffer < 0 || aSurfaceId.IsNull())
    71 	if(aScreen < 0 || aBuffer < 0 || aSurfaceId.IsNull())
    66 		{
    72 		{
    67 		IssueRequestComplete(KErrArgument);
    73 		IssueRequestComplete(KErrArgument);
    68 		return KErrArgument;
    74 		return KErrArgument;
    69 		}
    75 		}