|
1 // Copyright (c) 2008-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 __SCREENCAPTURERENDERSTAGE_H__ |
|
17 #define __SCREENCAPTURERENDERSTAGE_H__ |
|
18 |
|
19 #include <graphics/wsrenderstage.h> |
|
20 #include <graphics/surface.h> |
|
21 #include <graphics/surfacemanager.h> |
|
22 #include <graphics/surfaceupdateclient.h> |
|
23 |
|
24 class MWsScene; |
|
25 class MWsDisplayControl; |
|
26 class MWsDisplayMapping; |
|
27 class MWsScreenDevice; |
|
28 |
|
29 /** |
|
30 This is the implementation of CWsRenderStage which is created by a CScreenCaptureUtilFactory |
|
31 */ |
|
32 |
|
33 class CScreenCaptureUtil : public CBase |
|
34 { |
|
35 public: |
|
36 static CScreenCaptureUtil * NewL(CWsRenderStage* aOwner); |
|
37 ~CScreenCaptureUtil(); |
|
38 |
|
39 CScreenCaptureUtil(); |
|
40 void ConstructL(CWsRenderStage* aOwner); |
|
41 void ComposeScreenL(TInt aHandle); |
|
42 void CreateLocalSurfaceL(); |
|
43 void GetCompositionAreaSize(TSize& aSize) const; |
|
44 TSurfaceId CreateSurfaceL(const TSize& aSize, TUidPixelFormat aPixelFormat, TInt aStride); |
|
45 TBool VerifyBitmapFormatL(const CFbsBitmap& aBitmap); |
|
46 TInt CopySurfaceToBitmapL(CFbsBitmap& aCopyToBitmap); |
|
47 |
|
48 private: |
|
49 MWsScene* iScene; |
|
50 MWsDisplayMapping* iDisplayMapping; |
|
51 MWsScreenDevice* iScreenDevice; |
|
52 TSurfaceId iLocalSurface; |
|
53 RSurfaceManager iSurfaceManager; |
|
54 RSurfaceUpdateSession iSurfaceUpdateSession; |
|
55 RTimer iTimer; |
|
56 static const TUidPixelFormat KSurfacePixelFormat = EUidPixelFormatXRGB_8888; |
|
57 static const TInt KSurfaceBytesPerPixel = 4; |
|
58 }; |
|
59 |
|
60 #endif //__SCREENCAPTURERENDERSTAGE_H__ |