Hi,

If you were using SurfaceView's onDraw() method then you were not
getting any benefit. You have to use
lockCanvas()/unlockCanvasAndPost() and post on the underlying Surface.
TextureView works in a similar way: you can call
lockCanvas()/unlockCanvasAndPost().

However, it seems all you need is a View. It's easier to use and since
you are not using SurfaceView properly anyway it will do the same
thing.

On Thu, Sep 27, 2012 at 2:19 PM, Ajit Vasudevan <vasu.a...@gmail.com> wrote:
> Hello,
>
> I am currently working on an app that requires computations/rendering based
> on a variety of user inputs. I have implemented the SurfaceView and things
> work as expected.
> But I started facing performance issues when I tried to put this inside a
> horizontal scroll view. Obviously it is not intended to work this way - but
> I tried anyway :)
> Based on what I have read - it appears like I have to move to TextureView.
> But i am unable to override the onDraw, and therefore cannot perform the
> necessary drawing using the Canvas. This might be a trivial question - but I
> wanted to know if we can use TextureView to draw primitives on the screen
> using a Canvas? The only examples I have seen thus far show the use of
> video/camera/openGL rendering on the TextureView.
>
> Any help on this would be great.
>
> Thanks much
> -Ajit
>
> --
> 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



-- 
Romain Guy
Android framework engineer
romain...@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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to