[android-developers] Re: app that 'animates' drawing

2010-04-18 Thread Rob Y.
Poking around here some more, it seems like the problem is the way
SurfaceView double-buffers output.  You kind of have to draw the
entire surface every time.  I had tried unlocking and relocking on
every 'delay' call, but that didn't work either, presumably because
the relock produced an incomplete buffer, and adding more data to that
and posting it didn't draw the whole picture.

I guess the only mechanism that would work is to maintain a bitmap of
the whole Surface and draw *that* incrementally.  Then on each 'delay'
request, lock the Surface and copy the entire bitmap in to draw the
next 'frame'.  Ouch.

Does this sound 'right'?  Or is there a better way?

Thanks,
Rob

-- 
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


[android-developers] Re: app that 'animates' drawing

2010-04-18 Thread Rob Y.
 I guess the only mechanism that would work is to maintain a bitmap of
 the whole Surface and draw *that* incrementally.  Then on each 'delay'
 request, lock the Surface and copy the entire bitmap in to draw the
 next 'frame'.  Ouch.

Tried this, and it seems to work.  Still eager for suggestions if this
seems as awkward to you as it does to me.

Thanks,
Rob

-- 
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