Performance comparison on Android: Canvas vs Opengl ES

Asked

Viewed 443 times

5

Is there any comparative performance table, or some list with rules/guidelines, which tells me from which moment it pays to use Opengl ES on Android, instead of the Canvas + Activity pair configured as hardwareAccelerated="true", to make constant drawings, for example in a game?

Or it is always more advantageous to use Opengl ES in this scenario?

  • 1

    If you are rendering via hardwareAccelerated="true" so you’re using Opengl under the table, but through an "easier" API. Using Opengl directly will always be faster. To know if the difference is significant for your specific application, only testing...

  • 1

    Yes, I agree. But I’ve tested several third-party games, and amazingly, a few of them work more slowly on a Galaxy S4 than on a Galaxy Y, which, at first, should not occur. I don’t have access to their source code, but I started to assume that there must be some kind of relationship between using Opengl ES directly, and using an accelerated canvas "underneath the curtain".

1 answer

2

exactly as Guilherme’s comment proposed: Opengl has a lower level access than Canvas and will be faster.

In the case of slowness in some devices may have many reasons ranging from poor programming using Opengl (several unnecessary calls in render for example) or render handling by manufacturer driver (some put implementations in specific situations that make render faster).

Browser other questions tagged

You are not signed in. Login or sign up in order to post.