There is nothing magical about hardware acceleration. It is perfectly possible to write code that runs faster on the CPU that on the GPU. For instance, an app that does dozens or hundreds of calls to Canvas.drawLine() per frame is likely to perform worse on the GPU. The reason in this particular example is that every call to drawLine() will generate a rendering instruction for the GPU, which is very expensive. It is much more efficient to use drawLines() (plural) to batch all the lines in a single rendering instruction. There are many other things that can make a GPU perform poorly: overdraw, too many different textures or shaders, etc.
I just tried the app you linked to on a Galaxy Nexus and it performs roughly the same with or without hardware acceleration. From looking at its UI it seems it's doing a lot of custom drawing and I'm sure it could be optimized to be more GPU friendly. Also the amount of RAM and the speed of the CPU have little to do with how well an app will perform on the GPU. On Mon, Jan 16, 2012 at 10:41 AM, sblantipodi <[email protected]> wrote: > Just to add some more data. > This simple app can render its UI at 60FPS on Galaxy Nexus running > stock 4.0.2 with HW ACC is OFF. > https://market.android.com/details?id=MortgageCalculatorPRO.DPsoftware.org&feature=search_result#?t=W251bGwsMSwyLDEsIk1vcnRnYWdlQ2FsY3VsYXRvclBSTy5EUHNvZnR3YXJlLm9yZyJd > > Simply enable hardware acceleration and the framerate drops from 10FPS > to 30FPS. > As I repeat all the UI is drawn using drawLine() drawRect() > drawRoundRect() and StaticLayout to draw a correctly wrapped text. > Simple apps using simple UI runs slow on a 1.2GHz CPU with 1GB of RAM. > > Is there any reason to justify this aside from the fact that it must > be some problem in the hw acceleration implementation? > > -- > 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 -- Romain Guy Android framework engineer [email protected] -- 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

