1. 04 Sep, 2021 1 commit
  2. 03 Sep, 2021 1 commit
    • Matthias Clasen's avatar
      gsk: Add font options to text nodes · f1347f58
      Matthias Clasen authored
      Since font options affect how the glyphs get rendered,
      we need to pass the font options down from the gtk level
      to where the glyph cache is populated.
      Add a new gsk_text_node_new_full api that takes a
      cairo_font_options_t in addition to the other parameters.
  3. 30 Aug, 2021 1 commit
  4. 11 Mar, 2021 1 commit
  5. 07 Mar, 2021 1 commit
  6. 17 Feb, 2021 1 commit
  7. 08 Feb, 2021 3 commits
    • Christian Hergert's avatar
      gsk: make gsk_render_node_get_node_type() use const · 86c5f2df
      Christian Hergert authored
      There isn't any state to modify in the type so we can use const here.
      Doing so allows some of the renderer code to use const across a
      number of functions so that repeated calls are elided if inlined.
    • Christian Hergert's avatar
      gsk: make render node getters pure · 09b447a9
      Christian Hergert authored
      These do not do modify anything so they can be marked as pure to
      potentially ellide calls. Since they do dereference, I do not believe
      we can make them const although that is unclear since we could technically
      just return a pointer + offset. Therefore it *might* be possible to also
      make these G_GNUC_CONST.
    • Christian Hergert's avatar
      gsk: make render node getters const · 161ddcfa
      Christian Hergert authored
      This also removes the return if fail macros from these as a good portion
      of them didn't have them anyway. I think it's fair to say that access to
      these incorrectly is a programmer error.
      It significantly reduces the amount of code generated into generally a
  8. 27 Jan, 2021 1 commit
  9. 02 Dec, 2020 1 commit
  10. 01 Dec, 2020 1 commit
  11. 17 Nov, 2020 2 commits
    • Benjamin Otte's avatar
      rendernode: Rename all gsk_render_node_peek_*() functions · f2284ff4
      Benjamin Otte authored
      Those are getters, they should be gsk_render_node_get_*() functions.
    • Matthias Clasen's avatar
      gsk: Avoid using gtk css types in public api · 121e61cf
      Matthias Clasen authored
      Using GtkCssSection in public headers here may be
      ok from the C perspective, since it all ends up in
      the same library anyway. But it causes circular
      dependency problems for our gir files that are still
      split by namespace.
      To avoid this problem, copy the GtkCssLocation struct
      struct as GskParseLocation, and pass take two of them
      instead of a GtkCssSection in the error callback.
      Update all users.
      Fixes: #2454
  12. 29 Sep, 2020 1 commit
    • Alexander Larsson's avatar
      Add GskGLShaderNode and GskGLShader · 7ea755e2
      Alexander Larsson authored
      A GskGLShader is an abstraction of a GLSL fragment shader that
      can produce pixel values given inputs:
       * N (currently max 4) textures
       * Current arguments for the shader uniform
      Uniform types are: float,(u)int,bool,vec234)
      There is also a builder for the uniform arguments which are
      passed around as immutable GBytes in the built form.
      A GskGLShaderNode is a render node that renders a GskGLShader inside a
      specified rectangular bounds. It renders its child nodes as textures
      and passes those as texture arguments to the shader. You also pass it
      a uniform arguments object.
  13. 18 Sep, 2020 2 commits
  14. 08 Apr, 2020 2 commits
    • Emmanuele Bassi's avatar
      Add get_type() functions for GskRenderNode subclasses · e0323fcd
      Emmanuele Bassi authored
      The introspection scanner tries to match a type name with a get_type()
      function, in order to correctly identify a type as a class.
      If the function is not available, we have two choices:
       - add some special case inside the introspection scanner, similar to
         how GParamSpec subclasses are handled in GObject
       - add a simple get_type() function
      The latter is the simplest approach, and we don't need to change that
      much, since we still register all render nodes at once.
    • Emmanuele Bassi's avatar
      Turn GskRenderNode into a derivable type · d701a892
      Emmanuele Bassi authored
      Language bindings—especially ones based on introspection—cannot deal
      with custom type hiearchies. Luckily for us, GType has a derivable type
      with low overhead: GTypeInstance.
      By turning GskRenderNode into a GTypeInstance, and creating derived
      types for each class of node, we can provide an introspectable API to
      our non-C API consumers, with no functional change to the C API itself.
  15. 09 Feb, 2020 1 commit
  16. 07 Jan, 2020 2 commits
  17. 27 Nov, 2019 1 commit
    • Emmanuele Bassi's avatar
      Use a single compilation symbol · def70073
      Emmanuele Bassi authored
      We use a compilation symbol in our build to allow the inclusion of
      specific headers while building GTK, to avoid the need to include only
      the global header.
      Each namespace has its own compilation symbol because we used to have
      different libraries, and strict symbol visibility between libraries;
      now that we have a single library, and we can use private symbols across
      namespaces while building GTK, we should have a single compilation
      symbol, and simplify the build rules.
  18. 11 Oct, 2019 1 commit
  19. 25 May, 2019 1 commit
  20. 21 May, 2019 2 commits
    • Benjamin Otte's avatar
      rendernodeparser: Allow parsing strings · b90a66ca
      Benjamin Otte authored
      Instead of only allowing for glyph indexes, allow ASCII characters as
      replacements. So this glyph sequence
        glyphs: 65 8, 66 8, 67 8
      Can be replaced by
        glyphs: "ABC"
      provided that the glyph for "A", "B" and "C" are 65, 66 and 67
      respectively and their advance is exactly 8.
      x offset and y offset must always be 0 and every glyph must start a
    • Benjamin Otte's avatar
      rendernode: Take a graphene_point_t for the offset · a1d08b4b
      Benjamin Otte authored
      ... instead of 2 floats.
  21. 05 May, 2019 1 commit
  22. 04 Mar, 2019 1 commit
  23. 21 Feb, 2019 2 commits
    • Benjamin Otte's avatar
      snapshot: Refactor text rendering · 0d119f81
      Benjamin Otte authored
      The code didn't change, it was just shuffled around to make the
      with_bounds() versions of the text rendering unnecessary and instead
      pass through the generic append_node() path.
    • Benjamin Otte's avatar
      gsk: Remove offset nodes · 6a4bf2b9
      Benjamin Otte authored
      They were a neat idea while they lasted. But now, it's time for
      categorized transform nodes, where matrices with
      GSK_MATRIX_CATEGORY_2D_TRANSLATE are the exact replacement.
      Renderers have not been adapted for this purpose, so they (continue to)
      run slow paths.
  24. 04 Jul, 2018 1 commit
  25. 24 Apr, 2018 2 commits
  26. 21 Apr, 2018 1 commit
    • Timm Bäder's avatar
      gsk: Make gsk_text_node_new_with_bounds private · 4f3c7cd4
      Timm Bäder authored
      We pulled out the bounds calculation for performance reasons, but the
      caller can't know how to properly compute them. Inside gtk+, we can do
      that but it's not good enough for public API.
  27. 01 Apr, 2018 1 commit
  28. 26 Mar, 2018 1 commit
    • Benjamin Otte's avatar
      rendernode: Add an offset node · ce743f28
      Benjamin Otte authored
      This is a special case of the transform node that does a 2D translation.
      The implementation in the Vulkan and GL renderers is crude and just does
      the same as the transform node.
      Nothing uses that node yet.
  29. 24 Mar, 2018 1 commit
  30. 04 Mar, 2018 1 commit
  31. 06 Feb, 2018 1 commit
    • Matthias Clasen's avatar
      The big versioning cleanup · 4c150d8e
      Matthias Clasen authored
      Remove all the old 2.x and 3.x version annotations.
      GTK+ 4 is a new start, and from the perspective of a
      GTK+ 4 developer all these APIs have been around since
      the beginning.