Commit Graph

13 Commits

Author SHA1 Message Date
Mike Klein
d50ac5c626 break huge conversions into batches
skcms_Transform(...,N) requires N*bpp to fit in int, but the full
unclipped tabl_mozilla.skp is too big for that.  So break the work up
into calls of no more than 2^27 pixels, i.e. max 1GB at a time.

We could change skcms or clip tabl_mozilla.skp, but this seems fun.

Change-Id: Iaa0b8268851160c179b9501a09ca769b363dafe3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/364417
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2021-02-03 14:51:10 +00:00
Mike Klein
989f5bfb8f refactor HashAndEncode
Encode as PNG to an SkWStream instead of a path.
It's just as natural at the call sites, if not more so,
and is more flexible for environments without a filesystem.

While here, tweak the method names and add some comments.

Change-Id: I8ce9869471fc7e1a0955d51ecb621e76c2e1d4d8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/323509
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-10-07 16:13:13 +00:00
Mike Klein
d58e01b6fc support 16161616 in fm
Everything was pretty much already plumbed through using
SkRasterPipeline, with a few key connections made here.

This support is mostly useful for differentially debugging my CLs
stacked on top of it.

Change-Id: I9c2f2ea6cd8890c057890409f21c7698857c599a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/303651
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2020-07-17 20:35:33 +00:00
Mike Klein
f7eb0544a8 basic, untested BGR 1010102 and 101010x
Updated every switch that yelled at me, and added support to dm and fm,
and then founds some more switches that shouldn't have defaults...

The tricky spots outside those were mips and dither,
since they aren't simply exhaustive switches.

_Now_ no diffs between RGB/BGR 1010102 and 101010x.

No GPU support.

Bug: skia:9893
Change-Id: I73ab3fd22bdef0519296dfe4cb84031e23ca0be3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/270114
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2020-02-11 21:44:57 +00:00
Robert Phillips
ea1b30b57b New proposed syntax for SkColorTypes
Everything except for SkImageInfo.h is mechanical

Change-Id: I2d775c79467fb15f6022e80d21b4a9151272fe2a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/242896
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-09-19 20:42:55 +00:00
Robert Phillips
17a3a0bda9 Last tranche of new SkColorTypes
This CL adds:
    kAlpha_F16_SkColorType
    kRG_F16_SkColorType
    kRGBA_16161616_SkColorType,

which should be it for a while.

Bug: skia:9121
Change-Id: I81b9d46a202a76e9b7d7ca86495d72dbdae32576
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/241357
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2019-09-18 18:23:29 +00:00
Robert Phillips
429f0d380c Add kRG_1616 and kAlpha_16 SkColorTypes
This also switches GrColorType::kR_16 to kAlpha_16 to more closely match raster.

Bug: skia:9121
Change-Id: I03c6e6c52c90aa4223478c5ea6c8b2ed8558f677
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/239930
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-09-12 12:20:09 +00:00
Robert Phillips
d470e1b905 Add kRG_88_SkColorType
Bug: skia:9121

Change-Id: Id2a12a5d607b84ce393d2b58233bf8e23f646059
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/235797
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2019-09-06 17:55:26 +00:00
Hal Canary
be67a17c77 add SkNamedTransferFn::kRec2020
Change-Id: I674ab82845f5e6db56412d36e2d146d1208032af
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/215824
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-05-24 16:03:03 +00:00
Mike Klein
c0bd9f9fe5 rewrite includes to not need so much -Ifoo
Current strategy: everything from the top

Things to look at first are the manual changes:

   - added tools/rewrite_includes.py
   - removed -Idirectives from BUILD.gn
   - various compile.sh simplifications
   - tweak tools/embed_resources.py
   - update gn/find_headers.py to write paths from the top
   - update gn/gn_to_bp.py SkUserConfig.h layout
     so that #include "include/config/SkUserConfig.h" always
     gets the header we want.

No-Presubmit: true
Change-Id: I73a4b181654e0e38d229bc456c0d0854bae3363e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209706
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-04-24 16:27:11 +00:00
Mike Klein
22a5e345c9 set PNG compression level back to 1
On my machine, this cuts the CPU time to run all GMs and write out
PNGs by about half, from ~67s to ~34s (wall, 4s -> 3s).  File size
goes from 148M to 180M, about a 22% increase.

Change-Id: I50f051e5c87cc6854797d6838e0342cbd7e95003
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/204130
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
2019-04-03 19:39:05 +00:00
Mike Klein
9b46209867 add --backend skp to fm
And move --backend first among the backend flags.

Change-Id: I853ede2a8218f046c968ace2ce8c5e277421e225
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/204133
Auto-Submit: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-03-27 19:55:28 +00:00
Mike Klein
735c7ba320 FM, a dumber new testing tool
FM's a bit like DM, and a bit like the old GM tool, maybe closer to GM.

FM always does one serial run through of a list of GM, image, or .skp
sources (-s/--sources) into one drawing configuration, set at a high
level with -b/--backend, fine-tuned by flags like --ct, --at, --gamut,
--samples, etc.

FM prints all available GMs when run with no arguments, part of
how it integrates well with external parallelization like xargs:

   out/fm | time xargs -n4 -P32 out/fm -b cpu ... -s
   out/fm | time xargs -n32 -P8 out/fm -b gl ... -s
   ls *.skp | xargs ... out/fm ... -s
   ...

TODO later:
   vector backends: --backend pdf, svg, xps, skp
   --source *.svg, *.json (Skottie)
   Create/update a dm.json file

Change-Id: Idacbd2785deaf6f1d33674c66c4d984fa91dbd85
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/203520
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-03-27 14:00:58 +00:00