equal
deleted
inserted
replaced
75 #endif |
75 #endif |
76 #ifndef HUIFX_EFFECTCACHE_ENABLED |
76 #ifndef HUIFX_EFFECTCACHE_ENABLED |
77 return EFalse; |
77 return EFalse; |
78 #endif |
78 #endif |
79 } |
79 } |
|
80 |
|
81 TBool CHuiFxEngine::FxmlUsesInput1(CHuiFxEffect& aEffect) |
|
82 { |
|
83 RArray<THuiFxVisualSrcType> array; |
|
84 aEffect.FxmlVisualInputs(array); |
|
85 |
|
86 TInt c = array.Count(); |
|
87 for(TInt i = 0; i<c; i++) |
|
88 { |
|
89 THuiFxVisualSrcType val = array[i]; |
|
90 if (val == EVisualSrcInput1) |
|
91 { |
|
92 array.Close(); |
|
93 return ETrue; |
|
94 } |
|
95 } |
|
96 array.Close(); |
|
97 return EFalse; |
|
98 } |
|
99 |
80 |
100 |
81 EXPORT_C void CHuiFxEngine::RegisterEffectL(const TDesC &aFileName) |
101 EXPORT_C void CHuiFxEngine::RegisterEffectL(const TDesC &aFileName) |
82 { |
102 { |
83 #ifdef HUIFX_EFFECTCACHE_ENABLED |
103 #ifdef HUIFX_EFFECTCACHE_ENABLED |
84 const TDesC *filename = &aFileName; |
104 const TDesC *filename = &aFileName; |
148 parser->ParseL( aFileName, iExtRect ); |
168 parser->ParseL( aFileName, iExtRect ); |
149 #endif |
169 #endif |
150 #ifdef HUIFX_EFFECTCACHE_ENABLED |
170 #ifdef HUIFX_EFFECTCACHE_ENABLED |
151 CHuiFxEffectCacheEffectNode *node = new (ELeave) CHuiFxEffectCacheEffectNode(aFileName, aEffect, aVisual, &iExtRect, this); |
171 CHuiFxEffectCacheEffectNode *node = new (ELeave) CHuiFxEffectCacheEffectNode(aFileName, aEffect, aVisual, &iExtRect, this); |
152 node->SetEffectEndObserver( aEffectEndObserver, aHandle ); |
172 node->SetEffectEndObserver( aEffectEndObserver, aHandle ); |
153 aFlags |= KHuiFxDelayRunUntilFirstFrameHasBeenDrawn; |
|
154 node->SetEffectFlags( aFlags ); |
173 node->SetEffectFlags( aFlags ); |
155 CleanupStack::PushL(node); |
174 CleanupStack::PushL(node); |
156 iCache->FindOrCreateL(node); // takes ownership |
175 iCache->FindOrCreateL(node); // takes ownership |
157 CleanupStack::Pop(); |
176 CleanupStack::Pop(); |
158 #endif |
177 #endif |
204 if (aGroup != KErrNotFound) |
223 if (aGroup != KErrNotFound) |
205 { |
224 { |
206 aFlags |= KHuiFxWaitGroupSyncronization; |
225 aFlags |= KHuiFxWaitGroupSyncronization; |
207 node->SetEffectGroup(aGroup); |
226 node->SetEffectGroup(aGroup); |
208 } |
227 } |
209 aFlags |= KHuiFxDelayRunUntilFirstFrameHasBeenDrawn; |
|
210 node->SetEffectFlags( aFlags ); |
228 node->SetEffectFlags( aFlags ); |
211 |
229 |
212 CleanupStack::PushL(node); |
230 CleanupStack::PushL(node); |
213 iCache->FindOrCreateL(node); // takes ownership |
231 iCache->FindOrCreateL(node); // takes ownership |
214 CleanupStack::Pop(); |
232 CleanupStack::Pop(); |
344 case EReferencePointDisplayHeight: |
362 case EReferencePointDisplayHeight: |
345 case EReferencePointDisplayBottom: |
363 case EReferencePointDisplayBottom: |
346 { |
364 { |
347 CHuiDisplay* display = &CHuiStatic::Env().PrimaryDisplay(); |
365 CHuiDisplay* display = &CHuiStatic::Env().PrimaryDisplay(); |
348 return display->VisibleArea().Size().iHeight; // was DefaultRenderbuffer()->Size().iHeight |
366 return display->VisibleArea().Size().iHeight; // was DefaultRenderbuffer()->Size().iHeight |
|
367 } |
|
368 case EReferencePointDisplayHeightMinusVisualTop: |
|
369 { |
|
370 CHuiDisplay* display = &CHuiStatic::Env().PrimaryDisplay(); |
|
371 TReal32 height = display->VisibleArea().Size().iHeight; // was DefaultRenderbuffer()->Size().iHeight |
|
372 return height; |
349 } |
373 } |
350 default: |
374 default: |
351 break; |
375 break; |
352 } |
376 } |
353 // display left and top return 0 |
377 // display left and top return 0 |
564 return iLowGraphicsMemoryMode; |
588 return iLowGraphicsMemoryMode; |
565 } |
589 } |
566 |
590 |
567 TBool CHuiFxEngine::HasActiveEffects() const |
591 TBool CHuiFxEngine::HasActiveEffects() const |
568 { |
592 { |
|
593 // Don't report active effects if in SW-rendering mode |
|
594 if(iLowGraphicsMemoryMode) // != Normal |
|
595 { |
|
596 return EFalse; |
|
597 } |
569 return iActiveEffects.Count() > 0; |
598 return iActiveEffects.Count() > 0; |
570 } |
599 } |
571 |
600 |
572 void CHuiFxEngine::ClearCache() |
601 void CHuiFxEngine::ClearCache() |
573 { |
602 { |