os/graphics/graphicscomposition/openwfcompositionengine/adaptation/include/owfdisplaycontext.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 /* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
     2  * 
     3  * Permission is hereby granted, free of charge, to any person obtaining a
     4  * copy of this software and/or associated documentation files (the
     5  * "Materials"), to deal in the Materials without restriction, including
     6  * without limitation the rights to use, copy, modify, merge, publish,
     7  * distribute, sublicense, and/or sell copies of the Materials, and to
     8  * permit persons to whom the Materials are furnished to do so, subject to
     9  * the following conditions:
    10  * 
    11  * The above copyright notice and this permission notice shall be included
    12  * in all copies or substantial portions of the Materials.
    13  * 
    14  * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
    15  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
    16  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
    17  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
    18  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
    19  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
    20  * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
    21  */
    22 
    23 #ifndef OWFDISPLAYCONTEXT_H
    24 #define OWFDISPLAYCONTEXT_H
    25 
    26 #include <e32base.h>
    27 #include <e32cmn.h>
    28 
    29 #include <dispchannel.h>
    30 #include "owfmemory.h"
    31 #include "owfscreen.h"
    32 #include "owfdisplaycontextgeneral.h"
    33 #include <WF\openwfc_ri_display.h>
    34 
    35 #define _OWF_DISPLAYCONTEXT(x)          (static_cast<OWFDisplayContext *>(x))
    36 
    37 struct TBufferAddress
    38     {
    39     RChunk  iChunk;
    40     TInt    iOffset;
    41     TUint8* iAddress;
    42     };
    43 
    44 /**
    45 Container that allocates and destroys the chunks used by the scratch buffers.
    46 */
    47 class COwfScratchBuffers : public CBase
    48     {
    49 public:
    50     void* Allocate(TInt aMinSize);
    51     void Destroy(void* aAddress);
    52     ~COwfScratchBuffers();
    53 private:
    54     RArray <TBufferAddress> iBuffers;
    55     };
    56 
    57 typedef struct OWFDisplayContext_
    58     {
    59 public:
    60     COpenWFC_RI_Display *iScreenContext;
    61     COwfScratchBuffers iBuffers;
    62     WFCint iEventServerUpdate;
    63     WFCboolean iCompositionOngoing;
    64     WFCint iPreviousCommit;
    65     WFCint iSerialNumber;
    66     OWF_SEMAPHORE iRendezvous;
    67     OWFNativeStreamType fastpathStream;
    68     WFCboolean fastpathChecked;
    69     WFCboolean iInternalStreamAccessed;
    70 public:
    71     virtual ~OWFDisplayContext_();
    72     } OWFDisplayContext;
    73 
    74 #endif //OWFDISPLAYCONTEXT_H