Hi,
hopefully I'm in the right category .. I've downloaded the ATI 3D Driver for the Topaz which really made a big improvement with the Lights.exe that is added to the post for testing... Looking at the message boxes that popup at application start it seems that the new driver really enables hardware acceleration on the device.
Then I created another test application using Qt. First I compiled the "raycasting" demo that was shipped with Qt (now use of OpenGL). It runs at ~11 FPS. Then I changed the sources to use a QtGLWidget for drawing (same App but with use of OpenGL). As it runs with only ~6 FPS it seems to not using the hardware acceleration feature of the device. But what's wrong with the app?
Does the ATI 3D driver just adds hardware acceleration for apps created with use of Microsofts D3D?
Or have I used the wrong libs for linking the Qt sources against so it doesn't use the correct driver on the device?
How do I have to create a application that uses the hardware acceleration on the device? (Use of M$ D3D or OpenGL, which libraries to link against ..)
Greetings BenPA
Related
As everyone know, a lot of modern mobile application developed using HTML5. It's simple to port them on other devices with different system using native webview or for example PhoneGap, etc, etc.
iOs, webOs and others do not have any problems with HTML5, but Android 3.x - have one big problem:
Starting from 3.0 hardware acceleration presented for android devices - http://android-developers.blogspot.com/2011/03/android-30-hardware-acceleration.html
And if you use webview - it's not possible to play video or flash without hardware acceleration, it's enabled by default in native browser and other apps and in theory should increase performance. It look like everything is ok, but WHEN YOU ENABLE HARDWARE ACCELERATION - PERFORMANCE OF YOU HTML5 APP BECOME VERY POOR, 2-3 TIMES LESS THAN WITHOUT ACCELERATION.
Tested on 3.0, 3.1, different ROMs, 2x 7500 and 2x 7510 samsung devices and on 2x acer iconia tab a500.
Please check attachments:
test_hw_acc_enabled_3.1.apk - test application that show difference between two WebViews with hardware acceleration enabled and disabled. Top view - HA enabled (and very slow), bottom view - HA disabled (fast, but not so fast as we want because of no hardware acc.)
test_hw_acc_enabled_3.1.rar - android sources with html5/javascript page in assets (index.html).
Please note, that if you run this page in native browser that is pre-installed on Samsung Galaxy Tab 10.1 - you'll get same lags because HW acceleration enabled in this browser by default. So all Tegra 2 advantages lost here even in comparison with my 800mhz phone on Android 2.1.
No any 3rd-party libs or plugins used, here is small description:
Android sources:
AndroidManifest.xml :
enabling HW accell on application level
Code:
<application android:icon="@drawable/icon" android:label="@string/app_name" android:hardwareAccelerated="true" >
hw_webview.java:
Code:
final WebView myWebView_hw_acc_enabled = (WebView) findViewById(R.id.webView1);
WebSettings webSettings1 = myWebView_hw_acc_enabled.getSettings();
webSettings1.setJavaScriptEnabled(true);
myWebView_hw_acc_enabled.setWebChromeClient(new WebChromeClient());
//enable hardware acceleration for the 1st view, this line can be skipped
//as acceleration enabled on application level by AndroidManifest.xml
myWebView_hw_acc_enabled.setLayerType(WebView.LAYER_TYPE_HARDWARE, null);
myWebView_hw_acc_enabled.loadUrl("file:///android_asset/www/index.html");
final WebView myWebView_hw_acc_disabled = (WebView) findViewById(R.id.webView2);
WebSettings webSettings2 = myWebView_hw_acc_disabled.getSettings();
webSettings2.setJavaScriptEnabled(true);
myWebView_hw_acc_disabled.setWebChromeClient(new WebChromeClient());
//disable hardware acceleration for the 2nd view
myWebView_hw_acc_disabled.setLayerType(WebView.LAYER_TYPE_SOFTWARE, null);
myWebView_hw_acc_disabled.loadUrl("file:///android_asset/www/index.html");
index.html - simple setInterval used with 60fps estimate (move by 1px every 15 ms), with additional plugins (example:jQuery.animate) or libs we have much more lags:
Code:
<div id="box" style="left:50px;top:50px;width:150px;height:100px;position:absolute;background:#000;"></div>
<script>
var left = 50; //initial position
var delta = 1; //pixels per iteration
var dir = 1; // direction 1/-1
function move()
{
var div = document.getElementById('box'); //get box
if ((left>500)||(left<50)) dir = dir * -1; //change direction
left = left + delta*dir; //change position
div.style.left = left+'px'; //update style with new position
}
setInterval("move()",15); //every 15ms - 60fps estimate
</script>
Example is only for simple html and javascript, but other modern features like CSS transitions, etc - have same problem.
Any idea how to fix this? I need HA enabled with expected performance increased but not decreased. As far as I understand - this is very big problem for android 3.0, because HTML5 is very popular and qty of HTML5 mobile application will only grow. Note that other modile systems work correctly (even 1st ipad and my motorola defy faster in HTML5 than overclocked honeycomb tegra 2 device)
I wonder if its because of the actual drivers being used. Is the video driver used by the kernel compiled in or insmod loaded during boot? I really havnt looked at how each driver is loaded in regards to Tegra 2 SOC.
Super wishful thinking would hope that maybe nVidia has a newer driver we could slap down and benchmark with HW accelleration?
Also... On my Tab with the test apk you made, two webviews actually start out at the same speed then the hardware accellerated one begins to lag at roughly 2 seconds into the movement across.
It never regains that same speed as the non accellerated view so its not likely a GC running/inducing issue as it would likely speed up after the GC event (assuming it doesnt cause continous calls to the garabage collector).
3.2?
any new ideas?
may be someone can run attached application on tablet with android 3.2 - just to check if bug fixed?
tested on acer iconia tab with 3.2 - same problem ;(
I tested this on Asus Transformer TF101 (Andoid 3.2.1) and the issue exists there too.
Tested on Samsung galaxy tab 10.1. Same problem
Sent from my GT-P7500 using Tapatalk
Anyone have benchmarked accelerated webview performance of Android 4.0?
Same problem here and with Android 4 on Galaxy Nexus,
android hardware acceleration is something that works bad and the problem is that they don't have fixed it yet.
sblantipodi said:
Same problem here and with Android 4 on Galaxy Nexus,
android hardware acceleration is something that works bad and the problem is that they don't have fixed it yet.
Click to expand...
Click to collapse
Damn, hate it when I accidentally hit the "thanks" button...
BTW- this thread is 1) long dead, 2) discussing android 3.1 on a tablet, not android 4.0 on a phone.
slack04 said:
Damn, hate it when I accidentally hit the "thanks" button...
BTW- this thread is 1) long dead, 2) discussing android 3.1 on a tablet, not android 4.0 on a phone.
Click to expand...
Click to collapse
Is this thread expired?
I saied that I have the same problem on the tablet and on the android 4 device.
I know I'm late to this thread but the way you are doing your move is wrong. When you do DOM manipulation (by setting left/right) you force a repaint, which means you get none of the benefits of hardware acceleration and all of the downsides. You need to use CSS 3D transforms instead, which allows the browser to avoid repainting entirely making it silky smooth as a result.
Hi All, this is my first post here so here i come!
We're developing an app that uses video to texture spheres and render panoramas.
The way we did until now was to use ffmpeg to do software decoding of a video (our sources are really big, on full scale it's a 5700x2400 image).
The problem is that it's not really feasible, it's way too slow.
So we tried to hardware decode stuff on the gpu: but the problem is that the decoded data is not memory accessible: the accelerated methods in the mMediaPlayer class are only for playback, we cannot really manipulate data into a textured sphere.
We tried to work with api 14 (ICS), and there's a native method that's been added to the class that makes things go remarkably well even at highres:
Code:
mTexture = new SurfaceTexture(texId);
mTexture.setOnFrameAvailableListener(this);
Surface surface = new Surface(mTexture);
this.mMediaPlayer.setSurface(surface); // set Surface exists since API 14
Our problem is, while there's the homebrew scene and all, we really have to complete the job on 3.2
Do you reckon anything that could help us solving this annoying 3.2 limitation?
Maybe we've overlooked something. Or maybe there's some third party module that decodes using hw acceleration that we didn't know of (some obscure ffmeg fork maybe?)
We also thought about going through all the sourcecode from 3.2 and 4.0, deriving a class from upstream (where the two versions are similar) and ther rework our code backwards to implement that functionalityon 3.2 using 4.0 as a blueprint, but it seems as overkill as it gets.
And we don't have that much time left until the end of the project.
Thanks in advance to everybody that's reading and for the answers!
Max
Recently I have been trying to determine whether the atrix supports anti-aliasing in 3d applications. It seems that it does not, as I have yet to see it used in various apps. Also, the chainfire 3d driver says "MSAA not supported by your gpu" - so it seems like it does not. However, in the initial demo videos (before the atrix was released) of both NFS: Shift and Epic Citadel have antialiasing. Also in samurai II the graphics do appear to be antialiased - so this is why I am curious:
Does the atrix support antialiasing?
Tegra 2 doesn’t support MSAA. Apparently you can only use coverage sampling anti-aliasing (CSAA).
Huh, very interesting. CSAA is nvidia's sort of optimized version of MSAA, available through propriety APIs I assume? I am thinking that there is probably no way to make existing apps use CSAA - but is that true? It would be really cool to make an intermediary driver (something like ChainFire 3d) which would let apps utilize CSAA when they would normally on other devices be using MSAA - that would probably involve intercepting API calls and converting them...
Maybe it would be possible to make a plugin for chainfire 3d that would do that - it would be really cool to have tegras built in 5x CSAA work with any app!
Ideas anyone?
Sent from my MB860 using xda -developers app
Noticed that this got moved: my apologies mod for the wrong section - thank you!
Does anyone have any thoughts on a cf3d plugin? When ChainFire returns I intend to ask him if it is a conceivable idea or not.
my father gave me a tablet as a present which only used for less than 1 month. The tablet is stuck of the android logo and i have tried to reboot it using the volume key and the on button but its not working. It was in a box but no manufacturer's name is written on it all that is written is android tablet pc. I cant open my tablet to see all the details about it all i have is a user manual with the following specifications.
Basic function
OS Android 4.0
CPU ARM Cortex-A8 1GHz - 1.5GHz
RAM 512M-1GB(optional)
ROM Nand Falsh 4GB/8GB/16GB(Optional)
LCD 7' 8' 9.7'(OPTION) HP display
Touch panel Capacitive/Resistance Touch Panel(Optional)
2D/3D AMD graphic acceleration, full support
Graphic Open GL ES2.0(AMD Z340)and Open VG1.1(AMD Z160)@27M Tri/sec
WIFI wireless Support 802.11b/g/n standard, highesttransmission get to 300Mbps,support local WAPI wireless protocol standard
3G Built-in 3G Module(option), WCDMA/HSDPA,supoort calling, message, Wifi ad hoc
TF expansion for optional 3G module to realise 3G communication. External MICRO SD(TF)slot.Max. 32GB TF card
USB USB high speed 2.0. Can be connected to the computer to copy files
VPU Maximum support hardware decoding 720P and 1080i, and 480 video encoding
Gravity Built-in 3D gravity sensor to make screen realize360degree rotation
Audio support gravity sense operation game. AC'97 full duplex codec, support AAC/AMR/MP3/WMA/WAV/MIDI and so on
Video WMV/ASF/MP4/3GP/AVI/MKV/VC-1/DIVX/MPEG-2/MPEG-4/H.263/H.264 720P HD 10S0i
Game Support several of entertainment games based on Android platform.
Web Support many-internet applications like web, social,video,chatting and so on.
E-book Assemble e-book tool to read based on android platform
Photo Frame Built-in photo player, and take it as a photo frame or calender
Office Support various of office software based on Abdroid platform, to realize office functions, Such as Word/Excel/PPT/PDF
Flash a custom rom using flashtool supporting ur tab.
Or better search Google if u find info about ur tab go to service center
Sent from moon to earth........
I am just curious to know what benefit X86 support would have?
it says "cross-platform support on ARM, x86, and MIPS technology"
so does it mean that now it will be easy to install new android on my X86 laptop running core i3?
also i think that if android now natively supports X86 so it would be easy to make it an OS for desktop with some tweaking in UI element to make it keyboard and mouse friendly...(PS: i dont have much knowledge of software development)
i use windows mainly for playing AAA PC games(only thing android cant do for me),i wish android to one day support high end graphic cards like nvidia gtx 780 along with developers support for AAA games that would be a dream come true situation for me because then i could ditch costly windows altogether :laugh:
waqarakram0306 said:
I am just curious to know what benefit X86 support would have?
it says "cross-platform support on ARM, x86, and MIPS technology"
so does it mean that now it will be easy to install new android on my X86 laptop running core i3?
also i think that if android now natively supports X86 so it would be easy to make it an OS for desktop with some tweaking in UI element to make it keyboard and mouse friendly...(PS: i dont have much knowledge of software development)
i use windows mainly for playing AAA PC games(only thing android cant do for me),i wish android to one day support high end graphic cards like nvidia gtx 780 along with developers support for AAA games that would be a dream come true situation for me because then i could ditch costly windows altogether :laugh:
Click to expand...
Click to collapse
Well yeah it will improve the support. But it's already done. I mean, android as a pc os (without tweaking them ). Check this site
www.android-x86.org
The android l is just gonna improve this project and make him better. About tweaking theme, the best solution i can offer is to install xposed and xhalowindow (if its called that i cant remember) and install a launcher (right now there isn't a launcher that is look just like windows, so it's need to be developed, I think it is time to do so with the new 2014 google android tv, I mean to make and old pc a google android tv and make the best of the old device)
The android x86 work with usb input, any gpu, LAN, wifi, bluetooth, mouse, pad, keyboard, microphone, camera and multitouch and more
The only weaknesses is that a lot of apps that doesn't support x86 prossesor (only ARM prossesor) will bring force close. It doesn't mean that all the ARM apps, but a lot of them. Another weakness is that apps that doesn't support rotation, will rotate all the screen untill shutdown (unless you'll install an app that force landscape rotation everywhere)