1. 20 Dec, 2016 16 commits
    • Benjamin Otte's avatar
      gtk: Remove GtkJunctionSides · 95a2a5c5
      Benjamin Otte authored
      95a2a5c5
    • Benjamin Otte's avatar
      gsk: Add GskShadowNode · 2480e0d5
      Benjamin Otte authored
      ... and make the icon rendering code use it.
      
      This requires moving even more shadow renering code into GSK, but so be
      it. At least the "shadows not implemented" warning is now gone!
      2480e0d5
    • Benjamin Otte's avatar
      snapshot: Implement gtk_snapshot_push_opacity() · 9822fe81
      Benjamin Otte authored
      Use it in GtkWidget's opacity handling.
      9822fe81
    • Benjamin Otte's avatar
      6b29dbf2
    • Benjamin Otte's avatar
      gsk: Add support for rounded clip rectangles · 23e35706
      Benjamin Otte authored
      Also add support to GtkSnapshot, so people can push rounded clips.
      23e35706
    • Benjamin Otte's avatar
      snapshot: Work on pushing and popping again · 1137483d
      Benjamin Otte authored
      It is now possible to call push() subfunctions for simple container
      nodes with just a single child. So you can for example
      gtk_snapshot_push_clip() a clip region that all the nodes that get
      appended later will then obey.
      
      gtk_snapshot_pop() will then not return a container node, but a clip
      node containing the container node (and similar for the transform
      example).
      
      This is implemented internally by providing a "collect function" when
      pushing that is called when popping to collects all the accumulated
      nodes and combine them into the single node that gets returned.
      
      To simplify things even more, gtk_snapshot_pop_and_append() has been
      added, which pops the currently pushed node and appends it to the
      parent.
      
      The icon rendering code has been converted to this approach.
      1137483d
    • Benjamin Otte's avatar
      snapshot: Add API for colors and textures · b1200756
      Benjamin Otte authored
      b1200756
    • Benjamin Otte's avatar
      snapshot: Change how gtk_snapshot_push/pop works · 02131d59
      Benjamin Otte authored
      Instead of appending a container node and adding the nodes to it as they
      come in, we now collect the nodes until gtk_snapshot_pop() is called and
      then hand them out in a container node.
      
      The caller of gtk_snapshot_push() is then responsible for doing whatever
      he wants with the created node.
      
      Another addigion is the keep_coordinates flag to gtk_snapshot_push()
      which allows callers to keep the current offset and clip region or
      discard it. Discarding is useful when doing transforms, keeping it is
      useful when inserting effect nodes (like the ones I'm about to add).
      02131d59
    • Benjamin Otte's avatar
      snapshot: Handle clip region as part of the state · ca80e9de
      Benjamin Otte authored
      This is in preparation for further changes.
      ca80e9de
    • Benjamin Otte's avatar
      gsk: gsk_render_node_set_transform() => GskTransformNode · 67fb129e
      Benjamin Otte authored
      Instead of having a setter for the transform, have a GskTransformNode.
      
      Most of the oprations that GTK does do not require a transform, so it
      doesn't make sense to have it as a primary attribute.
      
      Also, changing the transform requires updating the uniforms of the GL
      renderer, so we're happy if we can avoid that.
      67fb129e
    • Benjamin Otte's avatar
      19753062
    • Benjamin Otte's avatar
      gsk: Remove gsk_render_node_set_bounds() · 3eb7c471
      Benjamin Otte authored
      gsk_render_node_get_bounds() still exists and is computed via vfunc
      call:
      - containers dynamically compute the bounds from their children
      - surface and texture nodes get bounds passed on construction
      3eb7c471
    • Benjamin Otte's avatar
      gsk: Add gsk_container_node_new() · a97b819b
      Benjamin Otte authored
      It replaces gsk_renderer_create_render_node() which was doing the eact
      same thing, only taking an unused extra argument.
      a97b819b
    • Benjamin Otte's avatar
      gtk: Remove gtk_snapshot_append() · 8830a1a1
      Benjamin Otte authored
      It does not make sense to append an empty container node. Those should
      only be push()'d.
      8830a1a1
    • Benjamin Otte's avatar
      gsk: Add gsk_cairo_node_new() · 52d2faef
      Benjamin Otte authored
      Split off Cairo drawn content nodes and require you to allocate them
      using this new function.
      52d2faef
    • Benjamin Otte's avatar
      gtk: Don't push cairo nodes · d1b80a6b
      Benjamin Otte authored
      We want to split nodes into containers and nodes that do actual drawing.
      So pushing nodes that do drawing is exactly the wrong thing.
      
      Also fix up GtkPopover. There's no need for it to push anything.
      d1b80a6b
  2. 09 Dec, 2016 1 commit
  3. 07 Dec, 2016 1 commit
  4. 26 Nov, 2016 1 commit
  5. 18 Nov, 2016 2 commits
  6. 17 Nov, 2016 4 commits
    • Benjamin Otte's avatar
      snapshot: Implement gtk_snapshot_clips_rect() · ab60cbd8
      Benjamin Otte authored
      And use this to cull widgets and gadgets that are completely outside the
      clip region.
      
      A potential optimization is to apply this clip region to cairo contexts
      created with gtk_snapshot_append_cairo_node(), but for that we'd need to
      apply the inverse matrix to the clip region, and that causes rounding
      errors.
      
      Plus, I hope that cairo drawing becomes exceedingly rare so it won't be
      used for the whole widget factory like today (which might also explain
      why no culling happens in the widget factory outside the header bar.
      ab60cbd8
    • Benjamin Otte's avatar
      28b32d33
    • Benjamin Otte's avatar
      snapshot: Add GtkSnapshotState · 7493f906
      Benjamin Otte authored
      Essentially copies cairo_gstate_t.
      
      This is in preparation for attaching more information to the snapshot.
      7493f906
    • Benjamin Otte's avatar
      snapshot: Fix graphene misunderstandings · 5dfe788e
      Benjamin Otte authored
      The equivalent to cairo_matrix_multiply (a, b, c) is
      graphene_matrix_multiply (c, b, a).
      
      graphene_matrix_multiply (a, b, c) may not be called with b and c being
      the same matrix.
      5dfe788e
  7. 16 Nov, 2016 2 commits
    • Benjamin Otte's avatar
      snapshot: Add infrastructure to snapshot CSS images · 6d9725f7
      Benjamin Otte authored
      Use this infrastructure to render builtin images. Which means from now
      on, GtkCheckbutton, GtkSpinner and a few others use snapshots.
      6d9725f7
    • Benjamin Otte's avatar
      gsk: Rework GskTexture · 40565fb0
      Benjamin Otte authored
      We do no longer bind textures to a renderer, instead they are a way for
      applications to provide texture data.
      
      For now, that's it. We've reverted to uploading it from scratch every
      frame.
      40565fb0
  8. 15 Nov, 2016 9 commits