Commit Graph

1019 Commits

Author SHA1 Message Date
Robert Phillips
9882dae24d Reduce usage of SkCanvas::flush
SkCanvas::flush is problematic and we wish to deprecate it. As a first step, this CL begins to remove Skia's internal usage of it.

Ideally clients would use SkSurface::flush and/or GrContext::flush.

Change-Id: I39bb0702f8230134a97961a4ee70833fd5bd0dcc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/196641
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
2019-03-04 22:09:39 +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
Brian Salomon
7d88f310a9 Remove support for SkDeferredDisplayListRecorder::DelayReleaseCallback::kNo.
Bug: skia:8800
Change-Id: I39d1ac62ab9a0d4f987c23de96c644aa9b2fa70e
Reviewed-on: https://skia-review.googlesource.com/c/196161
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-02-28 19:02:20 +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
Florin Malita
562017b086 [SVGCanvas] Clean up public factories
Remove the internal-only/XMLWriter-based factory.

Update SkSVGDevice to always own the xml writer.

The only internal client passing an interesting XMLWriter is
SVGDeviceTest - update to use the device factory directly.

While at it, update the SkSVGDevice factory to return smart pointers
(Create -> Make).

Change-Id: Ibda1ca86ef9fb81ab512822000835ace1af67978
Reviewed-on: https://skia-review.googlesource.com/c/192580
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-02-14 19:17:35 +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
Chris Dalton
50e24d7d5f Add a mechanism for GMs to silently exclude themselves from Gold
This is useful, for example, when trying to test a hardware feature
that isn't supported in the current context.

Bug: skia:8731
Change-Id: I9a363159300c92e4039bfd05400238c27002efb1
Reviewed-on: https://skia-review.googlesource.com/c/189133
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-02-08 00:05:15 +00:00
Robert Phillips
9da87e0e98 Rename GrContext::contextPriv to priv
Mechanical. This makes the priv() accessor the same for all the context types.

Change-Id: I40850eb05a33b8d7cc3eabdd42226d24b2ba58aa
Reviewed-on: https://skia-review.googlesource.com/c/189164
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2019-02-04 22:13:14 +00:00
Brian Salomon
f55e8d5232 Add option to skip intermediate release/fulfill calls for promise images.
SkiaRenderer does not delete promise image textures when they are released
but not done. Refulfilling promise image textures takes a significant amount
of CPU time. This allows us to fulfill each promise image once.

Bug: skia:8736
Change-Id: I7ad7fa9678ed0ec4bb714b71fbf920ab4a845409
Reviewed-on: https://skia-review.googlesource.com/c/188039
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-01-31 16:24:52 +00:00
Brian Osman
d8a90f9be1 Converting more debug code to SkJSONWriter
All of SkDrawCommand / SkDebugCanvas now uses SkJSONWriter.
Also removed the bespoke json generator and pretty-printer
in GrAuditTrail. This was the largest volume of code still
using JsonCPP. (There are other stragglers).

Bug: skia:
Change-Id: I3aee554764689ce50c8e707caf26c76093b9bb8f
Reviewed-on: https://skia-review.googlesource.com/c/187040
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-01-28 19:06:06 +00:00
Brian Osman
fad5c773f7 Convert DM's -r JSON parsing to SkJSON
Bug: skia:
Change-Id: I987f527dbd742453422073f8e2b28d824f8a62eb
Reviewed-on: https://skia-review.googlesource.com/c/186879
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-01-25 22:35:45 +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
Brian Osman
aae638807c Switch DM JSON output to use SkJSONWriter
Bug: skia:
Change-Id: I3ceccd050a294260da54ff8a01a4837eb0cfb369
Reviewed-on: https://skia-review.googlesource.com/c/186866
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-01-25 15:39:13 +00:00
Hal Canary
3026d4b1b8 SkDocument: use auto for MakeDocument().
A later CL will make this return a unique_ptr<SkDocument>.

Bug: skia:5972
Change-Id: Ie10d6c07d5f2524ecb71d906db0d37427827225d
Reviewed-on: https://skia-review.googlesource.com/c/181660
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2019-01-17 19:16:28 +00:00
Brian Salomon
1bf0ed8584 Make GrTexture caching for SkPromiseImageTexture work when same texture
fulfills a different SkImage.

Bug: skia:8613
Change-Id: I7ee14112c69f8aaef223a37dda455259b501a2bf
Reviewed-on: https://skia-review.googlesource.com/c/184440
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-01-16 22:06:53 +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
Hal Canary
72b91cbcc0 DM: distinguish between reading and parsing in error messages
Change-Id: Ia79101dfc874f767d72014666943724e05ee8483
Reviewed-on: https://skia-review.googlesource.com/c/183803
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
2019-01-14 18:28:03 +00:00
Brian Salomon
cdd8a0a0e8 Revert "Revert "Reuse GrTexture instances when the same GrBackendTexture is used to""
This reverts commit 426ba463d5.

Bug: skia:8613
Change-Id: Iacaf40549369110aa95015e8d4579ec41db22d13
Reviewed-on: https://skia-review.googlesource.com/c/182963
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-01-10 17:51:21 +00:00
Brian Salomon
426ba463d5 Revert "Reuse GrTexture instances when the same GrBackendTexture is used to"
This reverts commit 559c617137.

Reason for revert: breaking things

Original change's description:
> Reuse GrTexture instances when the same GrBackendTexture is used to
> repeatedly fulfill a promise SkImage.
> 
> Bug: skia:8613
> 
> Change-Id: I35c76435d630d2daa034e0c3efb59666bfd6882a
> Reviewed-on: https://skia-review.googlesource.com/c/175820
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

TBR=bsalomon@google.com,robertphillips@google.com

Change-Id: I7548809945d0a875fdb9387398bbc45e733c0846
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:8613
Reviewed-on: https://skia-review.googlesource.com/c/182960
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
2019-01-10 16:33:11 +00:00
Brian Salomon
559c617137 Reuse GrTexture instances when the same GrBackendTexture is used to
repeatedly fulfill a promise SkImage.

Bug: skia:8613

Change-Id: I35c76435d630d2daa034e0c3efb59666bfd6882a
Reviewed-on: https://skia-review.googlesource.com/c/175820
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2019-01-10 16:10:59 +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
Greg Daniel
a870b46c79 Add ability to write out VkPipelineCache to gpu PersistentCache.
Bug: skia:
Change-Id: Id13d680401f69a074ae0c85f9ceaf3308fccb129
Reviewed-on: https://skia-review.googlesource.com/c/181403
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2019-01-08 21:18:51 +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
8d23a584fc In ddl2 via clear to transparent between runs.
Change-Id: I0cc904a76b30212a66b1cc00abdf2fff7686acc4
Reviewed-on: https://skia-review.googlesource.com/c/179240
Auto-Submit: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-12-19 17:46:44 +00:00
Hal Canary
f34131ae9b SkPDF: even more PDFIndirectRefs
* SkPDFUnion.h hidden.
  * SkPDFObjectSerializer::serializeObject gone.
  * SkPDFDocument::serialize gone
  * SkPDFMetadata::MakeXMPObject return PDFIndirectRef
  * SkPDFTag rewritten from scratch.
  * SkPDFObject::addResources virtual gone.
  * SkPDFObject::drop virtual gone.
  * SkPDFArray::appendObjRef gone.
  * SkPDFDict::insertObjRef gone.
  * SkPDFDict::Record becomes std::pair
  * SkPDFObjNumMap gone;
  * SkPDFObject::fIndirectReference gone;

Bug: skia:8630
Change-Id: I7425eef30548b54f10fbfe96dd502800cb150caf
Reviewed-on: https://skia-review.googlesource.com/c/178935
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-12-19 03:20:42 +00:00
Hal Canary
9a3f554154 SkPDF: refactor streams, experimental threading
All PDF Streams are immediatly serialized, and are never long-lived
    in memory.

    if EXPERIMENTAL fExecutor is set on the Document, streams are
    compressed in parallel.

    Results for PDFBigDocBench:

        without patch                    1807885.01 μs
        with    patch without executor   1802808.35 μs
        with    patch with    executor    246313.72 μs

    SkPDFStreamOut() function replaces SkPDFStream classes.

    Page resources are all serialized early.

    Several Document-level objects are serialzied early.

    SkUUID introduced as top-level object.

    Many {insert|append}ObjRef() converted to memory efficient
    {insert|append}Ref().

Bug: skia:8630
Change-Id: Ic336917d0c8b9ac1c2423b43bfe9b49a3533fbff
Reviewed-on: https://skia-review.googlesource.com/c/176588
Auto-Submit: Hal Canary <halcanary@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
2018-12-18 20:48:25 +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
Florin Malita
a8316554cb [skottie] Make animated image support generally available
Consolidate some helpers under skottie_utils, and update all related
tools to support animated images.

TBR=
Change-Id: If08e97143a11d9a414f3230a49ab4284c508b9d0
Reviewed-on: https://skia-review.googlesource.com/c/169342
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2018-11-10 19:52:19 +00:00
Mike Klein
b11ab578ad remove src/jumper
The distinction between SkJumper and SkRasterPipeline used
to be important, but it's no longer.  This CL moves everything
under src/jumper to the appropriate SkRasterPipeline file.

Change-Id: I1181fffafccb3dc4c4eb5f33b442c719ee370462
Reviewed-on: https://skia-review.googlesource.com/c/164627
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-10-24 11:15:58 +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
Greg Daniel
bdf12ad8d5 Move GrBackend enum to enum class.
Bug: skia:
Change-Id: I8add2470313549723be6720b543091c444d2eb4f
Reviewed-on: https://skia-review.googlesource.com/c/161680
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
2018-10-12 14:01:58 +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
Michael Ludwig
e8e1075a9e Add input/output image logging to processor tests
Moves SkBitmap to base64 uri code into test utils

Bug: skia:
Change-Id: I4f92761fd2e643c38ed00a200b1cb62778a85948
Reviewed-on: https://skia-review.googlesource.com/158340
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
2018-10-01 18:30:06 +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
Brian Osman
5ea41fc89b Remove more SkColorSpaceXform (and friends)
- gammaencodedpremul GM was just demonstrating something that we
  understand well (and have much better testing for).
- readpixels GM was filled with workarounds for things that are no
  longer true (unpremul images, clamped F16).
- Other uses can be switched to SkConvertPixels trivially.
- Remove SkColorSpaceXformPriv and SkColorLookUpTable, all unused.
- Remove SkColorSpaceXform_skcms.cpp, no longer referenced by clients.

Bug: skia:
Change-Id: I7298bb53aa61b49ad1398ebc504d35c119fd5cf4
Reviewed-on: https://skia-review.googlesource.com/157153
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-09-26 22:30:05 +00:00
Hal Canary
23564b9249 SkDocument: Factories now located in SkPDFDocument.h and SkXPSDocument.h
Change-Id: I48e73b27e52511292c2c0bd51ef0168766f53a80
Reviewed-on: https://skia-review.googlesource.com/152780
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2018-09-20 18:21:07 +00:00
Brian Osman
133823d9a7 Load SVGs into memory before parsing
On my Z840, Windows-Clang-Debug, this cuts the total time to construct
(parse) the 72 SVG sources from 66 seconds to 40 seconds. That's still
awful, but all the time is now spent in expat, so further improvements
will require higher level changes.

Bug: skia:
Change-Id: I0dca67ee18652f6fb8647fe8706716d9a01f7cdf
Reviewed-on: https://skia-review.googlesource.com/155603
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-19 18:35:59 +00:00
Hal Canary
8a00144035 test,tools: whitespace changes for clang-format
Change-Id: I67529f6c0ac26da603f60af22c620f8f603d8a19
Reviewed-on: https://skia-review.googlesource.com/155564
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
2018-09-19 17:50:51 +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
Cary Clark
a24712e4dc Revert "makeSurface defaults to raster"
This reverts commit 29a4a684af.

Reason for revert: some configs fail

Original change's description:
> makeSurface defaults to raster
> 
> Rather that returning nullptr for a recording
> canvas, return a raster canvas instead.
> 
> R=​reed@google.com,robertphillips@google.com
> 
> Bug: skia:
> Change-Id: I211d8ef368b9aec6d14cc72d1652ac6a03f3fa7b
> Reviewed-on: https://skia-review.googlesource.com/151666
> Commit-Queue: Cary Clark <caryclark@skia.org>
> Reviewed-by: Robert Phillips <robertphillips@google.com>

TBR=robertphillips@google.com,reed@google.com,caryclark@skia.org

Change-Id: I82d2c3e4589a2ca8523bbf86884ed68b1431631d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/151824
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
2018-09-05 18:41:45 +00:00
Cary Clark
29a4a684af makeSurface defaults to raster
Rather that returning nullptr for a recording
canvas, return a raster canvas instead.

R=reed@google.com,robertphillips@google.com

Bug: skia:
Change-Id: I211d8ef368b9aec6d14cc72d1652ac6a03f3fa7b
Reviewed-on: https://skia-review.googlesource.com/151666
Commit-Queue: Cary Clark <caryclark@skia.org>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2018-09-05 17:36:49 +00:00
Brian Osman
cca8c6fa47 SkColorSpace cleanup
Remove SkColorSpace_XYZ, no need for an interface with one
implementation.

Change-Id: I47a23293334b5e02a6e5af8356b3df0262f86d5a
Reviewed-on: https://skia-review.googlesource.com/150138
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-09-04 15:48:02 +00:00
Leon Scroggins III
d6832d047c Remove some references to defunct kIndex_8
Bug: skia:6828
Bug: skia:3338
Bug: skia:3339

The comment for five_reference_pixels seems to suggest removing
the default case, but we already have new SkColorTypes, leaving
the default seems like the right approach for now.

Remove premultiply_if_necessary. We can now draw unpremultiplied
bitmaps, so it's never necessary.

Remove a TODO related to kIndex8

Change-Id: Iafdab22bb6453e4b5bba7278b12d27788cc7d037
Reviewed-on: https://skia-review.googlesource.com/151362
Commit-Queue: Leon Scroggins <scroggo@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Leon Scroggins <scroggo@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-09-04 15:32:34 +00:00