×
Namespaces

Variants
Actions

Direct Screen Access

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata
Article
Created: ivey (21 Mar 2007)
Last edited: hamishwillee (20 Jul 2012)

Contents

Introduction

Direct screen access is a way of drawing to the screen without using the window server. As this avoids client-server communication, it is much faster, and mostly useful for games and video. Note that some interaction with the window server is needed in order to prevent the application from drawing over other application's data.


class CDirectScreenAccess : public CActive;

Members defined in CDirectScreenAccess are:

DrawingRegion()

Gets the clipping region to draw to.

inline RRegion *DrawingRegion();

Gc()

Gets the graphics context for drawing to the screen. This is set up by calling StartL(). Its origin is set so that you should use window coordinates to specify which part of the screen to draw to and its clipping region is set to the visible part of the window.

inline CFbsBitGc *Gc();

NewL()

Allocates and constructs the object and adds it to the current active scheduler.

static IMPORT_C CDirectScreenAccess *NewL(RWsSession &aWs, CWsScreenDevice 
&aScreenDevice, RWindowBase &aWin, MDirectScreenAccess &aAbort);

ScreenDevice()

Gets the screen device to draw to.

inline CFbsScreenDevice *&ScreenDevice();


StartL()

Informs the window server that you are going to start direct screen access and sets up a graphics context with which you can draw to the screen.

IMPORT_C void StartL();


Note

MDirectScreenAccess is the interface for restarting direct screen access.

virtual void Restart(RDirectScreenAccess::TTerminationReasons aReason)=0;

This function is called by the window server as soon as direct screen access can resume.

This function should call CDirectScreenAccess::StartL() within a trap harness. If this leaves, e.g. through lack of memory, direct screen access cannot be restarted. StartL() re-calculates the clipping region, so that if direct screen access was aborted because another window appeared in front of it, that window will not be overwritten when direct screen access resumes.


Links

--

This page was last modified on 20 July 2012, at 10:13.
63 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×