38 virtual void HeavyOperationL(MHuiFxParsingEndedObserver *aObserver, TInt aIndex)=0; // from nothing to this instance |
38 virtual void HeavyOperationL(MHuiFxParsingEndedObserver *aObserver, TInt aIndex)=0; // from nothing to this instance |
39 virtual TInt Ref(TInt aCount)=0; // increase count by aCount and return count. |
39 virtual TInt Ref(TInt aCount)=0; // increase count by aCount and return count. |
40 virtual void ParsingEndedBefore()=0; |
40 virtual void ParsingEndedBefore()=0; |
41 virtual void ParsingEndedAfter(MHuiFxEffectCacheNode *aCached)=0; |
41 virtual void ParsingEndedAfter(MHuiFxEffectCacheNode *aCached)=0; |
42 virtual TBool FxmlUsesInput1()=0; |
42 virtual TBool FxmlUsesInput1()=0; |
|
43 virtual TBool FxmlUsesOpaqueHint() const=0; |
|
44 |
43 virtual void Delete()=0; |
45 virtual void Delete()=0; |
44 }; |
46 }; |
45 |
47 |
46 class CHuiFxEffectCache : public CBase, public MHuiFxParsingEndedObserver |
48 class CHuiFxEffectCache : public CBase, public MHuiFxParsingEndedObserver |
47 { |
49 { |
51 IMPORT_C void FindOrCreateL(MHuiFxEffectCacheNode *aNode); // moves ownership |
53 IMPORT_C void FindOrCreateL(MHuiFxEffectCacheNode *aNode); // moves ownership |
52 MHuiFxEffectCacheNode *FindDup(const TDesC &aId); |
54 MHuiFxEffectCacheNode *FindDup(const TDesC &aId); |
53 IMPORT_C void UnUse(MHuiFxEffectCacheNode *aNode); |
55 IMPORT_C void UnUse(MHuiFxEffectCacheNode *aNode); |
54 IMPORT_C ~CHuiFxEffectCache(); |
56 IMPORT_C ~CHuiFxEffectCache(); |
55 void ParsingEnded(TInt aHandle); |
57 void ParsingEnded(TInt aHandle); |
56 MHuiFxEffectCacheNode *FindCached(const TDesC &aId); |
58 MHuiFxEffectCacheNode *FindCached(const TDesC &aId) const; |
57 TBool FxmlUsesInput1(const TDesC &aFileName); |
59 TBool FxmlUsesInput1(const TDesC &aFileName); |
|
60 TBool FxmlUsesOpaqueHint(const TDesC &aFileName) const; |
58 private: |
61 private: |
59 struct IDNode |
62 struct IDNode |
60 { |
63 { |
61 TInt iId; |
64 TInt iId; |
62 MHuiFxEffectCacheNode *iNode; |
65 MHuiFxEffectCacheNode *iNode; |
86 // This class has all dependencies to outside objects. |
89 // This class has all dependencies to outside objects. |
87 class CHuiFxEffectCacheEffectNode : public CBase, public MHuiFxEffectCacheNode |
90 class CHuiFxEffectCacheEffectNode : public CBase, public MHuiFxEffectCacheNode |
88 { |
91 { |
89 public: |
92 public: |
90 CHuiFxEffectCacheEffectNode(const TDesC &aFileName, CHuiFxEffect *&aEffect, MHuiEffectable *aVisual, TRect *extRect, CHuiFxEngine *aEngine) |
93 CHuiFxEffectCacheEffectNode(const TDesC &aFileName, CHuiFxEffect *&aEffect, MHuiEffectable *aVisual, TRect *extRect, CHuiFxEngine *aEngine) |
91 : iFileName(aFileName.AllocL()), iEffect(aEffect), iVisual(aVisual), iExtRect(extRect), iEffectCached(0), iEngine(aEngine), iRefCount(0), iParser(0) { } |
94 : iFileName(aFileName.AllocL()), iEffect(aEffect), iVisual(aVisual), iExtRect(extRect), iEffectCached(0), iEngine(aEngine), iRefCount(0), iParser(0), iGroup(KErrNotFound) { } |
92 IMPORT_C ~CHuiFxEffectCacheEffectNode(); |
95 IMPORT_C ~CHuiFxEffectCacheEffectNode(); |
93 void SetEffectEndObserver( MAlfGfxEffectObserver* aEffectEndObserver, TInt aHandle ); |
96 void SetEffectEndObserver( MAlfGfxEffectObserver* aEffectEndObserver, TInt aHandle ); |
94 void SetEffectFlags( TInt aFlags ); |
97 void SetEffectFlags( TInt aFlags ); |
95 void SetEffectGroup( TInt aGroup); |
98 void SetEffectGroup( TInt aGroup); |
96 private: |
99 private: |
102 void HeavyOperationL(MHuiFxParsingEndedObserver *aObserver, TInt aIndex); |
105 void HeavyOperationL(MHuiFxParsingEndedObserver *aObserver, TInt aIndex); |
103 TInt Ref(TInt aCount); |
106 TInt Ref(TInt aCount); |
104 void ParsingEndedBefore(); |
107 void ParsingEndedBefore(); |
105 void ParsingEndedAfter(MHuiFxEffectCacheNode *aCached); |
108 void ParsingEndedAfter(MHuiFxEffectCacheNode *aCached); |
106 TBool FxmlUsesInput1(); |
109 TBool FxmlUsesInput1(); |
|
110 TBool FxmlUsesOpaqueHint() const; |
107 void Delete(); |
111 void Delete(); |
108 |
112 |
109 private: |
113 private: |
110 const TDesC *iFileName; |
114 const TDesC *iFileName; |
111 CHuiFxEffect *iEffect; |
115 CHuiFxEffect *iEffect; |