os/graphics/windowing/windowserver/nga/SERVER/openwfc/Direct.CPP
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/graphics/windowing/windowserver/nga/SERVER/openwfc/Direct.CPP	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,571 @@
     1.4 +// Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +// Direct Screen Access class, to allow the client to draw directly to the screen
    1.18 +// 
    1.19 +//
    1.20 +
    1.21 +#include <e32base.h>
    1.22 +#include "Direct.H"
    1.23 +#include "server.h"
    1.24 +#include "rootwin.h"
    1.25 +#include "wstop.h"
    1.26 +#include "panics.h"
    1.27 +#include <e32msgqueue.h>
    1.28 +
    1.29 +const TInt KMsgQueueLength = 1;
    1.30 +
    1.31 +CDsaMsgQueue* CDsaMsgQueue::NewL(CWsDirectScreenAccess* aDirect)
    1.32 +	{
    1.33 +	CDsaMsgQueue* self = new(ELeave)CDsaMsgQueue;
    1.34 +	CleanupStack::PushL(self);
    1.35 +	self->ConstructL(aDirect);
    1.36 +	CleanupStack::Pop(self);
    1.37 +	return self;
    1.38 +	}
    1.39 +
    1.40 +CDsaMsgQueue::CDsaMsgQueue()
    1.41 +{}
    1.42 +
    1.43 +CDsaMsgQueue::~CDsaMsgQueue()
    1.44 +	{
    1.45 +	delete iAborted;
    1.46 +	iSendQueue.Close();
    1.47 +	iRecQueue.Close();
    1.48 +	}
    1.49 +
    1.50 +void CDsaMsgQueue::ConstructL(CWsDirectScreenAccess* aDirect)
    1.51 +	{
    1.52 +	iAborted=new(ELeave) CWsAbortDirect(aDirect,this);	
    1.53 +	}
    1.54 +
    1.55 +void CDsaMsgQueue::Cancel()
    1.56 +	{
    1.57 +	//purge the queue of data
    1.58 +	TInt ret = KErrNone;
    1.59 +	do
    1.60 +		{
    1.61 +		TInt data = 0;
    1.62 +		ret = iRecQueue.Receive(&data,sizeof(TInt));
    1.63 +		}while(ret == KErrNone);
    1.64 +	iAborted->Cancel();
    1.65 +	}
    1.66 +
    1.67 +TInt CDsaMsgQueue::Send(TInt aData)
    1.68 +	{
    1.69 +	return iSendQueue.Send(&aData,sizeof(TInt));
    1.70 +	}
    1.71 +
    1.72 +TInt CDsaMsgQueue::CreateSendQueue()
    1.73 +	{
    1.74 +	if(iSendQueue.Handle() == 0)
    1.75 +		{
    1.76 +		return iSendQueue.CreateGlobal(KNullDesC,KMsgQueueLength,sizeof(TInt), EOwnerProcess);
    1.77 +		}
    1.78 +	else
    1.79 +		{
    1.80 +		return 0;
    1.81 +		}
    1.82 +	}
    1.83 +
    1.84 +TInt CDsaMsgQueue::CreateRecQueue()
    1.85 +	{
    1.86 +	if(iRecQueue.Handle() == 0)
    1.87 +		{
    1.88 +		return iRecQueue.CreateGlobal(KNullDesC,KMsgQueueLength,sizeof(TInt), EOwnerProcess);
    1.89 +		}
    1.90 +	else
    1.91 +		{
    1.92 +		return 0;
    1.93 +		}
    1.94 +	}
    1.95 +
    1.96 +RMsgQueueBase* CDsaMsgQueue::SendQueue()
    1.97 +	{
    1.98 +	return &iSendQueue;
    1.99 +	}
   1.100 +
   1.101 +RMsgQueueBase* CDsaMsgQueue::RecQueue()
   1.102 +	{
   1.103 +	return &iRecQueue;
   1.104 +	}
   1.105 +
   1.106 +void CDsaMsgQueue::Started()
   1.107 +	{
   1.108 +	iAborted->Started();
   1.109 +	}
   1.110 +	
   1.111 +void CDsaMsgQueue::Complete()
   1.112 +	{
   1.113 +	iAborted->Complete(RDirectScreenAccess::ETerminateCancel);	
   1.114 +	}
   1.115 +
   1.116 +void CDsaMsgQueue::CompleteAbort()
   1.117 +	{
   1.118 +	iAborted->Complete(KErrNone);	
   1.119 +	}
   1.120 +
   1.121 +TInt CDsaMsgQueue::ReceiveData()
   1.122 +	{
   1.123 +	TInt data = 0;
   1.124 +	iRecQueue.Receive(&data,sizeof(TInt));
   1.125 +	return data;
   1.126 +	}
   1.127 +
   1.128 +/*CWsAbortDirect*/
   1.129 +
   1.130 +CWsAbortDirect::CWsAbortDirect(CWsDirectScreenAccess* aDirect,CDsaMsgQueue* aParent) : CActive(EDirectAbort), iDirect(aDirect),iParent(aParent)
   1.131 +	{
   1.132 +	CActiveScheduler::Add(this);
   1.133 +	}
   1.134 +
   1.135 +CWsAbortDirect::~CWsAbortDirect()
   1.136 +	{
   1.137 +	Cancel();
   1.138 +	}
   1.139 +
   1.140 +void CWsAbortDirect::Started()
   1.141 +	{
   1.142 +	iStatus=KRequestPending;
   1.143 +	TRequestStatus& status = iStatus;	
   1.144 +	iParent->RecQueue()->NotifyDataAvailable(status);
   1.145 +	SetActive();
   1.146 +	}
   1.147 +
   1.148 +void CWsAbortDirect::RunL()
   1.149 +	{
   1.150 +	iParent->ReceiveData();
   1.151 +	iParent->RecQueue()->CancelDataAvailable();
   1.152 +	iDirect->Aborted();
   1.153 +	}
   1.154 +
   1.155 +void CWsAbortDirect::DoCancel()
   1.156 +	{
   1.157 +	iParent->RecQueue()->CancelDataAvailable();
   1.158 +	if (iStatus==KRequestPending)
   1.159 +		{
   1.160 +		Complete(KErrNone);
   1.161 +		}
   1.162 +	}
   1.163 +
   1.164 +void CWsAbortDirect::Complete(TInt aReason)
   1.165 +	{
   1.166 +	if(IsActive())
   1.167 +		{
   1.168 +		TRequestStatus* status=&iStatus;
   1.169 +		iParent->RecQueue()->CancelDataAvailable();
   1.170 +		RThread().RequestComplete(status,aReason);
   1.171 +		}
   1.172 +	}
   1.173 +
   1.174 +
   1.175 +/*CWsDirectScreenAccess*/
   1.176 +
   1.177 +CWsDirectScreenAccess* CWsDirectScreenAccess::NewL(CWsClient* aOwner,TBool aRegionTrackingOnly)
   1.178 +	{
   1.179 +	CWsDirectScreenAccess* self = new(ELeave) CWsDirectScreenAccess(aOwner);
   1.180 +	CleanupStack::PushL(self);
   1.181 +	self->ConstructL(aRegionTrackingOnly);
   1.182 +	CleanupStack::Pop(self);
   1.183 +	return self;
   1.184 +	}
   1.185 +
   1.186 +CWsDirectScreenAccess::~CWsDirectScreenAccess()
   1.187 +	{
   1.188 +	iVisible.Close();
   1.189 +	if (iStatus!=EDirectStatusTimeNotCreated)
   1.190 +		{
   1.191 +		if (iStatus==EDirectStatusRunning)
   1.192 +			AbortNow();
   1.193 +		if (iStatus>=EDirectStatusAborted)
   1.194 +			CorrectScreen();
   1.195 +		}
   1.196 +	WS_ASSERT_DEBUG(!OnQueue(), EWsPanicDirectScreenAccess);
   1.197 +	if(!iRegionTrackingOnly)
   1.198 +		{
   1.199 +		CScreen* screen = Screen();
   1.200 +		__ASSERT_DEBUG(screen,Panic(EWsPanicNoScreen));
   1.201 +		screen->ReleaseDsaScreenDevice();
   1.202 +		}
   1.203 +	delete iMsgQueue;
   1.204 +	}
   1.205 +
   1.206 +void CWsDirectScreenAccess::ConstructL(TBool aRegionTrackingOnly)
   1.207 +	{
   1.208 +	NewObjL();
   1.209 +	iMsgQueue = CDsaMsgQueue::NewL(this);
   1.210 +	iStatus=EDirectStatusNone;
   1.211 +	iRegionTrackingOnly = aRegionTrackingOnly;
   1.212 +	if(!iRegionTrackingOnly)
   1.213 +		{
   1.214 +		//The Direct Screen Access object is going to be used to draw to the screen so we need to:
   1.215 +		//1)allocate the buffer
   1.216 +		//2)initialize the DSA device and surface
   1.217 +		CScreen* screen = Screen();
   1.218 +		__ASSERT_DEBUG(screen,Panic(EWsPanicNoScreen));
   1.219 +		screen->AcquireDsaScreenDeviceL();	
   1.220 +		}
   1.221 +	}
   1.222 +
   1.223 +void CWsDirectScreenAccess::Request(TInt handle)
   1.224 +	{
   1.225 +	if (iStatus!=EDirectStatusNone)
   1.226 +		{
   1.227 +		if (iStatus==EDirectStatusCompleted)
   1.228 +			{
   1.229 +			iMsgQueue->Cancel();
   1.230 +			}
   1.231 +		else
   1.232 +			{
   1.233 +			iWsOwner->PPanic(EWservPanicDirectMisuse);
   1.234 +			}
   1.235 +		}
   1.236 +	iWsOwner->HandleToClientWindow(handle,&iWin);
   1.237 +	STACK_REGION region;
   1.238 +	iWin->GenerateTopRegion(region);
   1.239 +	
   1.240 +	//clip the draw region with DSA buffer
   1.241 +	TRect dsaBuffer(TPoint(0,0), iScreen->DSASizeInPixels());
   1.242 +	MWsDisplayMapping *dispMap = iScreen->DisplayMapping();
   1.243 +	TRect dsaBufferInAppSpace;
   1.244 +	if(dispMap)
   1.245 +		{
   1.246 +		dispMap->MapCoordinates(EDirectScreenAccessSpace,dsaBuffer,EApplicationSpace,dsaBufferInAppSpace);
   1.247 +		}
   1.248 +	else
   1.249 +		{
   1.250 +		dsaBufferInAppSpace = dsaBuffer;
   1.251 +		}
   1.252 +	region.ClipRect(dsaBufferInAppSpace);
   1.253 +	const TInt regionCount=region.Count();
   1.254 +	region.Close();
   1.255 +	SetReply(regionCount);
   1.256 +	iStatus=EDirectStatusInitialising;
   1.257 +	}
   1.258 +
   1.259 +void CWsDirectScreenAccess::GetRegion(TInt aNumRects)
   1.260 +	{
   1.261 +#if defined(_DEBUG)
   1.262 +	if (iStatus!=EDirectStatusInitialising)
   1.263 +		iWsOwner->PPanic(EWservPanicDirectMisuse);
   1.264 +#endif
   1.265 +	STACK_REGION winVisibleRegion, region;
   1.266 +	iWin->GenerateTopRegion(winVisibleRegion);
   1.267 +	//clip the draw region with DSA buffer
   1.268 +	TRect dsaBuffer(TPoint(0,0), iScreen->DSASizeInPixels());
   1.269 +	MWsDisplayMapping *dispMap = iScreen->DisplayMapping();
   1.270 +	TRect dsaBufferInAppSpace;
   1.271 +	if(dispMap)
   1.272 +		{
   1.273 +		dispMap->MapCoordinates(EDirectScreenAccessSpace,dsaBuffer,EApplicationSpace,dsaBufferInAppSpace);
   1.274 +		}
   1.275 +	else
   1.276 +		{
   1.277 +		dsaBufferInAppSpace = dsaBuffer;
   1.278 +		}
   1.279 +	region.Copy(winVisibleRegion);
   1.280 +	region.ClipRect(dsaBufferInAppSpace);
   1.281 +	
   1.282 +	const TInt regionCount=region.Count();
   1.283 +	if (region.Count()==aNumRects)
   1.284 +		{
   1.285 +		iVisible.Copy(winVisibleRegion);
   1.286 +		if (iVisible.CheckError())
   1.287 +			{
   1.288 +			iStatus=EDirectStatusNone;
   1.289 +			SetReply(KErrNotReady);
   1.290 +			}
   1.291 +		else
   1.292 +			{
   1.293 +			TInt error = Initiate();
   1.294 +			
   1.295 +			if (!error)
   1.296 +				{
   1.297 +				TPtrC8 rectList(REINTERPRET_CAST(const TUint8*,region.RectangleList()),region.Count()*sizeof(TRect));
   1.298 +				CWsClient::ReplyBuf(rectList);
   1.299 +				iStatus=EDirectStatusRunning;
   1.300 +				iMsgQueue->Started();
   1.301 +				SetReply(KMaxTInt);
   1.302 +				}
   1.303 +			else
   1.304 +				{
   1.305 +				iStatus=EDirectStatusNone;
   1.306 +				SetReply(error);
   1.307 +				}
   1.308 +			}
   1.309 +		}
   1.310 +	else
   1.311 +		{
   1.312 +		SetReply(region.Count());
   1.313 +		}
   1.314 +	region.Close();
   1.315 +	winVisibleRegion.Close();
   1.316 +	}
   1.317 +
   1.318 +void CWsDirectScreenAccess::Cancel()
   1.319 +	{
   1.320 +	TInt ret = 0;
   1.321 +	switch (iStatus)
   1.322 +		{
   1.323 +#if defined(_DEBUG)
   1.324 +	case EDirectStatusInitialising:
   1.325 +		iWsOwner->PPanic(EWservPanicDirectMisuse);
   1.326 +#endif
   1.327 +	case EDirectStatusNone:
   1.328 +		break;
   1.329 +	case EDirectStatusRunning:
   1.330 +		Terminate1();
   1.331 +		Terminate2(); 
   1.332 +		/*Fall through*/
   1.333 +	case EDirectStatusCanceling:
   1.334 +		ret = 1;
   1.335 +		iMsgQueue->Send(RDirectScreenAccess::ETerminateCancel);	
   1.336 +		break;
   1.337 +	case EDirectStatusAbortedWindow:
   1.338 +	case EDirectStatusAbortedGlobal:
   1.339 +		CorrectScreen();
   1.340 +		break;
   1.341 +	case EDirectStatusCompleted:
   1.342 +		break;
   1.343 +	default:
   1.344 +			{
   1.345 +			}
   1.346 +		}
   1.347 +	SetReply(ret);
   1.348 +	iStatus=EDirectStatusNone;
   1.349 +	}
   1.350 +
   1.351 +void CWsDirectScreenAccess::Aborted()
   1.352 +	{
   1.353 +	switch (iStatus)
   1.354 +		{
   1.355 +	case EDirectStatusRunning:
   1.356 +		Terminate1();
   1.357 +		Terminate2();
   1.358 +		iStatus=EDirectStatusCanceling;
   1.359 +		break;
   1.360 +	case EDirectStatusAbortedWindow:
   1.361 +	case EDirectStatusAbortedGlobal:
   1.362 +		CorrectScreen(); 
   1.363 +		/*Fall Through*/ 
   1.364 +	case EDirectStatusCompleted:
   1.365 +		iStatus=EDirectStatusNone;
   1.366 +		break;
   1.367 +	default:
   1.368 +		iWsOwner->PPanic(EWservPanicDirectMisuse);
   1.369 +		}
   1.370 +	}
   1.371 +
   1.372 +void CWsDirectScreenAccess::AbortNow()
   1.373 +	{
   1.374 +	if (iStatus!=EDirectStatusRunning)
   1.375 +		{
   1.376 +		iWsOwner->PPanic(EWservPanicDirectMisuse);
   1.377 +		}
   1.378 +	SignalAbort(RDirectScreenAccess::ETerminateRegion);
   1.379 +	TRequestStatus timerStatus;
   1.380 +	RTimer& timer=CWsTop::Timer();
   1.381 +	timer.After(timerStatus,400000);		//0.4secs
   1.382 +	User::WaitForRequest(iMsgQueue->Status(),timerStatus);
   1.383 +	if (timerStatus!=KRequestPending)
   1.384 +		{
   1.385 +		Abort();
   1.386 +		}
   1.387 +	else
   1.388 +		{
   1.389 +		CancelAbortObject();
   1.390 +		timer.Cancel();
   1.391 +		User::WaitForRequest(timerStatus);
   1.392 +		}
   1.393 +	}
   1.394 +
   1.395 +void CWsDirectScreenAccess::SignalAbort(RDirectScreenAccess::TTerminationReasons aReason)
   1.396 +	{
   1.397 +	iAbortReason=aReason;
   1.398 +	if (iStatus==EDirectStatusAbortedWindow)
   1.399 +		{
   1.400 +		WS_ASSERT_DEBUG(iAbortReason>RDirectScreenAccess::ETerminateRegion, EWsPanicDirectScreenAccess);
   1.401 +		Terminate2();
   1.402 +		return;
   1.403 +		}
   1.404 +	if (iStatus!=EDirectStatusRunning)
   1.405 +		{
   1.406 +		iWsOwner->PPanic(EWservPanicDirectMisuse);
   1.407 +		}
   1.408 +	iMsgQueue->Send(aReason);
   1.409 +	}
   1.410 +
   1.411 +void CWsDirectScreenAccess::CancelAbortObject()
   1.412 +	{
   1.413 +	iMsgQueue->Complete();
   1.414 +	iMsgQueue->Cancel();
   1.415 +	iStatus=EDirectStatusNone;
   1.416 +	Terminate1();
   1.417 +	Terminate2();
   1.418 +	}
   1.419 +
   1.420 +void CWsDirectScreenAccess::Abort()
   1.421 +	{
   1.422 +	if ( iStatus == EDirectStatusRunning ) 	
   1.423 +		{
   1.424 +		Terminate1();
   1.425 +		if (iMsgQueue->Status()==KRequestPending)
   1.426 +			iStatus=(iAbortReason<=RDirectScreenAccess::ETerminateRegion ? EDirectStatusAbortedWindow:EDirectStatusAbortedGlobal);
   1.427 +		else
   1.428 +			iStatus=EDirectStatusCompleted;
   1.429 +		if (iStatus!=EDirectStatusAbortedWindow)
   1.430 +			Terminate2();
   1.431 +		}
   1.432 +	}
   1.433 +
   1.434 +TInt CWsDirectScreenAccess::GetSendQueue()
   1.435 +	{
   1.436 +	TInt ret = iMsgQueue->CreateSendQueue();
   1.437 +	if(ret == KErrNone)
   1.438 +		{
   1.439 +		iWsOwner->SetResponseHandle(iMsgQueue->SendQueue());	
   1.440 +		}
   1.441 +	return ret;
   1.442 +	}
   1.443 +
   1.444 +TInt CWsDirectScreenAccess::GetRecQueue()
   1.445 +	{
   1.446 +	TInt ret = iMsgQueue->CreateRecQueue();
   1.447 +	if(ret == KErrNone)
   1.448 +		{
   1.449 +		iWsOwner->SetResponseHandle(iMsgQueue->RecQueue());	
   1.450 +		}
   1.451 +	return ret;
   1.452 +	}
   1.453 +
   1.454 +void CWsDirectScreenAccess::CommandL(TInt aOpcode,const TAny* aCmdData)
   1.455 +	{
   1.456 +	TWsDirectCmdUnion pData;
   1.457 +	pData.any=aCmdData;
   1.458 +	switch(aOpcode)
   1.459 +		{
   1.460 +		case EWsDirectOpFree:
   1.461 +			delete this;
   1.462 +			break;
   1.463 +		case EWsDirectOpRequest:
   1.464 +			Request(*pData.Int);
   1.465 +			break;
   1.466 +		case EWsDirectOpInitFailed:
   1.467 +	#if defined(_DEBUG)
   1.468 +			if (iStatus!=EDirectStatusInitialising)
   1.469 +				{
   1.470 +				iWsOwner->PPanic(EWservPanicDirectMisuse);
   1.471 +				}
   1.472 +	#endif
   1.473 +			iStatus=EDirectStatusNone;
   1.474 +			break;
   1.475 +		case EWsDirectOpGetRegion:
   1.476 +			GetRegion(*pData.Int);
   1.477 +			break;
   1.478 +		case EWsDirectOpCancel:
   1.479 +			Cancel();
   1.480 +			break;
   1.481 +		case EWsDirectOpGetSendQueue:
   1.482 +			GetSendQueue();
   1.483 +			break;
   1.484 +		case EWsDirectOpGetRecQueue:
   1.485 +			GetRecQueue();
   1.486 +			break;
   1.487 +		default:
   1.488 +			OwnerPanic(EWservPanicOpcode);
   1.489 +			break;
   1.490 +		}
   1.491 +	}
   1.492 +
   1.493 +TInt CWsDirectScreenAccess::Initiate()
   1.494 +	{
   1.495 +	const TInt err = iWin->AddDSA(*this);
   1.496 +	if(err)
   1.497 +		return err;
   1.498 +
   1.499 +	iScreen->AddDirect(*this);
   1.500 +	return KErrNone;
   1.501 +	}
   1.502 +
   1.503 +static TBool RegionsMatch(const TRegion & aOne, const TRegion & aTwo)
   1.504 +	{
   1.505 +	// Check if the regions have equal areas.
   1.506 +	const TRect* rect1 = aOne.RectangleList();
   1.507 +	TUint area1 = 0;
   1.508 +	for(TInt i = 0; i < aOne.Count(); ++i)
   1.509 +		{
   1.510 +		area1 += (rect1->Width() * rect1->Height());
   1.511 +		rect1++;
   1.512 +		}
   1.513 +
   1.514 +	const TRect* rect2 = aTwo.RectangleList();
   1.515 +	TUint area2 = 0;
   1.516 +	for(TInt i = 0; i < aTwo.Count(); ++i)
   1.517 +		{
   1.518 +		area2 += (rect2->Width() * rect2->Height());
   1.519 +		rect2++;
   1.520 +		}
   1.521 +	
   1.522 +	if(area1 != area2)
   1.523 +		{
   1.524 +		return EFalse;
   1.525 +		}
   1.526 +
   1.527 +	// Check if one region is completely contained within the other.
   1.528 +	STACK_REGION tempRegion;
   1.529 +	tempRegion.Copy(aOne);	
   1.530 +	tempRegion.SubRegion(aTwo);
   1.531 +
   1.532 +	const TBool ret(tempRegion.IsEmpty());
   1.533 +	tempRegion.Close();
   1.534 +
   1.535 +	return ret;
   1.536 +	}
   1.537 +
   1.538 +TBool CWsDirectScreenAccess::IsAbortRequired(const TRegion& aTopVisibleRegion) const
   1.539 +	{
   1.540 +	return ( iStatus == EDirectStatusRunning ) && !RegionsMatch(aTopVisibleRegion, iVisible);
   1.541 +	}
   1.542 +
   1.543 +void CWsDirectScreenAccess::Terminate1()
   1.544 +	{
   1.545 +	WS_ASSERT_DEBUG(!iWin->DSAs().IsEmpty(), EWsPanicDirectScreenAccess);
   1.546 +	iWin->RemoveDSA(*this);
   1.547 +	}
   1.548 +
   1.549 +void CWsDirectScreenAccess::Terminate2()
   1.550 +	{
   1.551 +	iScreen->RemoveDirect(*this);
   1.552 +	WS_ASSERT_DEBUG(!OnQueue(), EWsPanicDirectScreenAccess);
   1.553 +	}
   1.554 +
   1.555 +void CWsDirectScreenAccess::CorrectScreen()
   1.556 +	{
   1.557 +	if (iAbortReason<=RDirectScreenAccess::ETerminateRegion)
   1.558 +		{
   1.559 +		Terminate2();
   1.560 +		RootWindow()->Invalidate(&iVisible);
   1.561 +		}
   1.562 +	else
   1.563 +		RootWindow()->InvalidateWholeScreen();
   1.564 +
   1.565 +	WS_ASSERT_DEBUG(!OnQueue(), EWsPanicDirectScreenAccess);
   1.566 +	iScreen->UpdateDsa();
   1.567 +	}
   1.568 +
   1.569 +#if defined(_DEBUG)
   1.570 +TBool CWsDirectScreenAccess::OnQueue()
   1.571 +	{
   1.572 +	return iScreen->IsDirectOnQueue(this);
   1.573 +	}
   1.574 +#endif