jsanim: current status

March 30, 2010 at 2:00 pm 3 comments

From my previous post about jsanim (javascript animations) where I explained the motivations about the idea, I’m writing to report the current status.

I got stuck while trying to create an instance of a javascript class from C++ side in QScriptEngine, but I was helped by khansen (you rock man!).

Being able to create an instance got to address an important issue in the first PoC: run more than 1 animation. Now each animation type will have a javascript class, where its instance will point to the animation target widget and hold the animation parameters. This design has some advantages:

  • uses a single QScriptEngine object (implemented as a singleton);
  • can run multiple animations;
  • multiple animations can access the same widget;
  • is more OOP oriented (the animation loop will call a method on the javascript class);

How fast (or slow…) is it to use QScriptEngine to animate a widget’s properties? What about a video?

[blip.tv ?posts_id=3433718&dest=-1]

Notes: it has 8 QGraphicsWidgets, 24 animation objects (zoom, fade, rotate), running in the Nokia N5800.

What is next is profiling and comparing it against our Plasma::Animation classes doing preferably the same type of work. But since it is still in the very early beginning, it is already looking promising.

Advertisements

Entry filed under: KDE, mobile, Qt.

Secure memory (a.k.a. mlock) Lies, big fat lies and benchmarks

3 Comments Add your own

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed


Calendar

March 2010
M T W T F S S
« Feb   Apr »
1234567
891011121314
15161718192021
22232425262728
293031  

Most Recent Posts


%d bloggers like this: