Canvas.drawBitmap performance on Android 4.3 - android

I have two Samsung S4, one is 4.2.2, the other 4.3. I am running the same game, which is drawn on SurfaceView. On 4.2.2 drawing takes about 30ms, while on 4.3 almost 100ms. Drawing is performed from the other thread. I have checked, that the problem is with drawBitmap method. Any suggestion how to fix it? The problem appears only on S4 with Android 4.3. I also checked on Nexus 7 with 4.4.2, everything is ok.

Related

Unity3D spotlight glitch on Samsung S6 and S7 edge

We are developing a motorbikes racing game under Unity 5.3.4p4 for Android.
I have a spotlight attached to a gameobject (the motorbike), the farther it is from the center of the world (0, 0) the more unstable/shaking it becomes when moving. I've tested on many devices with different GPU and Android versions but this only happens in Samsung Galaxy Edge S6 and S7 devices (MALI GPU).
Does anyone has the same problem or know any solution for this?.
Thanks for your time.
EDIT:
After a lot of testing there seems to work fine only using Deferred instead of Forward rendering and enabling OpenGLES3, at least for the S7, the S6 has the same problem no matter what I do.
I've also tried downgrading to Unity 5.2.5 and upgrading to unity 5.3.5 without success.
As #Paul-Jan says, it seems it also affects iOS: https://community.unity.com/t5/Graphics/Problems-with-spotlight-on-mobile-precision-issue/td-p/2473711

strange performance on galaxy note 3 with canvas

I've got a game, canvas based, hardware accelerated, on android.
The game is smooth and run at 40-50 fps on a galaxy note 1, galaxy S3.
I tested it today on a galaxy note 3... and it's quite slow... 20fps, graphics are slow and every mp3 sound play provokes a little freeze.
'pro' games with this galaxy note 3 don't have any problems.
I'm quite surprised that my game is slow with such a recent phone, but not with older ones... I probably do something wrong... any ideas ?

Canvas not rendering on Android 4.2.2

Steps of reproduction:
Use 4.2.2. Android system (but not cyanogen mod since the issue is fixed there)
Make a webview and serve it a canvas element through a server
You get a black screen / it does not render canvas at all
Correct behaviour:
You serve it a canvas element and it renders what it is on it. It works on all possible android versions we were able to test except the 4.2.2. .
We confirmed the problems on at least these devices which are at the moment running this version of Android: Moto G, Samsung Galaxy SII, Samsung Galaxy SIII , Samsung Galaxy SIV, HTC One X, HTC One S mini...
I presume the bug is already known but i was not able to find it or more accurately not able to find any way of reproduction. If anyone knows if there is any workaround it would be nice
you can try this, it work for me on HTC device:
in html:
<canvas style="background-image:-webkit-canvas(mask);" />
in javascript:
var ctx = document.getCSSCanvasContext("2d", "mask", 150, 80);
//now you free to use canvas normally

Bad performance when scrolling on Android 4.3 with Nexus 10

My app, which has a list view with some scrolling, is performing very well (scrolling at 60fps) on all phones I have tested it with, Nexus One, Nexus 4 and Galaxy S3/4. But the performance is terrible on the Nexus 10, probably around 15fps or so.
I have analysed it to be the Execute part of the graphics pipeline. I have attached a screenshot of a Nexus 10 and a Nexus 4, which are running Android 4.3 and no funny stuff.
The UI is even drawn at the same size, with approx the same amount of pixels. So it is just covering some 20% of the surface on the Nexus 10 and 90% of the surface on the phones. This means that it's not the number of pixels that's the problem. Also, I have checked so that when I scroll, it is only the scrolling area that are updated, not the entire screen.
What I am wondering is, how do I find out what is causing the show Execute phase on the Nexus 10?
Cheers,
Mikael
I had troubles with scrolling when a lot of NumberPickers where on the screen. So slow!!
"Mihael Grev" advice mainView.setLayerType(View.LAYER_TYPE_HARDWARE, null);

OpenGL ES 2.0 doesn't render on Android 4.0.3

I'm writing completely native OpenGL ES 2.0 game engine for Android. Previously I developed with Samsung Galaxy S (Android 2.3.3) and now with Samsung Galaxy S II (updated to Android 4.0.3). I didn't try the engine on Galaxy S II while it still had Android 2.3.3 (hardware specific problem?).
Now the engine runs and renders fine on Android 2.3.3 (tested on Galaxy S), but it doesn't render on Android 4.0.3 (tested on Galaxy S II). The problem is similar to this: OpenGL Renderer not working on Ice Cream Sandwich
Everything else works without problems on 4.0.3 except the rendering, nothing appears on the screen. I managed to render a single triangle on 4.0.3 but a vertices extracted from a model won't render (using glDrawElements()) with or without textures.
I hope there is a simple solution for this.
Cheers
I should have checked GL errors earlier. The problem occurred with glDrawElements(), where I used GL_UNSIGNED_INT (GL_UNSIGNED_BYTE and GL_UNSIGNED_SHORT are only allowed values). Android 2.3.3 didn't seem to care about that. I changed it to GL_UNSIGNED_SHORT and now it works perfectly.

Categories

Resources