Class GlyphVector


public class GlyphVector extends DrawAtlas.PlotBulkUseUpdater
GlyphVector provides a way to delay the lookup of Glyphs until the code is running on the GPU in single threaded mode. The GlyphVector is created in a multi-threaded environment, but the StrikeCache is only single threaded (and must be single threaded because of the atlas).
  • Constructor Details

    • GlyphVector

      public GlyphVector(StrikeDesc strikeDesc, int[] glyphs)
      The strikeDesc and glyphs must be immutable, no copy will be made.
  • Method Details

    • getGlyphs

      public BakedGlyph[] getGlyphs()
    • getGlyphCount

      public int getGlyphCount()
    • prepareGlyphs

      public int prepareGlyphs(int start, int end, int maskFormat, RecordingContext context)
      Update atlas for glyphs in the given range if needed, returns the number of glyphs that are updated (may less than end-start if atlas is full). If an error occurred, returns the bitwise NOT (a negative value).
    • getMemorySize

      public long getMemorySize()
      Overrides:
      getMemorySize in class DrawAtlas.PlotBulkUseUpdater