The Difference between Surfaceview and GLSurfaceView

Posted: October 26, 2009 in Android, Java, Mobile
Tags: ,

It seems there may be some confusion or at least this aspect is not highlighted, ie the difference bewteenSrufaceView and GLSurfaceView.  Right now before Android 2.0 GLSurfaceView does not entirely play nice with SurfaceFinger.

Let me explain. On G1’s yo can only have one GLSurfaceView. Yes, there are some high end devices coming that can have multiple GLSurfaceViews. Holed on , there is more. GLSurfaceView is not hardware accelerated whereas SurfaceView iis in fact hardware accelerated.

Because of the way GLSurfaceView(pre-Anroid 2.0) takes over the framebuffer/SurfaceFinger you will not be able to get and act on user input in a reliable fashion. 2D rendering si suspeneded while control of the SurfaceFinger framebuiffer is held by GLsurfaceView, ie onSrufaceChanged etc.

While, yes using SurfaceVie w instead would produce an extra copy, on the G1 that is handled by a hardware 2d blitter and on other Andorid devices by a GPU.

Thus, why would you use GLsurfaceView? It has to do with the infrastructure changes that you will see in Android 2.0 and with Android GPU accelerated devices. In other words high end 3d games etc.

Reblog this post [with Zemanta]
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s