Plasma2, scene graph and stuff
Marco Martin
notmart at gmail.com
Fri Mar 4 20:13:22 CET 2011
Hi all,
since months we are repeating how beautiful plasma2 will be with scene graph
and how it will save the world ;)
for an overview of the planned changes at the moment, here it is:
http://community.kde.org/Plasma/libplasma2
abstract talk is nice, but to have a more clear idea
today i've been hacking on a little on a simple mock prototype to just check
if some needed things are possible, and if the api i'm thinking about makes
sense:
http://quickgit.kde.org/?p=scratch%2Fmart%2Fplasma2-proto.git&a=summary
to try it it's needed to build Qt from gitoious, staging clone, qml-
team/qtquick2 branch.
some interesting points are:
* it uses scene graph
* never the less it's able to custom paint plasma's FrameSvg without using
private api
* a plasma2 shell would just use QML and nothing else for the ui (so the
declarative scriptengine won't be an actual scriptengine anymore but "the"
way, other scriptengines could serve to have for instance an Applet
implementation in Python)
* there is a single global qdeclarativeengine
* Corona is not a scene: it's a (singleton) qobject that keeps track of
containments and creates views as needed, that are QSGCanvas (qsgview is as
useless as qdeclarativeview since bounds an 1:1 correspondence to view, qml
file and qdeclarativeengine, so i despise it as qdeclarativeview ;)
* Applet and Containment are just qobjects: they load their qml files in the
global qdeclarativeengine, then set themselves as "plasmoid" property in the
root item of said qml file
* at this point, i see it even feasible to not put scene graph stuff in
libplasma but keeping it quite generic, not sure it's worth the effort tough
this served also to make sure some features we need are present in scene
graph:
* it's possible to have a single qdeclarativeengine shared between multiple
scenes and views
* it's possible to migrate an object between two views (tough atm there is an
ugly bug on Text making the fonts unreadable since the glyph cache stays in
the old opengl context, hope it's solvable)
* it's possible to custom paint elements (there is a QSGPaintItem that seems
to be semi private, quite trivial to reimplement it with public api tough)
Cheers,
Marco Martin
More information about the Plasma-devel
mailing list