diff -r 30f62d96b898 -r 8d23fe8ae91b graphicsdeviceinterface/screendriver/sgeneric/scnew.cpp --- a/graphicsdeviceinterface/screendriver/sgeneric/scnew.cpp Thu Apr 08 12:02:10 2010 +0100 +++ b/graphicsdeviceinterface/screendriver/sgeneric/scnew.cpp Thu Apr 08 12:06:20 2010 +0100 @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -27,8 +27,7 @@ #include "scdraw.h" #include "scdraw.inl" #include - - +#include /** Creates an instance of CFbsDrawDevice class. @param aScreenNo Screen number @@ -341,6 +340,11 @@ iSurfaceUpdateSession.NotifyWhenAvailable(aStatus); } +void CScreenDeviceHelper::CancelUpdateNotification() + { + iSurfaceUpdateSession.CancelAllUpdateNotifications(); + } + /** Implementation of corresponding function in CDrawDevice, utilizing a tracked update region. Updates the screen from the surface, if the update region is @@ -348,11 +352,24 @@ */ void CScreenDeviceHelper::Update() { - if (iUpdateRegion.IsEmpty()) - return; + TRequestStatus updateComplete = KRequestPending; + Update(updateComplete); + User::WaitForRequest(updateComplete); + } - iSurfaceUpdateSession.SubmitUpdate(ScreenNumber(), iSurface, 0, &iUpdateRegion); - iUpdateRegion.Clear(); +void CScreenDeviceHelper::Update(TRequestStatus& aStatus) + { + if (!iUpdateRegion.IsEmpty()) + { + iSurfaceUpdateSession.NotifyWhenAvailable(aStatus); + iSurfaceUpdateSession.SubmitUpdate(KAllScreens, iSurface, 0, &iUpdateRegion); + iUpdateRegion.Clear(); + } + else + { + TRequestStatus* pComplete=&aStatus; + User::RequestComplete(pComplete,KErrNone); + } } /**