Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

Enabling 2D Hardware Acceleration in all Apps?

OP willverduzco

21st April 2011, 09:06 PM   |  #1  
willverduzco's Avatar
OP Portal Administrator
n͖̜̺y̥͔̗̝̠̩̜c̖͙͇̲̞
Thanks Meter: 2,898
 
6,422 posts
Join Date:Joined: Apr 2010
I'm sure the vast majority of the users who frequent this section are familiar with Honeycomb's new 2D hardware accelerated graphics pipeline, replacing the older (and considerably slower) Skia 2D software-accelerated rendering engine.

Currently, to take advantage of the 2D Hardware Acceleration, each application must have the following in its AndroidManifest.xml:
Code:
<application android:hardwareAccelerated="true">...</application>
Additionally, the 2D HW Acceleration pipeline can be turned on and off for individual activities within each application:
Code:
<activity android:hardwareAccelerated="false" />
Furthermore, you can control the 2D acceleration on the window and view levels.

Unfortunately, the vast majority of applications have not added that flag. Romain Guy explained why he thought that it was a bad idea to have Android default to enabling the new pipeline, citing custom drawing code as a concern. I'd still like to give it a whirl.

Quote:
Originally Posted by Romain Guy

It is not turned on by default for compatibility reasons. Not 100% of the Canvas API is supported when turned on (although the missing parts are very few and rarely used) and there might be bugs in the new implementation. There are also new constraints (for instance if you try to draw a bitmap larger than the maximum OpenGL texture size, it will fail.)

The new rendering pipeline also uses native display lists for each View, which triggers bugs in some apps. For instance, if a View relies on its parent to invalidate() to redraw itself, it's a bug in the app, but it "works" without hardware acceleration. It will however not work with hardware acceleration on.

Our goal is to make hardware acceleration on by default as soon as possible but we do not want to break apps. That said, apps using standard views and APIs should work just fine.

Does anyone have any idea as to whether a parameter could be modified on a system file in order to force all applications to behave as if they have the android:hardwareAccelerated flag turned on?

Thanks!
Last edited by willverduzco; 21st April 2011 at 09:13 PM.
The Following User Says Thank You to willverduzco For This Useful Post: [ View ]
21st April 2011, 10:54 PM   |  #2  
Chainfire's Avatar
Senior Moderator / Senior Recognized Developer - Where is my shirt?
Thanks Meter: 55,498
 
9,463 posts
Join Date:Joined: Oct 2007
Donate to Me
More
Yes. Mobile. Will explain later. And by yes I mean probably.
The Following 2 Users Say Thank You to Chainfire For This Useful Post: [ View ]
15th March 2013, 09:40 PM   |  #3  
Senior Member
Thanks Meter: 53
 
595 posts
Join Date:Joined: Feb 2010
Let's pretend that the reader has never heard of "AndroidManifest.xml".

How are we supposed to know where it is and how to edit it? I've done a complete search of the tablet and it is nowhere to be found.

I am trying to enable hardware accel in MythFrontend.
Post Reply Subscribe to Thread

Tags
gpu, hardware, hardware acceleration, rendering, skia
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes