equal
deleted
inserted
replaced
259 } |
259 } |
260 |
260 |
261 TBool CHuiFxEffect::CachedDraw(CHuiGc& aGc, const TRect& aDisplayRect, TBool aRefreshCachedRenderTarget, TBool aOpaque) |
261 TBool CHuiFxEffect::CachedDraw(CHuiGc& aGc, const TRect& aDisplayRect, TBool aRefreshCachedRenderTarget, TBool aOpaque) |
262 { |
262 { |
263 RRegion dummy; |
263 RRegion dummy; |
264 TBool ret = CachedDraw(aGc, aDisplayRect, aRefreshCachedRenderTarget, aOpaque, dummy); |
264 TBool ret = CachedDraw(aGc, aDisplayRect, aRefreshCachedRenderTarget, aOpaque, dummy,EFalse); |
265 dummy.Close(); |
265 dummy.Close(); |
266 return ret; |
266 return ret; |
267 } |
267 } |
268 |
268 |
269 // TODO: effect area should be reduced if aClipRegion is smaller than aDisplayRect. |
269 // TODO: effect area should be reduced if aClipRegion is smaller than aDisplayRect. |
270 TBool CHuiFxEffect::CachedDraw(CHuiGc& aGc, const TRect& aDisplayRect, TBool aRefreshCachedRenderTarget, TBool aOpaque, const TRegion& aClipRegion, TInt aAlpha) |
270 TBool CHuiFxEffect::CachedDraw(CHuiGc& aGc, const TRect& aDisplayRect, TBool aRefreshCachedRenderTarget, TBool aOpaque, const TRegion& aClipRegion, TBool aHasSurface, TInt aAlpha) |
271 { |
271 { |
272 #ifdef HUIFX_TRACE |
272 #ifdef HUIFX_TRACE |
273 RDebug::Print(_L("CHuiFxEffect::CachedDraw - 0x%x"), this); |
273 RDebug::Print(_L("CHuiFxEffect::CachedDraw - 0x%x"), this); |
274 #endif |
274 #endif |
275 iFramesDrawn++; |
275 iFramesDrawn++; |
362 // Disable clipping, otherwise strange things happen. |
362 // Disable clipping, otherwise strange things happen. |
363 aGc.Disable(CHuiGc::EFeatureClipping); |
363 aGc.Disable(CHuiGc::EFeatureClipping); |
364 if (cachedRenderTargetNeedsRefresh) |
364 if (cachedRenderTargetNeedsRefresh) |
365 { |
365 { |
366 // Render to cached render target |
366 // Render to cached render target |
367 iRoot->Draw(*iEngine, aGc, *iCachedRenderTarget, *iCachedRenderTarget); |
367 iRoot->Draw(*iEngine, aGc, *iCachedRenderTarget, *iCachedRenderTarget, aHasSurface); |
368 #ifdef HUIFX_TRACE |
368 #ifdef HUIFX_TRACE |
369 RDebug::Print(_L("CHuiFxEffect::CachedDraw - refreshed cached render buffer 0x%x"), this); |
369 RDebug::Print(_L("CHuiFxEffect::CachedDraw - refreshed cached render buffer 0x%x"), this); |
370 #endif |
370 #endif |
371 } |
371 } |
372 |
372 |
418 { |
418 { |
419 return EFalse; |
419 return EFalse; |
420 } |
420 } |
421 |
421 |
422 // Normal drawing |
422 // Normal drawing |
423 iRoot->Draw(*iEngine, aGc, *target, *target); |
423 iRoot->Draw(*iEngine, aGc, *target, *target, aHasSurface); |
424 } |
424 } |
425 |
425 |
426 return ETrue; |
426 return ETrue; |
427 } |
427 } |
428 |
428 |
429 EXPORT_C TBool CHuiFxEffect::Draw(CHuiGc& aGc, const TRect& aDisplayRect) |
429 EXPORT_C TBool CHuiFxEffect::Draw(CHuiGc& aGc, const TRect& aDisplayRect, TBool aHasSurface) |
430 { |
430 { |
431 // Prepare all layers |
431 // Prepare all layers |
432 #ifdef HUIFX_TRACE |
432 #ifdef HUIFX_TRACE |
433 RDebug::Print(_L("CHuiFxEffect::Draw - 0x%x"), this); |
433 RDebug::Print(_L("CHuiFxEffect::Draw - 0x%x"), this); |
434 #endif |
434 #endif |
481 if (!target) |
481 if (!target) |
482 { |
482 { |
483 return EFalse; |
483 return EFalse; |
484 } |
484 } |
485 |
485 |
486 iRoot->Draw(*iEngine, aGc, *target, *target); |
486 iRoot->Draw(*iEngine, aGc, *target, *target, aHasSurface); |
487 return ETrue; |
487 return ETrue; |
488 } |
488 } |
489 |
489 |
490 EXPORT_C TBool CHuiFxEffect::VisualArea(TRect& aRect) const |
490 EXPORT_C TBool CHuiFxEffect::VisualArea(TRect& aRect) const |
491 { |
491 { |
610 iRoot->AdvanceTime(aElapsedTime); |
610 iRoot->AdvanceTime(aElapsedTime); |
611 } |
611 } |
612 } |
612 } |
613 else |
613 else |
614 { |
614 { |
|
615 #ifdef USE_MODULE_TEST_HOOKS_FOR_ALF |
|
616 if (iFramesDrawn == 1) |
|
617 { |
|
618 // This is about the time when first frame from the effect is on screen |
|
619 TTime endTime; |
|
620 endTime.UniversalTime(); |
|
621 AMT_ADD_TIME(iHandle, endTime.Int64(), ETrue); |
|
622 } |
|
623 #endif |
615 iRoot->AdvanceTime(aElapsedTime); |
624 iRoot->AdvanceTime(aElapsedTime); |
616 } |
625 } |
617 iElapsedTime += aElapsedTime; |
626 iElapsedTime += aElapsedTime; |
618 } |
627 } |
619 |
628 |