Split SkPixmap, and codec-related files for better modularization.
In the proof of concept PNG module build of Skia [1], splitting
these files makes it easier to build just the code necessary
to create a SkPixmap and encode it as a PNG file.
SkPixmapPriv only had one method which actually used the
private fields of SkPixmap and that was only used in one place.
Thus, I replaced it with a public API and inlined it, which
allowed the removal of the friend class. The remaining
usages were only used in the codec related code, so I moved
it out of core.
SkReadPixelsRec was used in one place (SkPixmap), so I
moved it from src/image to src/core and moved the implementation
out of SkImageInfo.cpp into its own file.
Likewise, SkWritePixelsRec is only used by SkBitmap
(so it stays in core) and had its implementation moved to
a new file.
To make the modularization attempt easier, I split out the
SkPixmap method implementations out which required
the CPU backend (erase, scalePixels). I'll figure out what
to do with those later.
Finally, SkEncoder's implementation of encodeRows was moved
to its own file to make bringing in exactly one codec
*without setting defines* easier. src/images/SkImageEncoder.cpp
will need a re-work as this project progresses.
[1] https://skia-review.googlesource.com/c/skia/+/636819
Bug: skia:13983
Change-Id: I91d3947f0c212b8440dd0161bd34f317bb70a77b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/643298
Reviewed-by: Ben Wagner <bungeman@google.com>
Owners-Override: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
25 files changed