static void AnnotateSpriteFlash(const CWsSpriteBase& aSprite, TBool aFlashOn) { LOG_SPRITE_FLASH(aSprite); MWsDrawAnnotationObserver* annoObs = aSprite.Screen()->DrawAnnotationObserver(); if(annoObs) { annoObs->SpriteFlash(aSprite, aFlashOn); } }
static void AnnotateSpriteRedrawStart(const CWsSpriteBase& aSprite, const TRegion& aRegion) { LOG_SPRITE_REDRAW_START(aSprite); MWsDrawAnnotationObserver* annoObs = aSprite.Screen()->DrawAnnotationObserver(); if(annoObs) { annoObs->SpriteRedrawStart(aSprite, aRegion); } }
static void AnnotateSpriteRedrawEnd(const CWsSpriteBase& aSprite) { LOG_SPRITE_REDRAW_END(aSprite); MWsDrawAnnotationObserver* annoObs = aSprite.Screen()->DrawAnnotationObserver(); if(annoObs) { annoObs->SpriteRedrawEnd(aSprite); } }
void CWsSpriteManager::DrawFloatingSprites(MWsGraphicsContext* aGc,const TRegion& aRegion) { if (iFloatingSprites.Count() == 0) return; //avoid sending events unless necessary for (TInt i = iFloatingSprites.Count() - 1; i >= 0 ; i--) { STACK_REGION redrawRegion; CWsSpriteBase* sprite = iFloatingSprites[i]; sprite->CalcRedrawRegion(aRegion, redrawRegion); if(redrawRegion.CheckError() || !redrawRegion.IsEmpty()) { if (sprite->IsFlashingEnabled() || sprite->IsDirty() || sprite->HasAnimation()) { AnnotateSpriteRedrawStart(*sprite, redrawRegion); if(sprite->HasAnimation()) { CWsAnim* anim = static_cast<CWsSprite*>(sprite)->iAnim; ASSERT(anim); TRAPD(err, anim->AnimateSpriteAnimL(sprite->Screen()->Now())); if(err!=KErrNone) { AnnotateSpriteRedrawEnd(*sprite); anim->Panic(EWservPanicAnimLeave); continue; } } aGc->Reset(); sprite->Redraw(aGc, redrawRegion); AnnotateSpriteRedrawEnd(*sprite); } } redrawRegion.Close(); } }