1. 20 Mar, 2022 1 commit
  2. 19 Mar, 2022 2 commits
  3. 18 Mar, 2022 15 commits
    • Christian Hergert's avatar
      gsk/gl: start on basic glyphy renderjob integration · 4d413c3a
      Christian Hergert authored
      This doesn't work correctly yet, as there are lots of bumps along the way
      to still smooth out.
      4d413c3a
    • Christian Hergert's avatar
      gsk/gl: add texture library for Glyphy · 5304edd0
      Christian Hergert authored
      This adds a new texture library that can upload SDF data from libglyphy
      into regions of a texture atlas so that it can be accessed by Glyphy
      shaders in the appropriate place and format.
      
      Some of the placement positioning may seem odd in that it needs to follow
      a certain format to be decoded from the Glyphy shaders.
      5304edd0
    • Christian Hergert's avatar
      gsk/gl: dispatch text_node to legacy vs glyphy · ba5ea8c7
      Christian Hergert authored
      If the text node has color glyphs, then we need to dispatch to the legacy
      form of rendering which uses FreeType/Cairo/etc to upload glyphs to a
      rendered glyph cache.
      
      Otherwise, we can dispatch to a new function which will eventually use
      Glyphy to shape to SDF content and upload to an alternate texture atlas.
      ba5ea8c7
    • Christian Hergert's avatar
      build: add dependency on glyphy · 7cffaa7e
      Christian Hergert authored
      7cffaa7e
    • Christian Hergert's avatar
      gsk/gl: use consistent library naming · cbbca38d
      Christian Hergert authored
      cbbca38d
    • Christian Hergert's avatar
      gsk/gl: make texture libraries more autonomous · c64836e1
      Christian Hergert authored
      This moves a lot of the texture atlas control out of the driver and into
      the various texture libraries through their base GskGLTextureLibrary class.
      
      Additionally, this gives more control to libraries on allocating which can
      be necessary for some tooling such as future Glyphy integration.
      
      As part of this, the 1x1 pixel initialization is moved to the Glyph library
      which is the only place where it is actually needed.
      
      The compact vfunc now is responsible for compaction and it allows for us
      to iterate the atlas hashtable a single time instead of twice as we were
      doing previously.
      
      The init_atlas vfunc is used to do per-library initialization such as
      adding a 1x1 pixel in the Glyph cache used for coloring lines.
      
      The allocate vfunc purely allocates but does no upload. This can be useful
      for situations where a library wants to reuse the allocator from the
      base class but does not want to actually insert a key/value entry. The
      glyph library uses this for it's 1x1 pixel.
      
      In the future, we will also likely want to decouple the rectangle packing
      implementation from the atlas structure, or at least move it into a union
      so that we do not allocate unused memory for alternate allocators.
      c64836e1
    • Christian Hergert's avatar
      gsk/gl: pin atlases to single texture library · 6b23fe3a
      Christian Hergert authored
      This removes the sharing of atlases across various texture libraries. Doing
      so is necessary so that atlases can have different semantics for how they
      allocate within the texture as well as potentially allowing for different
      formats of texture data.
      
      For example, in the future we might store non-pixel data in the textures
      such as Glyphy or even keep glyphs with color content separate from glyphs
      which do not and can use alpha channel only.
      6b23fe3a
    • Christian Hergert's avatar
      gsk/gl: add more control over shader generation · 9defc7fc
      Christian Hergert authored
      This allows the gskglprograms.defs a bit more control over how a shader
      will get generated and if it needs to combine sources. Currently, none of
      the built-in shaders do that, but upcoming shaders which come from external
      libraries will need the ability to inject additional sources in-between
      layers.
      9defc7fc
    • Christian Hergert's avatar
      gsk/gl: rename glyphs to glyphs_library · 9d56f44c
      Christian Hergert authored
      This naming style is less likely to collide with shader naming and makes
      it clear where it is consumed what it is.
      9d56f44c
    • Christian Hergert's avatar
      gsk/gl: allow configuring atlas size · 1b9da2bb
      Christian Hergert authored
      1b9da2bb
    • Christian Hergert's avatar
      gsk/gl: check for format as well · 2efc1729
      Christian Hergert authored
      This could potentially happen if a uniform had never been set.
      2efc1729
    • Christian Hergert's avatar
      gsk/gl: only clear glyph cache durign reclaimation · a66a0dde
      Christian Hergert authored
      We don't need to clear the front cache on every frame as we can clear it
      specifically when we do reclaimation to avoid unnecessary memset() calls.
      a66a0dde
    • Christian Hergert's avatar
      gsk/gl: ignore max_entry_size when zero · 7062411b
      Christian Hergert authored
      If the max_entry_size is zero, then assume we can add anything to the
      atlas. This allows for situations where we might be uploading an arc list
      to the atlas instead of pixel data for GPU font rendering.
      7062411b
    • Christian Hergert's avatar
      gsk/gl: make max-frame-age configurable · 9dbd137e
      Christian Hergert authored
      This is nice for some texture libraries that we might want to keep around
      for longer than say 60 frames such as a glyph cache.
      9dbd137e
    • Matthias Clasen's avatar
      gtk-demo: Don't hardcode a title font · 79fad9f2
      Matthias Clasen authored and Christian Hergert's avatar Christian Hergert committed
      We want a large font size, but we don't have to
      hardcode Sans.
      79fad9f2
  4. 17 Mar, 2022 5 commits
  5. 16 Mar, 2022 4 commits
  6. 15 Mar, 2022 9 commits
  7. 14 Mar, 2022 4 commits