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