Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,733,782 Members 45,800 Now Online
XDA Developers Android and Mobile Development Forum

Enabling 2D Hardware Acceleration in all Apps?

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

 
DONATE TO ME
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:
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!
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
Old
#2  
Chainfire's Avatar
Senior Moderator / Senior Recognized Developer - Where is my shirt?
Thanks Meter 48706
Posts: 8,982
Join Date: Oct 2007

 
DONATE TO ME
Yes. Mobile. Will explain later. And by yes I mean probably.
BLOG - G+(Chainfire) - G+(Personal) - TWITTER - IRC - DONATE

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

Android
HTC G1, Hero, One
Samsung i5800, i9000*2, P1000*2, P7100, i9100*2, N7000, P6800, i9300, N7100, i9505, N9005
Sony T LT30p, Z C6603
Nexus Galaxy*2, N7, N10, N7-2013

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

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 ]
 
Quantumstate
Old
#3  
Senior Member
Thanks Meter 51
Posts: 579
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.
Tags
gpu, hardware, hardware acceleration, rendering, skia
Thread Tools
Display Modes