Re: [android-developers] Re: Partial invalidation in custom Android view with hardware acceleration
> I would expect (though my expectation could very well be wrong :P) that when
> I call invalidate(Rect) on a hardware accelerated View, that onDraw() would
> get called on that view with the Canvas clip set to the Rect provided in
> invalidate(Rect) and that only that portion of the Canvas would need to be
> updated.
onDraw() will get called but you won't get the Rect you've provided in
invalidate(Rect). What will happen however is that the rendering
pipeline will only execute the drawing instructions that intersect
with the Rect you've supplied with your invalidate call. When onDraw()
is executed, your drawing calls are only recorded for later use. At
playback time they can be ignored.
> What I am experiencing is that I call invalidate(Rect) on a hardware
> accelerated View and that onDraw() is called with a Canvas containing no
> clip and the Canvas is blank, so I need to redraw the entire Canvas.
There is no such concept as "blank Canvas." The clip will indeed be
set to be the entire View (to properly rebuild its display list.)
--
Romain Guy
Android framework engineer
romainguy@android.com
--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home