Reland "[text] Introduce PackedGPUGlyphID to add more metadata to SkPackedGlyphID"

This reverts commit 48b58ee222f14b2b14a08c2e8574fae8256b26e0.

Reason for revert: Fixing GlyphData max size

Original change's description:
> Revert "[text] Introduce PackedGPUGlyphID to add more metadata to SkPackedGlyphID"
>
> This reverts commit f82e81ea65ed4cd9549f9416e2cc4e983eada195.
>
> Reason for revert: Breaking tree, and Michael (CL author) is not here to discuss path forward
>
> Failure Link: https://ci.chromium.org/raw/build/logs.chromium.org/skia/79e459c81677dc11/+/annotations
> Original change's description:
> > [text] Introduce PackedGPUGlyphID to add more metadata to SkPackedGlyphID
> >
> > Both Ganesh and Graphite share a lot of common structure to their glyph
> > handling code, so the changes outlined below are applied pretty
> > similarly to both codebases.
> >
> > 1. Adds a new shared type PackedGPUGlyphID that wraps SkPackedGlyphID
> > and packs into the free bits the rest of the information that
> > atlas-backed glyphs require, which is the mask format, the amount of
> > padding, and whether or not the data is a coverage or distance value.
> >
> > 2. Pulls back the presence of MaskFormat from the GlyphVector concepts
> > and functions as it's now handled internally by each backend's GlyphData
> > classes and embedded into the packed GPU IDs that they make.
> >
> > 3. Each backend's TextStrike implementation stores PackedGPUGlyphIDs as
> > the keys to GlyphEntries instead of SkPackedGlyphIDs. This ensures that
> > an atlas will only have a cache hit if all of the mask/padding/data-type
> > properties are consistent with what was in the atlas and what is
> > requested by the subrun being drawn.
> >
> > 4. Each backend's GlyphData implementation takes in these additional
> > properties in its constructor (propagating to initBackendData() calls).
> > It then resolves the mask format and padding with the configuration of
> > the backend's atlas manager so that all subsequent PackedGPUGlyphIDs
> > that it makes represent the final configuration.
> >
> > 5. The atlas manager's now require the format and padding to be
> > pre-resolved in many of their functions, such that 565 has been lifted
> > to RGBA8 and 1px of padding is added for direct masks if the caps
> > require all direct masks to have padding (this automatically makes
> > transformed mask subrun glyphs and direct mask subrun glyphs key the
> > same when fSupportBilerpAtlas is true).
> >
> > Backend-specific changes for Graphite:
> >
> > The properties that GlyphData requires for filling out the
> > PackedGPUGlyphID are basically the `sktext::gpu::RendererData` that was
> > being stored in the SubRunData object. I added the srcPadding to it and
> > then made it accessible from GlyphData, so it could be removed from
> > SubRunData. This keeps the number of arguments to the various functions
> > fairly concise.
> >
> > As part of this, RendererData moved from SubRunContainer.h to
> > GlyphVector.h
> >
> > Backend-specific changes for Ganesh:
> >
> > Ganesh didn't use RendererData, so its GlyphData just takes the
> > parameters in directly and from the AtlasTextOp. Its GlyphData class
> > also had an unused declared constructor that I removed, and
> > GrAtlasManager::addToAtlas() could be made private (which made enforcing
> > resolvedMaskFormat easier).
> >
> > Bug: 514078656
> > Change-Id: I07977910f64d84e15fe6e4c687d8635afb356b7c
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1292556
> > Reviewed-by: Alexis Cruz-Ayala <alexisdavidc@google.com>
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
> > Commit-Queue: Michael Ludwig <michaelludwig@google.com>
>
> Bug: 514078656
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Change-Id: Iec81ee8afd60d7fd9864bdc9dff8d4cca2c95d51
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1314716
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>

Bug: 514078656
Fixed: 514078656
Change-Id: I98e05b49519f829b82ced452e07d5b97f8195be4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1314717
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
27 files changed