Commit Graph

673 Commits

Author SHA1 Message Date
Mike Klein
055f5355d5 pdf rasterization
- add Mac PDF rasterizer
- create a mac pdf bot
- blacklist some GMs that CG takes forever to rasterize
- remove obsolete --dont_write pdf feature

This new Mac -PDF bot is now the _only_ bot running PDF code.
Obviously we can expand from here.

pdfium was looking like a pain to build and/or integrate
into our own build.  pdftocairo looked promising, and is
already installed on the bots, but it is very slow and
prone to error.  CG was the next thing I tried.

Change-Id: I82b04121f484e7dd78f60a648485a09218dd5279
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/267810
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2020-01-30 21:21:28 +00:00
Mike Klein
9ae06637d0 add --skvm to DM
Change-Id: I54038b34cb10322ec688f24e3869a7481d2e2c66
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/267070
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-01-28 19:07:54 +00:00
Mike Klein
b147aceed7 DCI-P3 -> Display P3 in Skia
This keeps an alias so code keeps building.

Bug: skia:9792
Change-Id: If8575468d929d2ca28bc2f9e82de27291fb19aa1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264691
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-01-16 21:24:16 +00:00
Mike Reed
2319b803c2 remove unused (by clients) SkMultiPictureDraw
More cleaning to do if we like this idea...

Change-Id: I608143db085911565dd5f5426f7ee6436ec58cdf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/254680
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-11-15 18:18:36 +00:00
Brian Osman
09ee112bdb Reland "Fully embrace skcms types in SkColorSpace API"
This reverts commit 6af9b1c673.

Change-Id: I7954951497e57475ab6f1c7f946b47aa17f1ac8c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252817
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-11-05 18:36:26 +00:00
Robert Phillips
6af9b1c673 Revert "Fully embrace skcms types in SkColorSpace API"
This reverts commit 701522798a.

Reason for revert: Maybe blocking the Android roll

Original change's description:
> Fully embrace skcms types in SkColorSpace API
> 
> Remove the SkMatrix44 getter entirely.
> 
> Change-Id: I25bfe68a7a9b21d8a8696415b517cb79fc2d7a94
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252596
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>

TBR=mtklein@google.com,brianosman@google.com,reed@google.com

Change-Id: Ic277d54d4ac8c84f00405946c927a3aee4e33068
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252801
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2019-11-05 15:03:49 +00:00
Brian Osman
701522798a Fully embrace skcms types in SkColorSpace API
Remove the SkMatrix44 getter entirely.

Change-Id: I25bfe68a7a9b21d8a8696415b517cb79fc2d7a94
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252596
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-11-04 21:22:38 +00:00
Brian Osman
11e6aa823d Starting to hack up HDR transfer function support
Brings over skcms' encoding scheme, etc.

Change-Id: Ib8abec911acd1c50df3b201b4a9bde01b1cb123b
Bug: chromium:960620
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249000
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-10-16 18:40:16 +00:00
Brian Osman
3fdfe28238 Simplify GPUSink constructors by just passing the config object
Also, remove the never-used gpu_threading flag. In limited
testing, it makes things slower.

Change-Id: I40ae0c8e5b79992c90845035a06536ed9d6626b5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/240202
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-09-09 18:12:18 +00:00
Brian Osman
ed58e004e0 Add support for pre-compiling cached SkSL shaders
The client can do a test run of their application with
a persistent cache set to SkSL mode. They store the key
and data blobs that are produced.

Ship those blobs with the application. At startup, call
GrContext::precompileShader for each key/data pair. This
compiles the shaders, and stores the GL program ID, plus
a small amount of metadata in our runtime program cache.

Caveats:
* Currently only implemented for the GL backend. Other
  backends will require more metadata to do any useful
  amount of work. Metal may need a more drastic workflow
  change, involving offline compilation of the shaders.
* Currently only implemented for cached SkSL (not GLSL
  or program binaries). Supporting other formats again
  requires more metadata, and the cached shaders become
  increasingly specialized to GPU and driver versions.
* Reusing the cached SkSL on different hardware is not
  supported. Many driver workarounds are implemented in
  the SkSL -> GLSL transformation, but some are higher
  level. Limiting device variance by artificially hiding
  extensions may help, but there are no guarantees.

* The 'gltestprecompile' DM config exercises this code
  similarly to 'gltestpersistentcache', ensuring that
  results are visually identical when precompiling, and
  that no cache misses occur after precompiling.

Change-Id: Id314c5d5f5a58fe503a0505a613bd4a540cc3589
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/239438
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-09-06 19:45:09 +00:00
Brian Osman
1c1208e6c3 Install runtime check error handler in RTC builds
From local testing, this does get invoked and supply a useful error
number to know which rule we broke. It doesn't have any useful location
information (linenumber is always 0, filename is always empty).

Change-Id: I297e5b1d4aac0ba00d9c231550df3ab29e983628
Bug: skia:9197
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/223189
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-06-24 18:08:08 +00:00
Herb Derby
9c71e7be10 Remove all global mutexes
Remove the SkBaseMutex (and SkBaseSemaphore). This allows all the thread
annotation machinery to work.

Change-Id: I2da420ec3165ccbcd90c474c0b62bfef42df2a53
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/221340
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-06-18 00:39:15 +00:00
Jim Van Verth
8a9a371182 Reland "Added AutoreleasePool for managing pool memory in testing apps."
This is a reland of a36e089065

This is only active when Metal is enabled.

Original change's description:
> Added AutoreleasePool for managing pool memory in testing apps.
>
> This is only active on MacOS and iOS -- on other platforms it
> will do nothing as they have no need for autorelease pools.
>
> Bug: skia:8243
> Change-Id: Ib74968dab6e3455a72e726429832101d0d410076
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/217126
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

Bug: skia:8243
Change-Id: I743a3dcc93b46387a6a330e855c2e8810b482544
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/217379
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2019-05-31 15:40:01 +00:00
Kevin Lubick
c4fec06e5a Revert "Added AutoreleasePool for managing pool memory in testing apps."
This reverts commit a36e089065.

Reason for revert: Primary suspect in breaking G3

Original change's description:
> Added AutoreleasePool for managing pool memory in testing apps.
> 
> This is only active on MacOS and iOS -- on other platforms it
> will do nothing as they have no need for autorelease pools.
> 
> Bug: skia:8243
> Change-Id: Ib74968dab6e3455a72e726429832101d0d410076
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/217126
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

TBR=egdaniel@google.com,jvanverth@google.com,brianosman@google.com

Change-Id: I64f6e0baba21a9d35682ab53bdf418180be8579b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:8243
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/217377
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
2019-05-31 12:31:14 +00:00
Jim Van Verth
a36e089065 Added AutoreleasePool for managing pool memory in testing apps.
This is only active on MacOS and iOS -- on other platforms it
will do nothing as they have no need for autorelease pools.

Bug: skia:8243
Change-Id: Ib74968dab6e3455a72e726429832101d0d410076
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/217126
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-05-30 19:13:34 +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
Ben Wagner
ab6eefe60e Move SkLeanWindows.h to src.
This file pulls in Windows headers in a custom way, which is somewhat
awkward for a library header. The only use in include/ has been replaced
with a single forward declaration.

Change-Id: Ibef4cf7a2d1c9957a6a5b145b95aca1a6868cb5e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214689
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-05-21 13:48:00 +00:00
Mike Klein
b3c0bf6426 Revert "manually register codecs in DM"
This reverts commit 9b2633e294.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> manually register codecs in DM
> 
> We'll want to do this when we've got Google3 refactored
> to slice out each of these four codecs into its own little target.
> 
> Small tweaks to make SkPngCodec match the pattern of the rest.
> 
> Should be harmless to have both the compile-time and runtime
> registration, right?
> 
> Change-Id: Ic72394764ac267758dc1023e85f3d0c4b655d420
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213872
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Mike Klein <mtklein@google.com>

TBR=mtklein@google.com,scroggo@google.com,brianosman@google.com

Change-Id: If3272ef1985757a93ada229f833408d4bf83ddfb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214108
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-05-15 22:03:02 +00:00
Mike Klein
4bf6fd68db Revert "add runtime registration for encoders"
This reverts commit 940c3f136d.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> add runtime registration for encoders
> 
> If we want to make these external dependencies mix-and-match in Google3,
> we'll need to group together the encoders and decoders, everything that
> dependends on each external library.
> 
> I was tempted to try to remove these generic encoder entrypoints and
> replace them with calls to the direct equivalents, but I'm not sure
> that's necessary.  I think we can just register encoders like decoders.
> 
> Change-Id: I41d2d1bb3ceb1daafa62c95d345eb6a70249be75
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213880
> Commit-Queue: Mike Klein <mtklein@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

TBR=mtklein@google.com,scroggo@google.com,brianosman@google.com

Change-Id: I3ee9353ca6b3c6c11feba0503b672d8986a347be
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214107
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-05-15 22:02:39 +00:00
Mike Klein
c9deffaed2 Revert "skip runtime registration on iOS"
This reverts commit 017126fe1d.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> skip runtime registration on iOS
> 
> These encoders and decoders are not built and linked
> in Google3 iOS builds.  We just need to hack a bit to
> get DM to build there... we never run it.
> 
> Change-Id: I6cdfbb6df3c4fe30096b2715cad004bccec0bcaa
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214002
> Commit-Queue: Mike Klein <mtklein@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

TBR=mtklein@google.com,brianosman@google.com

Change-Id: Id8e9d8ccb79f5cae6d7af4a42dfbe514f77fc417
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214103
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-05-15 22:01:45 +00:00
Mike Klein
017126fe1d skip runtime registration on iOS
These encoders and decoders are not built and linked
in Google3 iOS builds.  We just need to hack a bit to
get DM to build there... we never run it.

Change-Id: I6cdfbb6df3c4fe30096b2715cad004bccec0bcaa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214002
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-05-15 18:59:27 +00:00
Mike Klein
940c3f136d add runtime registration for encoders
If we want to make these external dependencies mix-and-match in Google3,
we'll need to group together the encoders and decoders, everything that
dependends on each external library.

I was tempted to try to remove these generic encoder entrypoints and
replace them with calls to the direct equivalents, but I'm not sure
that's necessary.  I think we can just register encoders like decoders.

Change-Id: I41d2d1bb3ceb1daafa62c95d345eb6a70249be75
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213880
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-05-15 18:52:43 +00:00
Mike Klein
9b2633e294 manually register codecs in DM
We'll want to do this when we've got Google3 refactored
to slice out each of these four codecs into its own little target.

Small tweaks to make SkPngCodec match the pattern of the rest.

Should be harmless to have both the compile-time and runtime
registration, right?

Change-Id: Ic72394764ac267758dc1023e85f3d0c4b655d420
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213872
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-05-15 17:03:09 +00:00
Mike Klein
a705cb93c7 remove SkLiteDL
It's been dead code since it was inlined into Android last summer.

Change-Id: I252f6392d9436ef357f22a54bab8a33c9d1b3ea9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213625
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-05-14 18:55:44 +00:00
Herb Derby
a1b7be612c Add thread safety annotations.
Start out with spinlock. I tried to be more extensive, but some
of our abstractions confused the analysis. Will expand further
in following CLs.

Change-Id: I3e320c957d8ef427065a2b7e7d2187b7c6b0aef1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213060
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2019-05-10 13:40:38 +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
9816878163 extract ToolUtils::colortype_depth()
Change-Id: I55a3956ed6d0587f72ddff24a1769ab14e25131f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/206981
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-04-09 20:32:15 +00:00
Mike Klein
de8362c6f2 remove DMJsonWriter::AddTestFailure
As far as I can tell, Gold doesn't do anything with this information.
The bots go red if any unit test fails... no need to log it long-term.

Change-Id: Iae9ddd61c0a7d37437bb93441e83948c2e518b42
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/206940
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-04-09 19:42:02 +00:00
Brian Osman
f71b070ffd Fix the GLSL persistent cache (and add a config to test it)
We need to store (up to) three GLSL strings in the cache entry,
along with the bookkeeping to reconstruct them. To make things
simpler, we now store the null terminators.

Change-Id: Ic4fe03cb5d774464372ceec8740da1bfe9069550
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/205823
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-04-03 18:05:22 +00:00
Hal Canary
0f2f522246 SkMD5 returns digest
Change-Id: I9eb9095131adb5862d286b211501bf194ef8e91e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/205822
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-04-03 17:52:22 +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
Mike Klein
c6142d855c de-common the rest of the flags
Turns out lots of tools had two copies of many of these flags.

Some GN and .cpp file refactoring to make sure when flags are
present in a binary, they do something in that binary.

I think this finally finishes the flag refrag.

Change-Id: I01488e37ab73a5c4361786863ddb137a7f1095b1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/203420
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-03-25 17:39:58 +00:00
Mike Klein
19cc0f647c create a wrapper to manage --nativeFonts and --gdi
Put it in ToolUtils to avoid cyclic dependencies.

Change-Id: Ie0ad7eb5d1ba58be5ad8c668afdb7c74facd71dc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/203181
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-03-22 21:06:29 +00:00
Mike Klein
629f5fc5ec de-common another batch of flags
These are only used by DM and nanobench,
and sometimes even do substantially different things...

Change-Id: I973f3938fbae1fd1b19d876fa6a90122fc55d48c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/203167
Auto-Submit: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-03-22 20:43:39 +00:00
Mike Klein
d0f321be72 de-common --veryVerbose
In the end only DM and skia_test really use it.

 - nanobench used --veryVerbose in a silly superficial way
 - gm/fontmgr.cpp is probably clearer using its own flag
 - the change to StrokerTest should be a near noop...
   reporter->verbose() is set by --veryVerbose in both
   DM and skia_test.cpp.  One of the checks tested
   FLAGS_verbose, but I feel like that was probably a typo.

Change-Id: I2601d243b8200b3bb7a16478dfbce14001c4a191
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/203180
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-03-22 19:23:09 +00:00
Mike Klein
03fa5d4083 factor out SetAnalyticAAFromCommonFlags()
This wraps up the behavior for --analyticAA and --forceAnalyticAA
in one place, like we've done for the various GPU flags covered by
SetCtxOptionsFromCommonFlags().

It seems at least midly useful to have common flags centralized when
there is really a common mechanism they control.  Most of the rest
of these flags only serve analogous purposes in the various binaries
that use them, and I think it might be better for them to be split
out rather than centralized (so they don't show up confusingly in
binaries that _don't_ use them).

Change-Id: I27dbe53586363d4b262c1679ea73138015811ed1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/203095
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-03-22 18:12:23 +00:00
Mike Klein
4932a5efa8 Fold CommonFlagsGpu into CommonFlags
This scopes a bunch of flags more tightly
to SetCtxOptionsFromCommonFlags().

Change-Id: I6090a016880c085fb5405a45081c0af984a1cd5b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/203094
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-03-22 18:01:13 +00:00
Mike Klein
e5acd7547b delete DAA
Change-Id: I1fd8cba067c0063c6621641e8196e69fd5e31cec
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/203080
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-03-22 15:44:03 +00:00
Mike Klein
19fb3971bc de-common some flags
Move flags used only in one place to that place,
and remove a couple unused flags.

Change-Id: I0504d9583d464377e84ab28ce378d6da1e99ac3e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/202802
Auto-Submit: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-03-21 18:55:34 +00:00
Mike Klein
5b3f343d25 DEFINE_int32 + DEFINE_uint32 -> DEFINE_int
There's really no big benefit to distinguishing these.

Change-Id: Ib329d32b1fc43e98ba40658cfea37261203ecdb9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/202801
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-03-21 17:20:19 +00:00
Brian Osman
f9666f5467 Remove SkColorSpaceXformCanvas, and supporting code:
- SkColorSpaceXformer
- makeColorSpace on SkShader, SkColorFilter,
  SkImageFilter, SkDrawLooper, and SkLights
- DM support and some bot configs

Bug: skia:8773
Change-Id: I16ef8f487de6c35329b3b0474c1d66d7fa0a6220
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/202430
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2019-03-21 17:12:33 +00:00
Mike Klein
84836b799a moar static flags
Like any normal variable, flags can be made file-scoped static,
and like any normal variable, mostly they should be if they can.

This CL converts most flags to be static, if only so that the
ones that do cross files stand out more clearly, and so that
there's more examples of static flags through the codebase for
people to ape.

Change-Id: Ibb5ddd7aa09fce073d0996ac3ef0487b078b7d79
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/202800
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-03-21 17:07:13 +00:00
Mike Klein
eb678fcc1f de-Sk tools/trace
Kept it on SkDebugfTracer, which seemed to parse as "SkDebugf, Tracer".

Change-Id: I3e43fe101798ca5ffe14324e3c29f2dd41a6bd0f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/202317
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-03-20 18:27:27 +00:00
Mike Klein
ea3f014e2b sk_tool_utils -> ToolUtils, and git clang-format
sk_tool_utils doesn't really fit the naming convention
the rest of code under tools/ tends to use.

Change-Id: I45326a174101c6eb4b6149e9c742f658f2fd23b1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/202313
Auto-Submit: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-03-20 18:05:42 +00:00
Mike Klein
0cffcbf97b de-Sk tools/font, and git clang-format
Change-Id: I0326eb9cc1e1e38b0fdc417567987a595f9021d2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/202310
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-03-20 17:36:52 +00:00
Mike Klein
88544fbe63 remove Sk prefix from CommandLineFlags
The command line flag package is tool-only, not part of Skia per se,
and does not need an Sk prefix to avoid naming conflicts.

And git clang-format.

Change-Id: Ida8477779e51750ed0475590ed2454841b23d6ea
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/202307
Auto-Submit: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-03-20 17:13:22 +00:00
Kevin Lubick
805c4e8741 Make ios actually fail
Removed Test-iOS from CQ in https://skia-review.googlesource.com/c/skia/+/202130

Bug: skia:8861
Change-Id: I106425525a8149ee955740ae7ecb2eb633a3aa7b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/202127
Reviewed-by: Stephan Altmueller <stephana@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-03-20 14:59:10 +00:00
Mike Klein
ca8087f466 rework --ignoreSigInt
Send it through the main signal handler so we can see resource stats and
what was running at the time we got the SIGINT, and print an FYI note
that we're ignoring it.

Change-Id: Id3bee87d8d07c3ee74b5443198327b7b14d12ddf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/201867
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-03-18 16:59:06 +00:00
Mike Klein
f34d0c79dc re-hash images once more artificially
Some of my early trybots from the first big re-hash CL produced .pngs
without embedded ICC profiles, and some produced .pngs with embedded
profiles, with the same hash.  These were uploaded to Gold, of course.

Where the trybot-without-profile images uploaded first, we see Rec.2020
colors uncorrected as if sRGB, typically rather dim.  Where we're still
producing the same image we see these profile-less images and it's very
confusing, downright misleading.  Makes it impossible to triage.

So, add a salt mechanism to make it easy to re-hash everything,
invalidating all the old hashes so new profile-full images get uploaded.

No-Tree-Checks: true
Change-Id: I51f2bc4612b8a4f38d162124341d27a8e94c6085
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/201702
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-03-16 02:39:12 +00:00
Mike Klein
e1271700ad hash and encode rework, wip
Convert all bitmaps to a single common format before hashing.
Also, include bitmap dimensions in the hash.

There's no good format supported by Skia / SkPngEncoder to use,
so we do the converison manually to 16-bit big-endian Rec.2020
RGBA and call libpng directly.

This format is just about as far as wide as we can stretch PNG.

I've temporarily bumped PNG compression level to 9.
Expecting zillions of new images, it'll help to keep them small.
I think we can probably turn this knob back down once this settles.

No-Tree-Checks: true
Change-Id: Ia438289731ae06ac129cb2ff658b7940981c6136
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/198760
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-03-15 22:24:22 +00:00
Brian Osman
b73e607cdd Change --checkF16 behavior to just print - it's easier to see all failures
Bug: skia:
Change-Id: I208b0202b76bcfbf31bd888e7e575ed54c6d27c7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/201390
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-03-15 14:24:47 +00:00
Brian Osman
cdf31743af Include test name in error messages for failing tests
Bug: skia:
Change-Id: Ia2da00466ba1326b109f0ff0a8d891735bdc2b4d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/200925
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-03-13 14:36:21 +00:00
Brian Osman
582f686980 Add flag to check that F16Norm pixels are clamped properly
Bug: skia:
Change-Id: Ia0d4fd8d191b59683717b179a9613dc3e53df6cf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/199724
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-03-11 16:09:31 +00:00
Mike Klein
82020c2db5 add color_depth field in DM/Gold
I think I'd expect images to look the same in Gold when sliced by

    (name, color_depth, alpha_type, gamut, transfer_fn)

And sometimes OS.

Change-Id: Ia6c08c7611d1622014a0842bf685d1b161d5ebf5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/198762
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2019-03-07 21:32:35 +00:00
Mike Klein
612d5c2b70 encode F16Norm as rec2020
Just a debugging aid to help diffing against esrgb.

Change-Id: I5e4991f598a7b00a0d903fddcf3a05a396c0536d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/198221
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-03-06 19:33:28 +00:00
Mike Klein
0d5d142f6e rework colorImage testing
Replace all the old modes with two that should draw the same:

  1) decode to the codec's "native" SkImageInfo, draw to dst;
  2) decode to the dst's ct/at/cs, draw to dst.

Testing against --config srgb, p3, rec2020, narrow ought to give
us the kind of destination variety we were getting from the old
modes, and --configs 8888 shows off managed vs. unmanged color.

The only difference between the two is that 1) does any conversion at
draw time, 2) at decode time.

I don't quite understand why codec won't decode to some images to 565,
nor any images to 4444.

Bug: skia:8816
Change-Id: Ie57cb57312fdf21fd8dc36a0fa4d2c3b22e77acf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/198181
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-03-06 18:02:27 +00:00
Mike Klein
0abbaca9a5 also tag DM results with color and alpha type
This can be nice to slice by, and helps if you can't exactly remember
the difference between things like "glesrgb" and "glessrgb".

Change-Id: Ib54d29f4c2066e01bd7c4f0b445507f7a65f4f40
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/198180
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-03-06 16:30:17 +00:00
Mike Klein
b70990eda4 add kRGBA_F16Norm_SkColorType
For now this is distinct from kRGBA_F16_SkColorType but treated the
same.  Next steps are to see if we can keep it clamped to [0,1].

Switched a few switches away from default to exhaustive.

Took away any explicit SW clamps for now except the one we definitely
want in append_gamut_clamp_if_normalized().

Skip F16Norm in the DDL test because we can't yet distinguish it from
F16.

Change-Id: I021a864fe078e4fa4e2b399982e6c38350e10d74
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/196371
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
2019-03-04 21:49:07 +00:00
Mike Klein
c7a0916e54 add gbr --config
If we want to compare CSXform vs. tagged drawing, we should be able to
compare gbr-8888 vs. esgbr.

The spin happens when dump_png() converts to Rec.2020.  This has the
"problem" that Gold and other naive image diff tools will think these
images are bytewise very different but once you look at them they'll
make sense to compare.

(You'd want to ideally diff esgbr with gbr-esrgb, but that config
asserts because it's SkColorSpaceXformCanvas doesn't like transforming
into tagged targets.)

(Yes, I chose "esgbr" to both make sense when you think about it but
also, more importantly, to be completely confusing.)

Bug: skia:8774
Change-Id: I25aae41f8d80c48528891b083d1dcac8dac0d88f
Reviewed-on: https://skia-review.googlesource.com/c/193175
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-02-19 15:23:42 +00:00
Mike Klein
66f09a7299 replace gamma_correct with gamut/transfer_fn in DM
gamma_correct as is (really meaning, linear blending) isn't super
useful, in that it doesn't distinguish gamuts or transfer functions
except between identity and non-identity.

This replaces it with fields that describe the gamut and TF.

Change-Id: Ied08c2df537be61ee1903ef6cc279991326271a2
Reviewed-on: https://skia-review.googlesource.com/c/191573
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Stephan Altmueller <stephana@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-02-13 00:15:38 +00:00
Brian Osman
57796b340e Revert "Remove --readPath/-r from DM"
This reverts commit c5245fcd8e.

Reason for revert: Still being used.

Original change's description:
> Remove --readPath/-r from DM
> 
> This was an (unused) feature to compare GM results against a previously
> generated set, while DM was running. It was also one of the users of
> JsonCPP, which is being evicted from Skia.
> 
> Bug: skia:
> Change-Id: I42d6204250782681e22219863e7170744d8be111
> Reviewed-on: https://skia-review.googlesource.com/c/186867
> Auto-Submit: Brian Osman <brianosman@google.com>
> Commit-Queue: Mike Klein <mtklein@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>

TBR=mtklein@google.com,brianosman@google.com

Change-Id: I05a74166a72ce106be73f3e0809e7f96e963aab5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/186868
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-01-25 18:03:11 +00:00
Brian Osman
c5245fcd8e Remove --readPath/-r from DM
This was an (unused) feature to compare GM results against a previously
generated set, while DM was running. It was also one of the users of
JsonCPP, which is being evicted from Skia.

Bug: skia:
Change-Id: I42d6204250782681e22219863e7170744d8be111
Reviewed-on: https://skia-review.googlesource.com/c/186867
Auto-Submit: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-01-25 16:51:41 +00:00
Hal Canary
2111d5fdfe SkPDF: elimate old IMAGE_STATS, de-dupe image code.
- remove SkPDFDict::emitAll()
  - all stream serialization moved into SkPDFDocument.
  - SkPDFDocument::endObject() and ::beginOject() now private.

Change-Id: I4d8a5643027f859e1c0307a379c74859faae0d06
Reviewed-on: https://skia-review.googlesource.com/c/180370
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2019-01-14 18:55:05 +00:00
Mike Klein
97c7cf16de remove --undefok
I think we originally added this for the bots, back in the good old days
when the bot scripts weren't versioned with Skia.  No bots use this now.

Change-Id: Icdee95d27fb928d0215601e082d056e611eb6202
Reviewed-on: https://skia-review.googlesource.com/c/181980
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Ben Wagner <benjaminwagner@google.com>
2019-01-09 18:15:07 +00:00
Brian Osman
82ebe04caf Reland "Add SkColorSpace factory from 3x3 row-major gamut and transfer function"
Moved named common transfer functions and gamuts to constexpr values in
SkColorSpace.h, in SkNamedTransferFn and SkNamedGamut namespaces.

Converted nearly all SkColorSpace::MakeRGB calls within Skia to use the
new factory with the named values. Multiple clients want a way to
extract named transfer function and gamut - this still doesn't provide
that, but this may be a better path forward for honestly advertising how
SkColorSpace works internally.

Originally landed as:
https://skia.googlesource.com/skia/+/a9549ab31630fc244094e6f1692371cbaf87f666

Re-landing with a new serialization format, but maintaining ability to
load old serialized color spaces, for SKP compatibility.

Bug: skia:
Change-Id: Ib84a6e1cd5d7d9816175773fdbaff2ca32658667
Reviewed-on: https://skia-review.googlesource.com/c/181176
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-01-05 20:06:51 +00:00
Brian Osman
d4c7458f64 Revert "Add SkColorSpace factory from 3x3 row-major gamut and transfer function"
This reverts commit a9549ab316.

Reason for revert: SKPs changed?

Original change's description:
> Add SkColorSpace factory from 3x3 row-major gamut and transfer function
> 
> Moved named common transfer functions and gamuts to constexpr values in
> SkColorSpace.h, in SkNamedTransferFn and SkNamedGamut namespaces.
> 
> Converted nearly all SkColorSpace::MakeRGB calls within Skia to use the
> new factory with the named values. Multiple clients want a way to
> extract named transfer function and gamut - this still doesn't provide
> that, but this may be a better path forward for honestly advertising how
> SkColorSpace works internally.
> 
> Bug: skia:
> Change-Id: I9296d67e8f0dab5ceb49869cb3ba24e98a05f3c4
> Reviewed-on: https://skia-review.googlesource.com/c/180360
> Reviewed-by: Mike Klein <mtklein@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>

TBR=mtklein@google.com,brianosman@google.com,reed@google.com

Change-Id: Ie888f877b3c1dba33e1a8c0f5fa92594628de7fb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/181300
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-01-04 17:07:48 +00:00
Brian Osman
a9549ab316 Add SkColorSpace factory from 3x3 row-major gamut and transfer function
Moved named common transfer functions and gamuts to constexpr values in
SkColorSpace.h, in SkNamedTransferFn and SkNamedGamut namespaces.

Converted nearly all SkColorSpace::MakeRGB calls within Skia to use the
new factory with the named values. Multiple clients want a way to
extract named transfer function and gamut - this still doesn't provide
that, but this may be a better path forward for honestly advertising how
SkColorSpace works internally.

Bug: skia:
Change-Id: I9296d67e8f0dab5ceb49869cb3ba24e98a05f3c4
Reviewed-on: https://skia-review.googlesource.com/c/180360
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-01-04 14:32:06 +00:00
Brian Salomon
5790420ccc Add new DM via, "ddl2" which records/draws DDLs for each test twice.
Clears between the two DDL runs.

Also, fix up proxy unique key checks in GrSurfaceProxy.

Change-Id: I492e791ebc57a42063f3b828c10d8bf5fee70b1b
Reviewed-on: https://skia-review.googlesource.com/c/178262
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-12-17 20:22:15 +00:00
Brian Salomon
2335644771 Fix occurrences of "-Wextra-semi-stmt"
Docs-Preview: https://skia.org/?cl=173761
Change-Id: Iefdb91cd28eabb4b01b7b42a4f300b0b4caf05d9
Reviewed-on: https://skia-review.googlesource.com/c/173761
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2018-11-30 23:23:09 +00:00
Mike Klein
36528e91c2 clean up SkPipe
One less SkCanvas subclass to deal with...

Change-Id: I21e81648026be5d732e8d9a28baed55015492a04
Reviewed-on: https://skia-review.googlesource.com/c/161584
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-10-12 16:50:21 +00:00
Mike Klein
d295dff5c6 remove SkColorSpaceTransferFn::invert()
Looks like DM may be its only user?
That was me and just for convenience... I can fold it through.

Change-Id: I4ed6ee659df4192e3d6db7ce5b055c4c923673bd
Reviewed-on: https://skia-review.googlesource.com/c/159761
Reviewed-by: Brian Osman <brianosman@google.com>
2018-10-04 20:33:20 +00:00
Mike Klein
4429a4f82c re-precate SkMatrix44::SkMatrix44()
It's been driving me nuts that I can't just write `SkMatrix44 m;`,
and I often don't care whether it's initialized or not.  The default
identity constructor would be nice to use, but it's deprecated.

By tagging this constructor deprecated, we're only hurting ourselves;
our big clients disable warnings about deprecated routines and use it
freely.

A quick tally in Skia shows we mostly use the uninitialized constructor,
but sometimes the identity constructor, and there is a spread of all
three in Chromium.  So I've left the two explicit calls available.

I switched a bunch of calls in Skia to use the less verbose constructor
where it was clear that it didn't matter if the matrix was initialized.
Literally zero of the kUninitialized constructor calls looked important
for performance, so the only place I've kept is its lone unit test.

A few places read clearer with an explicit "identity" to read.

Change-Id: I0573cb6201f5a36f3b43070fb111f7d9af92736f
Reviewed-on: https://skia-review.googlesource.com/c/159480
Reviewed-by: Brian Osman <brianosman@google.com>
2018-10-04 14:01:11 +00:00
Mike Klein
21ba77273d remove DM timestamps
The bot logs record and display their own now,
and they're slightly nicer (color coded!).

Change-Id: I4626f62ed0a12bbd0dd837bcc83d7809e4ae347d
Reviewed-on: https://skia-review.googlesource.com/158663
Auto-Submit: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-10-02 14:49:23 +00:00
Chris Dalton
184c37e61a Add a "bisect" mode to dm for debugging path drawing
Bug: skia:
Change-Id: Idc841545dfe3d33f43c1c8a3cf23199c322f7b11
Reviewed-on: https://skia-review.googlesource.com/156929
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-09-28 17:45:59 +00:00
Brian Osman
87311c6e56 Remove SkPM4fPriv.h includes, then IWYU
Bug: skia:
Change-Id: Ie59aace6ba7ca3685d481fcb3af508629c56f0c3
Reviewed-on: https://skia-review.googlesource.com/157742
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-09-28 15:17:04 +00:00
Mike Klein
ae4b1f484c encode F16/F32 .pngs as Rec2020
This lets us see more of the range of configs like esrgb.

Change-Id: Id8fe3d6d7545b139d905e4a0e587228c85159043
Reviewed-on: https://skia-review.googlesource.com/154380
Auto-Submit: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2018-09-13 15:43:02 +00:00
Mike Klein
ff6a73cc08 add rec2020 configs to DM
Change-Id: Ibbfb69610e8821ff3a7f0c01875c34132ee4d718
Reviewed-on: https://skia-review.googlesource.com/147962
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-08-17 20:46:12 +00:00
Mike Klein
4de0507235 add p3 and ep3 configs to DM
Change-Id: I90ef93b34149750316f4053a65a324894218b984
Reviewed-on: https://skia-review.googlesource.com/147423
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-08-16 18:35:12 +00:00
Brian Osman
e581aaad4d Remove picture_utils
More pointless hoop-jumping

Change-Id: I0123e0a1e27140a82ffe08ad88e0d115c060436d
Reviewed-on: https://skia-review.googlesource.com/146449
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-08-09 14:14:17 +00:00
Mike Reed
5edcd31f2c migrating SkTDArray towards std::vector api
fix for https://skia-review.googlesource.com/c/skia/+/146140

Change from original was to include <initializer_list>

Bug: skia:
Change-Id: Ie36426fcf7ce778a95e2b656ce80a9a394a8307c
Reviewed-on: https://skia-review.googlesource.com/146160
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2018-08-08 15:51:44 +00:00
Mike Reed
f9ecb4e67e Revert "migrating SkTDArray towards std::vector api"
This reverts commit 79884be809.

Reason for revert: broke flutter build -- initializer_list?

Original change's description:
> migrating SkTDArray towards std::vector api
> 
> push -> push_back
> add some aliases to match std::vector: count, reserve, ...
> 
> Bug: skia:
> Change-Id: I1921c31d0d6e5ed3d622a0def6054c697be2d02f
> Reviewed-on: https://skia-review.googlesource.com/145884
> Reviewed-by: Mike Klein <mtklein@google.com>
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Commit-Queue: Mike Reed <reed@google.com>

TBR=mtklein@google.com,fmalita@chromium.org,reed@google.com

Change-Id: Ib6132b725aaed7c01287e3e8c2b5a14da3d3d7e9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/146140
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2018-08-08 15:14:37 +00:00
Mike Reed
79884be809 migrating SkTDArray towards std::vector api
push -> push_back
add some aliases to match std::vector: count, reserve, ...

Bug: skia:
Change-Id: I1921c31d0d6e5ed3d622a0def6054c697be2d02f
Reviewed-on: https://skia-review.googlesource.com/145884
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
2018-08-08 14:43:28 +00:00
Hal Canary
f4abda5877 Revert "Test: New GMs should be nicely named"
This reverts commit 73ec9a09f3.

Reason for revert:
  broke Test-Win7-Clang-Golo-CPU-AVX-x86_64-Debug-All-NativeFonts
    ERROR: 'fontmgr_bounds_1_-0.25Win7' is a bad name.
    ERROR: 'fontmgr_bounds_0.75_0Win7' is a bad name.


Original change's description:
> Test: New GMs should be nicely named
> 
> Motivation:
> 
>     An issue came up a while back with SkQP where some the JUnit testing
>     framework dislikes test names that aren't valid Java identifiers.  I am
>     currently replacing invalid characters with underscores before giving
>     them to JUnit, but that leads to some confusion when trying to grep for
>     the name of a failing test.
> 
>     I propose that going forward, all *new* Skia unit tests and GM names be
>     in the form [A-Za-z][A-Za-z0-9_]* to prevent this sort of confusion.  We
>     won't change 63 existing "bad" tests names.
> 
> This Cl encorces that rule with an assertion in DM.
> 
> Change-Id: Icedce023cd3127d499fbcdcaea485f1ec9e9196b
> Reviewed-on: https://skia-review.googlesource.com/145365
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Hal Canary <halcanary@google.com>

TBR=halcanary@google.com,brianosman@google.com

Change-Id: I28c619ca767dac221a73594c9e7be412ba2c242c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/145560
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-08-06 19:29:55 +00:00
Hal Canary
73ec9a09f3 Test: New GMs should be nicely named
Motivation:

    An issue came up a while back with SkQP where some the JUnit testing
    framework dislikes test names that aren't valid Java identifiers.  I am
    currently replacing invalid characters with underscores before giving
    them to JUnit, but that leads to some confusion when trying to grep for
    the name of a failing test.

    I propose that going forward, all *new* Skia unit tests and GM names be
    in the form [A-Za-z][A-Za-z0-9_]* to prevent this sort of confusion.  We
    won't change 63 existing "bad" tests names.

This Cl encorces that rule with an assertion in DM.

Change-Id: Icedce023cd3127d499fbcdcaea485f1ec9e9196b
Reviewed-on: https://skia-review.googlesource.com/145365
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-08-06 19:17:24 +00:00
Hal Canary
972eba3c5c sk_tool::Registry: make an iterator.
Change-Id: Icf4e31b50bbd91b7ea330a1300f736d6dfd0a41c
Reviewed-on: https://skia-review.googlesource.com/144500
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
2018-08-01 16:59:19 +00:00
Mike Klein
48b649060c remove SkThreadedBMPDevice and friends
It is unused, is becoming a maintainence burden and source of bugs,
and takes up a lot of time on the *SAN bots.

Change-Id: If383eb6e4838ca23140f9e16d518b1bfc655fa12
Reviewed-on: https://skia-review.googlesource.com/143307
Auto-Submit: Mike Klein <mtklein@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2018-07-25 18:17:26 +00:00
Brian Osman
a76b7a9ded More color space improvements to DM
Added P3 configs (tagged surface and SkColorSpaceXformCanvas)

Added logic to tag the output PNGs when using a xform canvas,
so the images look correct in Chrome (and work correctly with
skdiff).

We don't use the gamma_correct tag for much in gold, but only
set it for outputs with a linear transfer function.

Change-Id: Iee713682e5010b0bd3212538a6dcb201ae4e8592
Reviewed-on: https://skia-review.googlesource.com/142170
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2018-07-19 21:04:56 +00:00
Florin Malita
f1ba3ae6f7 [skottie] Update DM src name to "lottie"
Change-Id: I82ec9cace172ed254b7325ff315ac82f2ae30a35
Reviewed-on: https://skia-review.googlesource.com/142581
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-07-19 19:43:25 +00:00
Eric Boren
8c172ba397 [infra] Add infra support for Lottie
Bug: skia:8136
Change-Id: I18c4ad549c52346ebfe23d172597d5da205e5c4d
Reviewed-on: https://skia-review.googlesource.com/142105
Commit-Queue: Eric Boren <borenet@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
2018-07-19 17:53:25 +00:00
Ben Wagner
83c6b96bcd Improve SkTestFontMgr.
This moves the portable typefaces into the portable font manager.

Change-Id: Id25e8f0b90f99c82d09cfb3ef136bda8c7728ee9
Reviewed-on: https://skia-review.googlesource.com/140351
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-07-13 15:01:04 +00:00
Brian Osman
b62f50cf76 Replace nearly all kRespect with kIgnore
- Encoders and decoders always assume kIgnore.
- They are less opinionated about F16 and color space,
  we just trust the color space that's passed in, and
  put that directly in the image (no sRGB encoding).
- SkBitmap and SkPixmap read/write pixels functions were
  defaulting to kResepct, those are now always kIgnore.
- Many other bits of plumbing are simplified, and I
  added a default of kIgnore to SkImage::makeColorSpace,
  so we can phase out that argument entirely.
- Still need to add defaults to other public APIs that
  take SkTransferFunctionBehavior.

- This makes gold think that we've dramatically changed
  the contents of all F16 images, but that's because
  it doesn't understand the (now linear) color space
  that's embedded. Once we triage them all once, they
  will work fine (and they'll look perfect in the browser).

Bug: skia:
Change-Id: I62fa090f96cae1b67d181ce14bd91f34ff2ed747
Reviewed-on: https://skia-review.googlesource.com/140570
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-07-12 20:54:14 +00:00
Brian Salomon
00a5eb8c12 Add gltestpersistentcache config that tests GrContextOption's cache.
Uses a new GPU sink that runs each test twice, once to populate the
cache and then again with a new GrContext but a warmed cache. It
verifies that the two generated images are the same.

Change-Id: Iaba195a69751f14ea946afe7174228a813b83a63
Reviewed-on: https://skia-review.googlesource.com/140567
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2018-07-11 20:06:33 +00:00
Brian Osman
9c7f7f22d2 Always unpremul nonlinearly before writing PNGs in DM
Makes gl and glsrgb agree on several more GMs.

Bug: skia:
Change-Id: I6c233742c188e4f29212f0e9e1281a214457d458
Reviewed-on: https://skia-review.googlesource.com/139765
Auto-Submit: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2018-07-09 15:21:16 +00:00
Ben Wagner
9eb1c7d80f Revert "Revert "Remove gCreateTypefaceDelegate.""
This reverts commit 58a1605d2b.
Try to make glyph paths as immutable as possible.

Change-Id: Ibef920c4417304e37ca4d4384515e9e7fc31aabf
Reviewed-on: https://skia-review.googlesource.com/139172
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2018-07-05 13:09:26 +00:00
Ethan Nicholas
58a1605d2b Revert "Remove gCreateTypefaceDelegate."
This reverts commit 3241149b8c.

Reason for revert: TSAN failures, e.g. https://chromium-swarm.appspot.com/task?id=3e7a42da25efd510&refresh=10

Original change's description:
> Remove gCreateTypefaceDelegate.
> 
> The PortableFontMgr is used instead.
> 
> Change-Id: I03ecdcbef380dde2b206293e17a325cad69d7514
> Reviewed-on: https://skia-review.googlesource.com/139165
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: Ben Wagner <bungeman@google.com>

TBR=mtklein@google.com,bungeman@google.com

Change-Id: I9799f0637c1d39ee397c30645aa569b93dfee593
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/139280
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
2018-07-03 19:34:28 +00:00
Ben Wagner
3241149b8c Remove gCreateTypefaceDelegate.
The PortableFontMgr is used instead.

Change-Id: I03ecdcbef380dde2b206293e17a325cad69d7514
Reviewed-on: https://skia-review.googlesource.com/139165
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2018-07-03 18:13:55 +00:00
Mike Klein
701a35812e unify term/crash handlers, include SIGINT
We print different things for crashes and for external termination
signals, which is a waste.  Might as well print the union for all.

This adds SIGINT (Ctrl-C, signal 2, exit code 130) to the list too.

(The flag to ignore sigint should still work.)

Change-Id: I91db023eb68e4798eed15d1f4d76b20b52a174cc
Reviewed-on: https://skia-review.googlesource.com/138160
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
2018-06-28 15:36:47 +00:00
Mike Klein
3785471ff6 basic first pass at RGBA F32 support
Draws basically the same as f16.

The existing load_f32, load_f32_dst, and store_f32 stages all had the
same bug that we'd never noticed because dy was always 0 until now.

Change-Id: Ibbd393fa1acc5df414be4cdef0f5a9d11dcccdb3
Reviewed-on: https://skia-review.googlesource.com/137585
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2018-06-26 19:02:52 +00:00
Mike Klein
0e4041f5c9 update software DM/nanobench configs for color testing
- Rename 'srgbnl' to just 'srgb'.
- Add 'narrow' and 'enarrow' for testing a gamut narrower than sRGB.

Tested by running xfermodes2 in DM... all look different, what a mess.
I also ran a few nanobenches and they seemed somewhat sane.

Change-Id: Iacdc391dc0eef4153a76f5b4f78d72c57a4371ee
Reviewed-on: https://skia-review.googlesource.com/135871
Commit-Queue: Mike Klein <mtklein@chromium.org>
Auto-Submit: Mike Klein <mtklein@chromium.org>
Reviewed-by: Brian Osman <brianosman@google.com>
2018-06-19 21:15:18 +00:00
Mike Klein
6120164138 remove "srgb" config from DM,nanobench
Now that "srgb" is broken I don't want to accidentally run it.
"srgbnl" if of course identical, and not broken so much as
simply not yet working.  :)

While here, simplify the configs we run in nanobench too, eliminating
565 and moving F16 to GCE-only (i.e. fast, abundant machines).

Similarly, remove "adobe" VIA that doesn't use Adobe RGB correctly...

Change-Id: Ic295dec97a2caadadbe8500655243db36dd2c43d
Reviewed-on: https://skia-review.googlesource.com/132932
Commit-Queue: Mike Klein <mtklein@chromium.org>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Mike Klein <mtklein@chromium.org>
Reviewed-by: Brian Osman <brianosman@google.com>
2018-06-07 19:12:11 +00:00