Hello All,

I'm in the midst of implementing somewhat dynamic background blur effect
for Android (similar to what iOS7 has) and I'm keen to have this one
optimisation in place.

In my implementation I'm trying to achieve following:

1. I extend default layout classes and call them blur layouts

2. When view contents below blur layout in the view tree changes, I render
what ever content there is into scaled offscreen bitmap (this is the part
needing optimisation)

3. Blur is applied on offscreen bitmap using RenderScript implementation of
stack blur

4. From then on the blur layout draws this blurred image as it's background

Now.. Currently.. I'm using ViewTreeObserver to determine when current
screen is about to update (OnPreDrawListener) but this doesn't give me any
indication whether content below my layout has changed. It's triggered no
matter what update happens on the screen and though I'm recreating the blur
image way too often - also in cases content below hasn't changed.

It would be great if someone with better knowledge on Android drawing
internals could help me out on this one. Say, if my layout occupies
Rect(100, 100, 200, 200) on the screen, I would like to observe in this
layout when content below within it's area has changed. Or is this even
possible?

For interested ones current implementation can be found here:
https://github.com/harism/android_anndblur

And precompiled application should appear in Play Market at some point.

--
Harri

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to