windowing/windowserver/nonnga/remotegc/DrawSection.h
changeset 0 5d03bc08d59c
equal deleted inserted replaced
-1:000000000000 0:5d03bc08d59c
       
     1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #ifndef __DRAWSECTION_H__
       
    17 #define __DRAWSECTION_H__
       
    18 
       
    19 #include <w32std.h>
       
    20 #include <s32mem.h>
       
    21 
       
    22 class TWsGraphicMsgBufParser;
       
    23 
       
    24 /**
       
    25 CDrawSection contains information about one recorded redraw in the CCommandBuffer.
       
    26 It has a segmented buffer containing all drawcommands that belongs to this drawsection.
       
    27 */
       
    28 NONSHARABLE_CLASS(CDrawSection) : public CBase
       
    29 	{
       
    30 public:
       
    31 	static CDrawSection* NewL();		
       
    32 	static CDrawSection* NewL(const TRect& aDrawRect, const TRect& aBoundingRect, TBool aHasBitmapCommand);
       
    33 	~CDrawSection();
       
    34 	
       
    35 	void SetBuffer(CBufBase* aSegBuf);
       
    36 	CBufBase* Buffer() const;	
       
    37 	void SetHasBeenExternalized(TBool aHasBeenExternalized);
       
    38 	TBool HasBeenExternalized() const;
       
    39 	TBool IsIdentical(const CDrawSection& aDrawSection) const;
       
    40 	void ExternalizeL(RWsGraphicMsgBuf& aMsgBuf);
       
    41 	TInt LoadL(const TWsGraphicMsgBufParser& aData, TInt aIndex);
       
    42 	TRect DrawRect() const;
       
    43 	
       
    44 private:
       
    45 	CDrawSection();
       
    46 	CDrawSection(const TRect& aDrawRect, const TRect& aBoundingRect, TBool aHasBitmapCommand);
       
    47 	
       
    48 private:
       
    49 	TRect iDrawRect;
       
    50 	TRect iBoundingRect;
       
    51 	TBool iHasBitmapCommand;
       
    52 	TBool iHasBeenExternalized;	
       
    53 	CBufBase* iSectionSegBuf;
       
    54 	};
       
    55 	
       
    56 #endif	// __DRAWSECTION_H__