Offset-only GlyphBuffer

Instead of storing glyph advances (only to later convert to offsets for the Skia draw calls), refactor GlyphBuffer to store offsets directly. This reduces the amount of buffer post-processing and decreases the API friction when calling into Skia.

GlyphBuffer offsets are relative to the text run origin and are either horizontal/x-only (generated by the simple shaper) or x/y interleaved (generated by the complex shaper). These correspond to the text positioning modes used by Skia.

Thanks to the new buffer format, the refactor also includes:

* zero offset processing when building text blobs (the offsets are essentially memcpy-ed)
* minimal processing (translate by destination point) for the legacy drawPosText path (we could also optimize this path, but the added complexity is probably not justified given the plans to completely switch to text blobs)
* SimpleShaper::adjustSpacing no longer needs to inject synthetic glyphs but simply adjusts the offsets for following glyps
* drawEmphasisMarks uses explicit offsets to glyph-midpoint instead of computing them based on advances

Other things to investigate:

* multi-run buffer builder (to support multi-run text blobs)
* stop storing space glyphs (simply adjust the following glyph offsets instead)

R=jbroman@chromium.org,eae@chromium.org,dominik.rottsches@intel.com
BUG=377845

Review URL: https://codereview.chromium.org/676523003

git-svn-id: svn://svn.chromium.org/blink/trunk@185129 bbb929c8-8fbe-4397-9dbb-9b2b20218538
9 files changed