On Monday, August 20, 2012 12:52:38 PM UTC-7, Przemyslaw Wegrzyn wrote:
>
>
> What is the minimum Android version you're targetting? 
>
>
1.6 unfortunately. 
 

>   
> Another questions is - what are you actually trying to achieve? Perhaps 
> there's another way around it?
>

There are - just trying to find the least bad way. 

I'm trying to reduce flicker.

Let's say that rendering a custom view is expensive involving lots of math, 
disk I/O, database queries, maybe even network calls. So you do what a 
responsible person would do, you use a threadpool to render to an offscreen 
bitmap. This bitmap is even bigger than the screen to give you some buffer, 
of course.    

Then the user pans the screen. It is super smooth for a while. When you get 
past that buffer, it triggers a redraw of the whole offscreen bitmap. You 
are likely to see several frames before the rendering of the offscreen 
bitmap is completely done, causing flickering. 

Then I realize that half of the pixels for the new offscreenbitmap may be 
already rendered correctly, and it becomes awfully tempting to try some 
trick like this, preferably without doubling the memory footprint. I can 
avoid any flicker for the area of the screen that is already rendered.  

Nathan

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to