equal
deleted
inserted
replaced
236 // Check if margins are allowed to be used for this effect |
236 // Check if margins are allowed to be used for this effect |
237 if (EffectFlags() & KHuiFxEffectDisableMarginsFlag) |
237 if (EffectFlags() & KHuiFxEffectDisableMarginsFlag) |
238 { |
238 { |
239 iRoot->EnableMargin(EFalse); |
239 iRoot->EnableMargin(EFalse); |
240 } |
240 } |
|
241 |
|
242 // Check if surface pixels are to be used for this effect in all layers. |
|
243 if (EffectFlags() & KHuiFxEnableBackgroundInAllLayers) |
|
244 { |
|
245 iRoot->SetAlwaysReadSurfacePixels(ETrue); |
|
246 } |
241 |
247 |
242 iRoot->SetTargetRect(targetArea); |
248 iRoot->SetTargetRect(targetArea); |
243 iRoot->SetSourceRect(targetArea); |
249 iRoot->SetSourceRect(targetArea); |
244 iRoot->SetDisplayArea(displayArea); |
250 iRoot->SetDisplayArea(displayArea); |
245 |
251 |
255 // Background needs to be captured from surface if effect uses background AND |
261 // Background needs to be captured from surface if effect uses background AND |
256 // Visual is transparent or margin is enabled AND |
262 // Visual is transparent or margin is enabled AND |
257 // Background has not been disabled with a effect specific flag |
263 // Background has not been disabled with a effect specific flag |
258 TBool enableBackground = IsAppliedToBackground() && (!aOpaque || iRoot->IsMarginEnabled()) && !(EffectFlags() & KHuiFxDisableBackground); |
264 TBool enableBackground = IsAppliedToBackground() && (!aOpaque || iRoot->IsMarginEnabled()) && !(EffectFlags() & KHuiFxDisableBackground); |
259 |
265 |
|
266 if (EffectFlags() & KHuiFxEnableBackgroundInAllLayers) |
|
267 { |
|
268 enableBackground = ETrue; |
|
269 } |
|
270 |
|
271 TBool useFrozenBackground = (EffectFlags() & KHuiFxFrozenBackground); |
|
272 |
260 // Check if cache is up-to date or does it need to be refreshed |
273 // Check if cache is up-to date or does it need to be refreshed |
261 TBool cachedRenderTargetNeedsRefresh = (iRoot->Changed() || aRefreshCachedRenderTarget || enableBackground); |
274 TBool cachedRenderTargetNeedsRefresh = (iRoot->Changed() || aRefreshCachedRenderTarget || (enableBackground && !useFrozenBackground)); |
262 |
275 |
263 // Try to apply also margins, we cannot just use aDisplayRect directly |
276 // Try to apply also margins, we cannot just use aDisplayRect directly |
264 TRect targetRect = iRoot->VisualRect(); |
277 TRect targetRect = iRoot->VisualRect(); |
265 |
278 |
266 // Size is always same as target rect. It contains margins if those are enabled. |
279 // Size is always same as target rect. It contains margins if those are enabled. |