1. 17 Oct, 2016 6 commits
    • Emmanuele Bassi's avatar
      gsk: Update Cairo renderer · df54c81d
      Emmanuele Bassi authored
      The Cairo renderer has been lagging behind a series of changes inside
      GskRenderer, like surface-less nodes, so it needs to be updated.
    • Emmanuele Bassi's avatar
      gsk: Make GskRenderer.render() drawing context-agnostic · 3ccd45b9
      Emmanuele Bassi authored
      We're going to need to allow rendering on a specific cairo_t in order to
      implement fallback code paths inside GTK; this means that there will be
      times when we have a transient GskRenderer instance that does not have a
      GdkDrawingContext to draw on.
      Instead of adding a new render() implementation for those cases and then
      decide which one to use, we can remove the drawing context argument from
      the virtual function itself, and allow using a NULL GdkDrawingContext
      when calling gsk_renderer_render(). A later commit will add a generic
      function to create a transient GskRenderer with a cairo_t attached to
      Renderers inside GSK will have to check whether we have access to a
      GdkDrawingContext, in which case we're going to use it; or if we have
      access to a cairo_t and a window.
    • Emmanuele Bassi's avatar
      gsk: Remove GskRenderer:auto-clear · 111a440d
      Emmanuele Bassi authored
      We control the clearing inside each GskRenderer implementation, and we
      don't allow providing a target surface any more.
    • Emmanuele Bassi's avatar
      gsk: Remove :use-alpha from GskRenderer · 5e973006
      Emmanuele Bassi authored
      It's unused, and we always assume we render with an alpha channel
      enabled because it's 2016.
    • Emmanuele Bassi's avatar
      gsk: Rework GskRenderer and GskRenderNode semantics · 9992e35c
      Emmanuele Bassi authored
      This commit changes the way GskRenderer and GskRenderNode interact and
      are meant to be used.
      GskRenderNode should represent a transient tree of rendering nodes,
      which are submitted to the GskRenderer at render time; this allows the
      renderer to take ownership of the render tree. Once the toolkit and
      application code have finished assembling it, the render tree ownership
      is transferred to the renderer.
    • Emmanuele Bassi's avatar
      Initial implementation of GSK rendering pipeline · a422f455
      Emmanuele Bassi authored
      GSK is conceptually split into two scene graphs:
       * a simple rendering tree of operations
       * a complex set of logical layers
      The latter is built on the former, and adds convenience and high level
      API for application developers.
      The lower layer, though, is what gets transformed into the rendering
      pipeline, as it's simple and thus can be transformed into appropriate
      rendering commands with minimal state changes.
      The lower layer is also suitable for reuse from more complex higher
      layers, like the CSS machinery in GTK, without necessarily port those
      layers to the GSK high level API.
      This lower layer is based on GskRenderNode instances, which represent
      the tree of rendering operations; and a GskRenderer instance, which
      takes the render nodes and submits them (after potentially reordering
      and transforming them to a more appropriate representation) to the
      underlying graphic system.