author | William Roberts <williamr@symbian.org> |
Mon, 23 Aug 2010 14:34:16 +0100 | |
changeset 117 | a07b4f57fa97 |
permissions | -rw-r--r-- |
117
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
1 |
// Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
2 |
// All rights reserved. |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
3 |
// This component and the accompanying materials are made available |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
4 |
// under the terms of "Eclipse Public License v1.0" |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
5 |
// which accompanies this distribution, and is available |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html". |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
7 |
// |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
8 |
// Initial Contributors: |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
9 |
// Nokia Corporation - initial contribution. |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
10 |
// |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
11 |
// Contributors: |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
12 |
// |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
13 |
// Description: |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
14 |
// |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
15 |
|
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
16 |
#include "nvgrenderstagefactory.h" |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
17 |
#include "nvgrenderstage.h" |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
18 |
#include "nvgrenderstagepanic.h" |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
19 |
|
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
20 |
_LIT(KNvgRenderStageName, "NVGRenderStage"); |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
21 |
|
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
22 |
void Panic(TNvgRenderStagePanic aPanic) |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
23 |
{ |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
24 |
_LIT(KNvgRenderStagePanic, "NvgRenderStage"); |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
25 |
User::Panic(KNvgRenderStagePanic, aPanic); |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
26 |
} |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
27 |
|
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
28 |
CNvgRenderStageFactory* CNvgRenderStageFactory::CreateL() |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
29 |
{ |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
30 |
return new(ELeave) CNvgRenderStageFactory; |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
31 |
} |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
32 |
|
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
33 |
void CNvgRenderStageFactory::ConstructL(MWsGraphicDrawerEnvironment& aEnv, const TDesC8& /*aData*/) |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
34 |
{ |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
35 |
BaseConstructL(aEnv); |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
36 |
} |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
37 |
|
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
38 |
CNvgRenderStageFactory::CNvgRenderStageFactory() |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
39 |
{ |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
40 |
} |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
41 |
|
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
42 |
CNvgRenderStageFactory::~CNvgRenderStageFactory() |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
43 |
{ |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
44 |
} |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
45 |
|
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
46 |
/** |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
47 |
Overidding MWsObjectProvider |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
48 |
*/ |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
49 |
TAny* CNvgRenderStageFactory::ResolveObjectInterface(TUint aTypeId) |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
50 |
{ |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
51 |
switch (aTypeId) |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
52 |
{ |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
53 |
case KMWsRenderStageFactory: |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
54 |
return static_cast<MWsRenderStageFactory*>(this); |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
55 |
} |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
56 |
|
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
57 |
return NULL; |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
58 |
} |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
59 |
|
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
60 |
CWsRenderStage* CNvgRenderStageFactory::CreateFinalRenderStageL(MWsScreen* /*aScreen*/, MWsScreenRedraw* /*aScreenRedraw*/, TInt /*aScreenNumber*/) |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
61 |
{ |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
62 |
Panic(EExtendedBitmapRenderStageMustNotBeFinal); |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
63 |
return NULL; |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
64 |
} |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
65 |
|
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
66 |
#ifndef SYMBIAN_GRAPHICS_GCE |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
67 |
#error ("must compile with SYMBIAN_GRAPHICS_GCE") |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
68 |
#endif |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
69 |
|
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
70 |
CWsRenderStage* CNvgRenderStageFactory::CreateRenderStageL(MWsScreen* aScreen, MWsScreenRedraw* aScreenRedraw, CWsRenderStage* aNextStage) |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
71 |
{ |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
72 |
CNvgRenderStage* stage = CNvgRenderStage::NewL(&Env(), aScreen, aScreenRedraw, aNextStage); |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
73 |
return stage; |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
74 |
} |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
75 |
|
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
76 |
const TDesC& CNvgRenderStageFactory::PluginName() const |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
77 |
{ |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
78 |
return KNvgRenderStageName; |
a07b4f57fa97
Add NVGRenderStage and update the *.ini files accordingly
William Roberts <williamr@symbian.org>
parents:
diff
changeset
|
79 |
} |