SurfaceHolder holder = getHolder();

i want to draw using canvas and need as much performance as possible
which holder type should i set it to?  I know the canvas is not
hardware accelerated but how can I get a performance boost when using
it?

holder.setType(SurfaceHolder.SURFACE_TYPE_HARDWARE);

http://developer.android.com/reference/android/view/SurfaceHolder.html

int     SURFACE_TYPE_GPU        Surface type: creates a surface suited to be
used with the GPU
int     SURFACE_TYPE_HARDWARE   Surface type: creates a suited to be used
with DMA engines and hardware accelerators.
int     SURFACE_TYPE_NORMAL     Surface type: creates a regular surface,
usually in main, non contiguous, cached/buffered RAM.
int     SURFACE_TYPE_PUSH_BUFFERS       Surface type: creates a "push"
surface, that is a surface that doesn't owns its buffers.
--~--~---------~--~----~------------~-------~--~----~
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