uiacceltk/hitchcock/plugins/openwfcrs/inc/screencaptureutil.h
author Salvatore Rinaldo <salvatorer@symbian.org>
Tue, 15 Jun 2010 14:05:48 +0100
branchGCC_SURGE
changeset 36 a7cff2fbd499
parent 19 f5bac0badc7e
permissions -rw-r--r--
Bug 2959 - GCC compilation issues in sf/mw/uiaccelerator

// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
// which accompanies this distribution, and is available
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
//
// Initial Contributors:
// Nokia Corporation - initial contribution.
//
// Contributors:
//
// Description:
//

#ifndef __SCREENCAPTURERENDERSTAGE_H__
#define __SCREENCAPTURERENDERSTAGE_H__

#include <graphics/wsrenderstage.h>
#include <graphics/surface.h>
#include <graphics/surfacemanager.h>
#include <graphics/surfaceupdateclient.h>

class MWsScene;
class MWsDisplayControl;
class MWsDisplayMapping;
class MWsScreenDevice;

/**
This is the implementation of CWsRenderStage which is created by a CScreenCaptureUtilFactory
*/

class CScreenCaptureUtil : public CBase
	{
public:
	static CScreenCaptureUtil * NewL(CWsRenderStage* aOwner);
	~CScreenCaptureUtil();

	CScreenCaptureUtil();
	void ConstructL(CWsRenderStage* aOwner);
	void ComposeScreenL(TInt aHandle);
	void CreateLocalSurfaceL();
	void GetCompositionAreaSize(TSize& aSize) const;
	TSurfaceId CreateSurfaceL(const TSize& aSize, TUidPixelFormat aPixelFormat, TInt aStride);
	TBool VerifyBitmapFormatL(const CFbsBitmap& aBitmap);
	TInt CopySurfaceToBitmapL(CFbsBitmap& aCopyToBitmap);
	
private:
	MWsScene* iScene;
	MWsDisplayMapping* iDisplayMapping;
	MWsScreenDevice* iScreenDevice;
	TSurfaceId iLocalSurface;
	RSurfaceManager iSurfaceManager;
	RSurfaceUpdateSession iSurfaceUpdateSession;
	RTimer iTimer;
	static const TUidPixelFormat KSurfacePixelFormat = EUidPixelFormatXRGB_8888;
	static const TInt KSurfaceBytesPerPixel = 4;
	};

#endif //__SCREENCAPTURERENDERSTAGE_H__