maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [BETA RELEASE] PhoneME Advanced (Java Mobile) (https://talk.maemo.org/showthread.php?t=81969)

Brian_7 2012-03-07 20:45

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
Did you add sound support for the n900?

Because in my game i can not heard anything and sound support still is on your todo list

santiago 2012-03-07 20:49

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
Brian sorry i made a mistake,
but sound event works on Microemu-demo :) by the way thx again

freemangordon 2012-03-07 20:51

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
@DavyP: There are 2 things you can try to increase performance. Search in Qt documentation for their effect.

First one is Fremantle specific, In your MainWindow constructor (in the same #ifdef..#endif block where WA_Maemo5AutoOrientation lives, place:
Code:

    setAttribute(Qt::WA_Maemo5NonComposited);
that may cause flickering, but I hope that won't happen, as you are double-buffering (AIUI)

Second tweak should work in both Fremantle and Harmattan, in your MainWindow constructor place:
Code:

setAttribute(Qt::WA_OpaquePaintEvent, true);
As you are repainting the whole widget area, there is no need Qt to draw the background first.

BTW I found a bug in your build using WA_Maemo5AutoOrientation:
If you enable "Enable portrait mode" in MIDlet Settings, then window appears rotated 90 degrees (shows landscape when in portrait and vice versa)

Hope the above will help you a bit, thanks a lot for your work, keep it that way :)

DavyP 2012-03-07 21:32

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
Quote:

Originally Posted by Brian_7 (Post 1176129)
Did you add sound support for the n900?

Because in my game i can not heard anything and sound support still is on your todo list

I only added some hardcoded audio samples for the MIDlet alert
messages. I hope the next steps to play custom samples will be
straightforward. If I also find a nice way to play tones of a particular
frequency and length, then I hope I will have most sound playback
support covered.

Unfortunately, MeeGo does not play ball (as the audio-playback does not seem to work on the N9).

Davy

DavyP 2012-03-07 21:40

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
Quote:

Originally Posted by freemangordon (Post 1176131)
@DavyP: There are 2 things you can try to increase performance. Search in Qt documentation for their effect.

First one is Fremantle specific, In your MainWindow constructor (in the same #ifdef..#endif block where WA_Maemo5AutoOrientation lives, place:
Code:

    setAttribute(Qt::WA_Maemo5NonComposited);
that may cause flickering, but I hope that won't happen, as you are double-buffering (AIUI)

Second tweak should work in both Fremantle and Harmattan, in your MainWindow constructor place:
Code:

setAttribute(Qt::WA_OpaquePaintEvent, true);
As you are repainting the whole widget area, there is no need Qt to draw the background first.

BTW I found a bug in your build using WA_Maemo5AutoOrientation:
If you enable "Enable portrait mode" in MIDlet Settings, then window appears rotated 90 degrees (shows landscape when in portrait and vice versa)

Hope the above will help you a bit, thanks a lot for your work, keep it that way :)

Thanks for the suggestions.

About the bug: The "Enable portrait mode" feature is only meant
for devices on which phoneME always starts in landscape mode.
So if auto-rotation works, you should not enable this feature.
With this feature enabled, I actually rotate the midlet 90 degrees.
That is why you are getting the landscape version in portrait mode
and vice versa if auto-rotation works.

Perhaps I should call the feature "Rotate midlet 90 degrees". That
description would be more accurate.

Davy

DavyP 2012-03-07 22:01

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
I added the above two tricks and used both JBenchmark and
JBenchmark2 to measure the performance improvement, and I get
overall scores that are up to 8% higher than without the two tricks. Not
world shocking, but a nice improvement nonetheless.

Davy

freemangordon 2012-03-07 22:22

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
Quote:

Originally Posted by DavyP (Post 1176172)
I added the above two tricks and used both JBenchmark and
JBenchmark2 to measure the performance improvement, and I get
overall scores that are up to 8% higher than without the two tricks. Not
world shocking, but a nice improvement nonetheless.

Davy

Sounds pretty enough for 2 lines of code :). And have in mind those affect only graphics.

EDIT:
non-compositing should have bigger effect in fullscreen

DavyP 2012-03-07 22:41

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
Quote:

Originally Posted by freemangordon (Post 1176184)
Sounds pretty enough for 2 lines of code :). And have in mind those affect only graphics.

EDIT:
non-compositing should have bigger effect in fullscreen

Yes, if I would get an average 5% performance improvement
for every two lines I add, I am willing to add even more lines like that :-)

BTW, I ran the benchmark in full screen. Perhaps to low
improvement is due to the fact I emit a Qt4 signal to trigger for
every midlet window update, and perhaps Qt4 is smart enough to
coalesce repaint events. Also note that the JBenchmarks probably
measure more than just the rendering speed.

Davy

freemangordon 2012-03-07 22:57

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
Quote:

Originally Posted by DavyP (Post 1176192)
Yes, if I would get an average 5% performance improvement
for every two lines I add, I am willing to add even more lines like that :-)

BTW, I ran the benchmark in full screen. Perhaps to low
improvement is due to the fact I emit a Qt4 signal to trigger for
every midlet window update, and perhaps Qt4 is smart enough to
coalesce repaint events. Also note that the JBenchmarks probably
measure more than just the rendering speed.

Davy

I have no idea how is your painting structured, but if you do a full QPixmap paint for every midlet window update, then it might be a good idea to set some clipping when painting the pixmap, that should boost the performance significantly (not that it is slow now, but you know, as Pooh says...)

DavyP 2012-03-07 23:22

Re: [TESTING] PhoneME Advanced (Java Mobile) prototype release
 
Quote:

Originally Posted by freemangordon (Post 1176202)
I have no idea how is your painting structured, but if you do a full QPixmap paint for every midlet window update, then it might be a good idea to set some clipping when painting the pixmap, that should boost the performance significantly (not that it is slow now, but you know, as Pooh says...)

PhoneME does provide midlet display repaint callbacks with
clipping ranges, but they are usually much bigger than the
bounding box of the pixels that have changed that it usually does
not make much of a difference when painting the full midlet
window or just the area within the clipping ranges.

Especially midlets that paint their own UI on a Canvas or
GameCanvas (like Opera Mini or J2ME Polish/LWUIT midlets),
this definitely does not make much of a difference. This was my
experience on Android, I have not tested this on the N900.

So, for the time being, I think the rendering speed is good enough
so I would rather focus on some more interesting features.

Davy


All times are GMT. The time now is 07:13.

vBulletin® Version 3.8.8