Commit Graph

7 Commits

Author SHA1 Message Date
Emmanuele Bassi
c337100c14 Use new introspection annotation syntax
Instead of the deprecated one.
2014-12-15 23:45:25 +00:00
Emmanuele Bassi
a64742f3e4 paint-node: Get the framebuffer from the root node
The PaintNode hierarchy should have the ability to retrieve the
current active framebuffer by itself, instead of asking Cogl using the
global state API.

In order to do this, we ask the root node of a PaintNode graph for the
active framebuffer. In the current, 1.x-compatibility mode we have two
potential root node types: ClutterRootNode, used by ClutterStage; and
ClutterDummyNode, used a local root for each actor. The former takes a
framebuffer as part of its construction; the latter takes the actor that
acts as the local top-level during the actor's paint sequence, which
means we can get the active framebuffer from the stage associated to the
actor.

By keeping track of the active framebuffer on the node themselves we can
drop the usage of cogl_get_draw_framebuffer() in their implementation.
2013-12-04 16:07:17 +00:00
Emmanuele Bassi
e3cbec48a8 paint-node: Initialize ClutterPaintOperation
Don't leave it to the compiler.
2012-03-20 16:19:23 +00:00
Emmanuele Bassi
8904f7cbe4 paint-nodes: Make part of the API internal
At least for the time being, we only expose the parts of the API that we
want to use internally and for new, out-of-tree Content implementations.

The full PaintNode tree API will be made public in 1.12 once we branch
master.
2012-03-16 12:33:40 +00:00
Emmanuele Bassi
e2f1153c46 paint-node: Remove redundant declarations 2012-03-16 12:33:37 +00:00
Emmanuele Bassi
f4d8fb054a paint-node: Use JSON-GLib for debug serialization
Instead of our homegrown string building; this at least ensures that
we're generating proper data, instead of random strings. Plus, using
JsonNode and JsonBuilder, we can ask the PaintNode subclasses to
serialize themselves in a sensible way.
2012-03-16 12:33:36 +00:00
Emmanuele Bassi
b83dc6abfa Add PaintNode, an element on the render object tree
Now that we have a proper scene graph API, we should split out the
rendering part from the logical and event handling part.

ClutterPaintNode is a lightweight fundamental type that encodes only the
paint operations: pipeline state and geometry. At its most simple, is a
way to structure setting up the programmable pipeline using a
CoglPipeline, and submitting Cogl primitives. The important take away
from this API is that you are not allowed to call Cogl API like
cogl_set_source() or cogl_primitive_draw() directly.

The interesting approach to this is that, in the future, we should be
able to move to a purely retained mode: we will decide which actors need
to be painted, they will update their own branch of the render graph,
and we'll take the render graph and build all the rendering commands
from that.

For the 1.x API, we will have to maintain invariants and the existing
behaviour, but as soon as we can break API, the old paint signal will
just go away, and Actors will only be allowed to manipulate the render
tree.
2012-03-16 12:33:35 +00:00