os/graphics/graphicscomposition/openwfcompositionengine/adaptation/include/owfdisplaycontext.h
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/graphics/graphicscomposition/openwfcompositionengine/adaptation/include/owfdisplaycontext.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,74 @@
1.4 +/* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
1.5 + *
1.6 + * Permission is hereby granted, free of charge, to any person obtaining a
1.7 + * copy of this software and/or associated documentation files (the
1.8 + * "Materials"), to deal in the Materials without restriction, including
1.9 + * without limitation the rights to use, copy, modify, merge, publish,
1.10 + * distribute, sublicense, and/or sell copies of the Materials, and to
1.11 + * permit persons to whom the Materials are furnished to do so, subject to
1.12 + * the following conditions:
1.13 + *
1.14 + * The above copyright notice and this permission notice shall be included
1.15 + * in all copies or substantial portions of the Materials.
1.16 + *
1.17 + * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
1.18 + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1.19 + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
1.20 + * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
1.21 + * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
1.22 + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
1.23 + * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
1.24 + */
1.25 +
1.26 +#ifndef OWFDISPLAYCONTEXT_H
1.27 +#define OWFDISPLAYCONTEXT_H
1.28 +
1.29 +#include <e32base.h>
1.30 +#include <e32cmn.h>
1.31 +
1.32 +#include <dispchannel.h>
1.33 +#include "owfmemory.h"
1.34 +#include "owfscreen.h"
1.35 +#include "owfdisplaycontextgeneral.h"
1.36 +#include <WF\openwfc_ri_display.h>
1.37 +
1.38 +#define _OWF_DISPLAYCONTEXT(x) (static_cast<OWFDisplayContext *>(x))
1.39 +
1.40 +struct TBufferAddress
1.41 + {
1.42 + RChunk iChunk;
1.43 + TInt iOffset;
1.44 + TUint8* iAddress;
1.45 + };
1.46 +
1.47 +/**
1.48 +Container that allocates and destroys the chunks used by the scratch buffers.
1.49 +*/
1.50 +class COwfScratchBuffers : public CBase
1.51 + {
1.52 +public:
1.53 + void* Allocate(TInt aMinSize);
1.54 + void Destroy(void* aAddress);
1.55 + ~COwfScratchBuffers();
1.56 +private:
1.57 + RArray <TBufferAddress> iBuffers;
1.58 + };
1.59 +
1.60 +typedef struct OWFDisplayContext_
1.61 + {
1.62 +public:
1.63 + COpenWFC_RI_Display *iScreenContext;
1.64 + COwfScratchBuffers iBuffers;
1.65 + WFCint iEventServerUpdate;
1.66 + WFCboolean iCompositionOngoing;
1.67 + WFCint iPreviousCommit;
1.68 + WFCint iSerialNumber;
1.69 + OWF_SEMAPHORE iRendezvous;
1.70 + OWFNativeStreamType fastpathStream;
1.71 + WFCboolean fastpathChecked;
1.72 + WFCboolean iInternalStreamAccessed;
1.73 +public:
1.74 + virtual ~OWFDisplayContext_();
1.75 + } OWFDisplayContext;
1.76 +
1.77 +#endif //OWFDISPLAYCONTEXT_H