use SkColorInfo in fm

Just refactoring code that predates SkColorInfo.

Change-Id: Iba5ffdf91e2e2517bf55ea8c5a36c4fe6583a6b3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/376760
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This commit is contained in:
Mike Klein 2021-02-26 12:22:07 -06:00 committed by Skia Commit-Bot
parent a654faaf7f
commit 6706c9fa14

View File

@ -543,7 +543,7 @@ int main(int argc, char** argv) {
sk_sp<SkColorSpace> cs = FLAGS_legacy ? nullptr
: SkColorSpace::MakeRGB(tf,gamut);
const SkImageInfo unsized_info = SkImageInfo::Make(0,0, ct,at,cs);
const SkColorInfo color_info{ct,at,cs};
AutoreleasePool pool;
for (auto source : sources) {
@ -551,7 +551,7 @@ int main(int argc, char** argv) {
fprintf(stdout, "%50s", source.name.c_str());
fflush(stdout);
const SkImageInfo info = unsized_info.makeDimensions(source.size);
const SkImageInfo info = SkImageInfo::Make(source.size, color_info);
auto draw = [&source](SkCanvas* canvas) {
Result result = source.draw(canvas);