diff -r bbf46f59e123 -r 25ffed67c7ef graphicscomposition/openwfcompositionengine/adaptation/include/owfdisplaycontext.h --- a/graphicscomposition/openwfcompositionengine/adaptation/include/owfdisplaycontext.h Tue Aug 31 16:31:06 2010 +0300 +++ b/graphicscomposition/openwfcompositionengine/adaptation/include/owfdisplaycontext.h Wed Sep 01 12:39:21 2010 +0100 @@ -1,5 +1,5 @@ -/* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). - * +/* Copyright (c) 2009 The Khronos Group Inc. + * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and/or associated documentation files (the * "Materials"), to deal in the Materials without restriction, including @@ -7,10 +7,10 @@ * distribute, sublicense, and/or sell copies of the Materials, and to * permit persons to whom the Materials are furnished to do so, subject to * the following conditions: - * + * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Materials. - * + * * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. @@ -24,13 +24,11 @@ #define OWFDISPLAYCONTEXT_H #include -#include #include #include "owfmemory.h" #include "owfscreen.h" #include "owfdisplaycontextgeneral.h" -#include #define _OWF_DISPLAYCONTEXT(x) (static_cast(x)) @@ -54,19 +52,51 @@ RArray iBuffers; }; +class COWFScreenDisplayInfo : public CBase + { +public: + ~COWFScreenDisplayInfo(); + static COWFScreenDisplayInfo* NewL(TInt aScreen); + TInt ScreenNumber() const; + void GetScreenInfo(OWF_SCREEN *header) const; + OWFboolean Blit(void* buffer, OWF_ROTATION rotation); + +private: + COWFScreenDisplayInfo(TInt aScreen); + void ConstructL(); +private: + OWF_SCREEN iScreenInfo; + mutable RDisplayChannel iDispChan; + TInt iScreenNumber; + RArray iCompositionBuffer; + RDisplayChannel::TDisplayRotation iDefaultRotation; + TInt iRotationOffset; + }; + +class COwfcDisplayDevice : public CBase + { +private: + static COwfcDisplayDevice* gDisplayDeviceInstancePtr; +public: + static COwfcDisplayDevice* SingletonInstance(); + TInt OpenScreen(TInt aScreen); + TInt CloseScreen(TInt aScreen, OWFboolean *aCanDelete); + ~COwfcDisplayDevice(); +public: + static TBool ScreenCompare(const TInt* k, COWFScreenDisplayInfo* const & t) + {return (*k == t->ScreenNumber());} + RArray iScreenDisplayInfo; + }; + typedef struct OWFDisplayContext_ { public: - COpenWFC_RI_Display *iScreenContext; + COwfcDisplayDevice *iDisplayContext; COwfScratchBuffers iBuffers; WFCint iEventServerUpdate; WFCboolean iCompositionOngoing; WFCint iPreviousCommit; WFCint iSerialNumber; - OWF_SEMAPHORE iRendezvous; - OWFNativeStreamType fastpathStream; - WFCboolean fastpathChecked; - WFCboolean iInternalStreamAccessed; public: virtual ~OWFDisplayContext_(); } OWFDisplayContext;