Reland "Add support for gainmaps in `SkPngRustEncoder`."

This reverts commit e1e2a569bd8ad0268579f619021c6ef5dd12b170.

Reason for revert: Reland the change with a build flag to prevent test failures that are sensitive to the encdoded data.

Original change's description:
> Revert "Add support for gainmaps in `SkPngRustEncoder`."
>
> This reverts commit a02df043b36900afe1a5a967670bd7b339063501.
>
> Reason for revert: Blocking Chrome roll
>
> Failure Link: <LINK TO FAILURE>
>
> Original change's description:
> > Add support for gainmaps in `SkPngRustEncoder`.
> >
> > We’ve added support for decode in earlier CLs, but not encode, this CL
> > adds the missing support for encoding.
> >
> > Also added sBIT encoding support and refactored the gainmap tests to use
> > a shared helper.
> >
> > BUG=381292460
> >
> > Change-Id: Idc8fe5ff124e466ea4cabb6665cb4544c5b6591c
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1277076
> > Commit-Queue: Elliot Sisteron <elliotsisteron@google.com>
> > Reviewed-by: Florin Malita <fmalita@google.com>
>
> Bug: 381292460
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Change-Id: I111a070ded8dd206e92f8ef8c650c8226c7e84f5
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1278676
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>

Bug: 381292460
Change-Id: I1139e1d7c6e93669b86adf8299dc31bdd163c2ac
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1278716
Reviewed-by: Łukasz Anforowicz <lukasza@google.com>
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Elliot Sisteron <elliotsisteron@google.com>
9 files changed