Does android use graphic hardware acceleration?

Page 2 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.

BenSkywalker

Diamond Member
Oct 9, 1999
9,140
67
91
Does Android really use the hardware acceleration of something like the Tegra?

Two different parts to your question, one is yes, Android absolutely uses graphics hardware acceleration. Does it use the full power of the Tegra2? Not for UI tasks, That's like asking if a semi truck can tow, and if so is it using all of its' power to tow your lawn tractor and nothing else.

For those commenting on what level of acceleration these devices have, do any of you even know what a bit blit is without looking it up? The way people talk in this thread I think it is safe to say you may as well walk up to the next 90 year old woman talking to her cat that you see and ask her, you are likely to get a response with at least comparable understanding. Windows 98 UI, without GPU acceleration, is much faster then Windows 7 UI, with 'full' GPU acceleration doing the same task on identical hardware. By the logic in this thread, I guess Win98 would have to be deemed superior and better optimized.
 

BenSkywalker

Diamond Member
Oct 9, 1999
9,140
67
91
My response yesterday was brief as it was just annoying reading some of the things being stated in this thread. Either people really have no idea exactly what they are talking about or they are spouting off some PR jargon they were taught by a company.

When talking about 'GPU' acceleration of UI elements there are probably tens of thousands of ways to go about it(likely far more then that) all using what would be considered 'full' GPU acceleration and end up with wildly divergent results.

To simplifiy things a bit- at the basic level you can have a set of register values aligned in a grid that matches your display resolution. When talking about something like iOS or Android assign enough of these to cover each screen you have and all you have to do is "slide" where you are reading data from. Silky smooth transitions on hardware decades old.

If you do things that way, however, you run into a couple of problems. One of the big ones is the modern version of parallax scrolling. In very simple terms, the effects of parallax scrolling is why your icons can smoothly scroll on top of your background without it moving, or with it moving very little. Obviously the previous example of how simply smooth scrolling can be accomplished in hardware falls down there. A 1MHZ processor would have more then enough power to handle the previous method smoothly.

Off the top of my head, you could use raster, animate, layer or sprite based effects for parallax scrolling. Each one of these has their own pros and cons, some of them work on a modified version of the above description, some work similar to how GPUs do today(raster) and all of them have their pros and cons dependant on any given situation. All of these can be fully hardware accelerated each with their own strengths and weaknesses(btw- the SNES was composting graphics elements decades before Apple decided to make it a PR catch phrase). All of these, without outside assistance, only deal with static images and layering of them and manipulation of layers in a relative movement to give the illusion of depth(none of them are actual 3D).

That gets us up to covering at least enough to handle the basics of the simplest smartphone UIs. Nothing terribly demanding by any means, the SNES was pulling these things off smoothly decades ago. Then we start to get into the more complicated issues.

Dynamic on screen content. Take a look at the animated icons on the iPhone. If the UI acceleration were as robust as people make it out to be, this should be a very simple task. Instead what we have is a video overlay with the icons layered beneath(honestly a very smart approach to the problem). Doing things this way allows you to have one animated element overlayed on top of your invisible actual icons which are then layered on top of your background. This limits your number of screen elements and makes two of your layers very easy to apply(from a compuational resources standpoint the invisible icons are likely the most intensive). If you were to allow actual animated icons then you would need to break down your layers further and furthermore have them subdivided and recalculated per frame(need to check the render state for each icon to see if the animation has been flipped).

Then we move along to something like widgets. Widgets you have all of the existing work to do, but then you add to that a number of different program states that need to be checked and updated per frame. You have 4 interactive/animated widgets? The render engine needs to send a request for the state of each one of them and then determine the proper state to draw them in before it can start to fit them in to the layers. All of the aformentioned work still needs to be done, but asking for the render state of a program is not something a GPU can do- either you have the program accessing the GPU directly(could be very bad if said program has any bugs) or you have the CPU handle the states and report them(the way it's actually done).

Then you add live backgrounds. There are a few different kinds, but most of them are actual applications offering feedback either through touch or external reporting factors(weather conditions etc). In a 2D UI your background state has to be known before you can start rendering anything else out, so the program needs to be checked for exactly what it is looking to render. Obviously it isn't significant in and of itself, but your computational time has gone from a few cycles to several thousands of cycles in the process of moving from a basic 2D scrolling background to one like we see today on the most flexible UI platform.

It is possible to ditch all of those layers and move to something more akin to a fully 3D interface. The benefits here when you start getting to these levels of complexity can be fairly dramatic- the program is structured to get all the information at once and create a render state for the entire scene. The downside to this is the entry level resources to run such a setup are significantly higher on the GPU end. Even if you do decide to handle things in this way, which approach do you use? Procedural texturing with an interally developed scripting engine for optimizations(most process intensive)? Look up table for most commonly used screen elements(most RAM intensive)? Dynamic texturing using the default 2D UI and layering them in the scene(least speedy, easiest on development and hardware fronts)?

Everything I've written here is over simplified to an extreme level and is just trying to get across the general point, the much bigger issue is that I haven't come remotely close to scratching the surface on all the different ways you can go about handling these items. Everything I discussed above can have all of the graphics elements fully GPU accelerated, and you could be looking at the difference between 1000FPS and 1FPS on identical hardware.

When I hear people talk about how smooth WinMo7 is and it clearly is more optimized then Android it just seems so obscenely assinine. Does WinMo7 have a smooth UI? Absolutely. Is their UI doing anything remotely comparable to a new Android device? Not even remotely close. If that doesn't matter to you, all the power in the world to you. Doesn't change reality. When there is another UI with comparable complexity that runs significantly smoother people will have a good comparison(actually, there already is but noone brings it up), if the UIs you are comparing don't have directly comparable functionality in terms of what they are doing on a visual basis you can certainly put forth that you like a more minimalistic approach with validity, but claiming one is using hardware better or is better developed is just foolish.
 

Reez

Junior Member
Jan 2, 2012
1
0
0
(...)When there is another UI with comparable complexity that runs significantly smoother people will have a good comparison(actually, there already is but noone brings it up)(...)

Hi, would you mind telling me about this UI you mentioned? Thank you!
 
Dec 30, 2004
12,553
2
76
Yes, it does. However, Android's architecture is horrible, very inefficient. The GPU has to make upwards of 3 passes over the whole screen to render all the layers and everything, which is why none of the GPU's are "capable enough" (according to Google).

Samsung's phones have a hardware accelerated web browser though, which is why their phones are so much smoother when browsing compared with other phones.
You can also use Opera Mobile/Mini as those are also hardware accelerated (and it shows).
 
Dec 30, 2004
12,553
2
76
oh there's also the problem where it depends on the developer to render the UI in the main thread and other computations in a sub-thread.
IE most apps just do it all in the main thread, which means any time you need to load something or run a garbage collector because you've got stuff going on, the UI stops animating.
 
Dec 30, 2004
12,553
2
76
Why not just have a single representation offscreen in vram of all the elements that need to be on the screen. The software tells the gpu to render to that section of memory when it has new data to render, and until then the gpu just copies over the elements onscreen 60x per second?
 
Dec 30, 2004
12,553
2
76
Ben can you explain more about this, your most recent post was most interesting.
Nevermind maybe I just need to read wikipedia more. Reading Parallax now and will move onto the other things you mentioned after.
 

Bateluer

Lifer
Jun 23, 2001
27,730
8
0
Its funny . . . Google's engineers come out and say unequivocally that Android uses hardware acceleration, for those that can't read change logs . . . and idiots on the Internet still question and debate it.


What is base android launcher? If you have ICS on a nexus, is that "base android launcher"?

Best launcher is highly subjective. The base launcher in ICS is good, but just as no frills as previous launchers. I like ADW.Ex myself, though there's about a dozen really popular ones now.
 

finbarqs

Diamond Member
Feb 16, 2005
3,617
2
81
didn't someone from Google wrote an article about maintaining 60 fps? That everyone has the misconception that it's ALL about GPU accelerated UI, but really, there's a bunch of other factors involved.
 

shabby

Diamond Member
Oct 9, 1999
5,782
45
91
didn't someone from Google wrote an article about maintaining 60 fps? That everyone has the misconception that it's ALL about GPU accelerated UI, but really, there's a bunch of other factors involved.

You mean this one? http://www.appleinsider.com/article...ag_occurs_more_often_in_android_than_ios.html

According to Munn, the reason behind the design change is that the original Android prototype didn't have a touchscreen, as it was meant to be a BlackBerry competitor. As such, Android's architecture is meant to support a keyboard and trackball. Munn further claimed that after the original iPhone arrived in 2007, Google rushed to complete Android, but "it was too late to rewrite the UI framework."

He cited Windows Mobile 6.5, BlackBerry OS and Symbian as examples of other older operating systems that suffered similar problems with touch performance. Microsoft, RIM and Nokia have all abandoned those OSes in order to start from scratch. "Android is the only mobile OS left that existed pre-iPhone," the report noted.
 

runawayprisoner

Platinum Member
Apr 2, 2008
2,496
0
76
Its funny . . . Google's engineers come out and say unequivocally that Android uses hardware acceleration, for those that can't read change logs . . . and idiots on the Internet still question and debate it.

I think this is getting very old. Yes, Google's engineers have stated repeatedly that Android does hardware acceleration, but... to what extent, and is it enabled by default? For everything?

Apparently, even in ICS, the answer is a big NO:

http://www.redmondpie.com/how-to-fix-lag-in-apps-on-galaxy-nexus-running-ice-cream-sandwich/

You can still force it, so that's good news, but no, it's not on by default. At least not for all apps. And the fact that it has to remain a developer option means it's just not ready for prime time yet.
 
Oct 25, 2006
11,036
11
91
I think this is getting very old. Yes, Google's engineers have stated repeatedly that Android does hardware acceleration, but... to what extent, and is it enabled by default? For everything?

Apparently, even in ICS, the answer is a big NO:

http://www.redmondpie.com/how-to-fix-lag-in-apps-on-galaxy-nexus-running-ice-cream-sandwich/

You can still force it, so that's good news, but no, it's not on by default. At least not for all apps. And the fact that it has to remain a developer option means it's just not ready for prime time yet.

I don't think you have the capability to read. I don't think you've read a single article on this topic, ever

"The main change in this regard in Android 4.0 is that now apps that are explicitly targeting 4.0 or higher will have acceleration enabled by default rather than having to put android:handwareAccelerated="true" in their manifest. (And the reason this isn’t just turned on for all existing applications is that some types of drawing operations can’t be supported well in hardware and it also impacts the behavior when an application asks to have a part of its UI updated. Forcing hardware accelerated drawing upon existing apps will break a significant number of them, from subtly to significantly.)"
 

MrX8503

Diamond Member
Oct 23, 2005
4,529
0
0
Just a heads up, this thread is old. It was created before Google's blogpost about GPU acceleration.

Android has implemented some form of GPU acceleration for a long time and within the blogpost they said that it's not a silver bullet to performance issues. From what I interpreted, it has been very difficult for Google to use the GPU to their advantage.

The recent blogpost was to address performance concerns as a result of the oncoming retina Android devices. 720p on smartphones and 1600p on tablets will become commonplace at the end of 2012 most likely.
 

runawayprisoner

Platinum Member
Apr 2, 2008
2,496
0
76
I don't think you have the capability to read. I don't think you've read a single article on this topic, ever

"The main change in this regard in Android 4.0 is that now apps that are explicitly targeting 4.0 or higher will have acceleration enabled by default rather than having to put android:handwareAccelerated="true" in their manifest. (And the reason this isn’t just turned on for all existing applications is that some types of drawing operations can’t be supported well in hardware and it also impacts the behavior when an application asks to have a part of its UI updated. Forcing hardware accelerated drawing upon existing apps will break a significant number of them, from subtly to significantly.)"

So it simply isn't ready for all apps yet, or apps have to be rewritten to support it.

I don't think there is any excuse to this. Barring what the engineers are writing, the fact is that both iOS and Windows Phone 7 have very good hardware acceleration, and Android doesn't. It's that simple. If enabling it doesn't automagically fix issues, then it's just that their current implementation isn't as good as iOS' or WinPhone 7's. Why the need to complicate it by saying that it's there but it either doesn't work or it doesn't fix anything?

It's that users keep turning a blind eye on this issue that Google has been able to sidestep it for this long. I have already said this in the other thread, but I see that we aren't willing to admit the problem.
 
Last edited:

Puddle Jumper

Platinum Member
Nov 4, 2009
2,835
1
0
So it simply isn't ready for all apps yet, or apps have to be rewritten to support it.

I don't think there is any excuse to this. Barring what the engineers are writing, the fact is that both iOS and Windows Phone 7 have very good hardware acceleration, and Android doesn't. It's that simple. If enabling it doesn't automagically fix issues, then it's just that their current implementation isn't as good as iOS' or WinPhone 7's. Why the need to complicate it by saying that it's there but it either doesn't work or it doesn't fix anything?

It's that users keep turning a blind eye on this issue that Google has been able to sidestep it for this long. I have already said this in the other thread, but I see that we aren't willing to admit the problem.

If you bothered to read BenSkywalker's post he already addressed all of the points you just raised.
 

runawayprisoner

Platinum Member
Apr 2, 2008
2,496
0
76
If you bothered to read BenSkywalker's post he already addressed all of the points you just raised.

I already read it. He simply addressed the launcher, but not the apps.

On another level, this was also addressed in Dianne's blog post.

And I do agree with some of that. Namely... the live wallpaper. It's true that layering the launcher with hardware acceleration on top of a live wallpaper that's also asking for hardware acceleration is trouble. But... that doesn't have anything to do with a system-wide hardware acceleration for apps. The launcher is not the entire OS.

Or must the live wallpaper and launcher still be running while another app is in focus in foreground?
 
Oct 25, 2006
11,036
11
91
So it simply isn't ready for all apps yet, or apps have to be rewritten to support it.

I don't think there is any excuse to this. Barring what the engineers are writing, the fact is that both iOS and Windows Phone 7 have very good hardware acceleration, and Android doesn't. It's that simple. If enabling it doesn't automagically fix issues, then it's just that their current implementation isn't as good as iOS' or WinPhone 7's. Why the need to complicate it by saying that it's there but it either doesn't work or it doesn't fix anything?

It's that users keep turning a blind eye on this issue that Google has been able to sidestep it for this long. I have already said this in the other thread, but I see that we aren't willing to admit the problem.

I don't think you read the problem. Read his post, and read your post and compare them.

Your post is answered by his.
 

zoiks

Lifer
Jan 13, 2000
11,787
3
81
The Galaxy Nexus has an option to use hardware accelaration but as one of the Google developers indicated that it's not always fruitful or beneficial doing that full-time.
 

runawayprisoner

Platinum Member
Apr 2, 2008
2,496
0
76
I don't think you read the problem. Read his post, and read your post and compare them.

Your post is answered by his.

I don't think you read my post or his either. Please do so again if you haven't.

The simplified version is this... his post addressed mostly the launcher and problems in trying to implement a full GPU acceleration interface for it. I more or less agree with most of what he said.

But my post discussed GPU acceleration for "apps", not the "launcher".