Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,809,359 Members 40,167 Now Online
XDA Developers Android and Mobile Development Forum

Enabling 2D Hardware Acceleration in all Apps?

Tip us?
(Last edited by willverduzco; 21st April 2011 at 08:13 PM.)
willverduzco's Avatar
Portal Administrator - OP
Thanks Meter 2,851
Posts: 6,323
Join Date: Apr 2010
Location: n͖̜̺y̥͔̗̝̠̩̜c̖͙͇̲̞

Default Enabling 2D Hardware Acceleration in all Apps?

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:
<application android:hardwareAccelerated="true">...</application>
Additionally, the 2D HW Acceleration pipeline can be turned on and off for individual activities within each application:
<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.

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?

Want something on the XDA Portal? Send us a news tip! - [moderate | film | foto | develop]
The Following User Says Thank You to willverduzco For This Useful Post: [ Click to Expand ]
Chainfire's Avatar
Senior Moderator / Senior Recognized Developer - Where is my shirt?
Thanks Meter 49,938
Posts: 9,085
Join Date: Oct 2007

Yes. Mobile. Will explain later. And by yes I mean probably.
BLOG - G+(Chainfire) - G+(Personal) - TWITTER - IRC - PAYPAL - BTC 1JeoxivKEXbbiegsv1BrUC7fD7GgSPcqkG

A proper quote includes only the relevant paragraphs, and a proper post never ends with the word "why"


HTC G1, Hero, One
LG G Pad 8.3, G Watch, G3
Moto E
Samsung i5800, i9000*2, P1000*2, P7100, i9100*2, N7000, P6800, i9300, N7100, i9505, N9005, G900F
Sony T LT30p, Z C6603
Nexus Galaxy*2, N7*2, N10, N7-2013, N7-2013-3G, N5

SuperSU, Mobile ODIN, TriangleAway, DSLR Controller, CF-Root, 500 Firepaper, OpenDelta, USB Host Diagnostics, ExynosAbuseAPK, Live dmesg+logcat, NoMoarPowah!, CF-Bench, Chainfire3D, CF.lumen, SGS2 SIM Unlocker, GingerBreakAPK, SuperPower, and more!

Windows Mobile 5/6
E-Mobile EM-ONE
HTC Wizard*2, Kaiser, Touch, Diamond, Pro, HD*2, Diamond 2, Pro 2*2, HD2*2
Samsung i780, i900*2, i8000*2, b7300, b7320, b7330, b7620*2, b6520

WMWifiRouter, KaiserTweak, FPUEnabler, WMLongLife, WMRegOptimizer, CFC+GUI, TF3D+v2 ports, Kaiser+Omnia2+Snapdragon 3D drivers, GfxBoost, and more!

Windows Phone 7
LG GW910

Apple iPad 3, iPad Mini 2

NOTICE: I do not respond to tech support questions through PM.
The Following 2 Users Say Thank You to Chainfire For This Useful Post: [ Click to Expand ]
Senior Member
Thanks Meter 51
Posts: 584
Join Date: 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.
gpu, hardware, hardware acceleration, rendering, skia
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes