To keep things sane, move SkNx and SkHalf to include/private
Bug: skia:
Change-Id: Iaee8c3f92a2720bf97583c3f326486d4ce462e8b
Reviewed-on: https://skia-review.googlesource.com/c/165344
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
We're going to use half-floats, which are far more future-proof.
Bug: skia:
Change-Id: I6e098017381256d6e750ac546c353072802282cb
Reviewed-on: https://skia-review.googlesource.com/c/165522
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
These are meant to enable several things (eventually)
- fission Align off of paint
- fission TextEncoding off of paint
- fission SkFont of of paint
The first one is explicitly enabled here. The others will (I plan) follow later.
The final state of the world (the goal)
- paint has no font-ish parameters (no typeface or size)
- font has no paint-ish parameters (no aa or lcd)
- neither has alignment or encoding
Bug: skia:8493, skia:8501
Change-Id: I5fcb945b6bcab30ef5e7019dfccb682661f56230
Reviewed-on: https://skia-review.googlesource.com/c/165061
Auto-Submit: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Bug: skia:
Change-Id: I91b9816aae74726762c123d9f3454c5961382b7b
Reviewed-on: https://skia-review.googlesource.com/c/164680
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
This is a reland of c96740729a
Original change's description:
> Some more clean-up of YUVA code
>
> * Restore pre-colortype interface
> * Remove other colortype references
>
> Bug: skia:7903
> Change-Id: I0db6d61e78d719ff941ac195bcbed4416f7d3138
> Reviewed-on: https://skia-review.googlesource.com/c/164610
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
Bug: skia:7903
Change-Id: Iae89ccfa370433663bddf74c14cd1a0e5e6b6d4b
Reviewed-on: https://skia-review.googlesource.com/c/164688
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
... both of these should be removed eventually. See related bugs to 2664
Bug: skia:2664
Change-Id: I49cd78380d84e5383a2a2742fa4dda98cf3d0194
Reviewed-on: https://skia-review.googlesource.com/c/164689
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
This reverts commit c96740729a.
Reason for revert: looks like this broke a bunch of layout tests on the Chrome roll.
Original change's description:
> Some more clean-up of YUVA code
>
> * Restore pre-colortype interface
> * Remove other colortype references
>
> Bug: skia:7903
> Change-Id: I0db6d61e78d719ff941ac195bcbed4416f7d3138
> Reviewed-on: https://skia-review.googlesource.com/c/164610
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
TBR=jvanverth@google.com,bsalomon@google.com
Change-Id: Ic04955ad526774080dad79852a974b1b3743dfe0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7903
Reviewed-on: https://skia-review.googlesource.com/c/164683
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Tentative roadmap:
- land this
- extend TextBlobBuilder to take SkFont for its runs (eventually removing paint option)
- change SkTextBlob to store SkFont instead of SkRunFont (not critical, but makes sense)
After the above, (or during) also work towards:
- removing callers of SkPaint set... (textsize, textscalex, typeface, etc.)
- eventually physically remove those setters/getters/fields
- rev as desired the SkFont API to clean up flags, hinting, etc.
Bug: skia:2664
Change-Id: I0e323c58aef055e26d697911b078797453cb3626
Reviewed-on: https://skia-review.googlesource.com/c/163783
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Bug: skia:7903
Change-Id: I7301d943b679a4670511b6cf60c594baf615834a
Reviewed-on: https://skia-review.googlesource.com/c/164261
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Initialize felt a little too nebulous, and I think
the verb for "define registrar entry" is "register".
Change-Id: I52f2eb5df5acd46a8b38bb9ea9bb07f4ac8f3789
Reviewed-on: https://skia-review.googlesource.com/c/163990
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
I don't think there's any reason to register any of these types
for deserialization unless the client is using deserialization.
Change-Id: Iea02670f3b6e99851061ac4ec784a6f372a5903b
Reviewed-on: https://skia-review.googlesource.com/c/163988
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
The NameToType() function and type argument passed to Register are never
used, so remove them.
While we're at it, switch the stragglers over to use the
SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY macro. The only remaining direct
calls to Register are for legacy effect names, to be deleted in another
CL.
Change-Id: Ia304f960360a6f55b25f6e4eb2aa45533ee13476
Reviewed-on: https://skia-review.googlesource.com/c/163987
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Bug: skia:
Change-Id: I5c0304cf75f938b20720eaffd2349036da965190
Reviewed-on: https://skia-review.googlesource.com/c/163890
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>
This should let getTypeName() and serialization work even
when deserialization factories haven't been registered.
I've made getTypeName() pure virtual like getFactory(),
and moved all the overrides into SK_FLATTENABLE_HOOKS,
cleaning up all the various ways we've done it before.
All the subclasses override getTypeName() and getFactory()
privately, so there should be no need to document them?
Change-Id: I723cb20099d250c2f2a10be266e3aacc6a061937
Reviewed-on: https://skia-review.googlesource.com/c/163543
Reviewed-by: Cary Clark <caryclark@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
If supported, an Sk*Device can take charge of handling of an SkDrawable.
The specific use case right now will be to use this to execute Vulkan
specific SkDrawable's that need to know information about our Vulkan state
and objects at the time the SkDrawable is executed. If a device does not
support the SkDrawable we fall back to the cavans version like we did
previously.
BUG=skia:
Change-Id: I821fa600a80ff645412f296be36990ef390ae0a9
Reviewed-on: https://skia-review.googlesource.com/c/7740
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
This reverts commit 0f7e55a818.
Reason for revert: Chrome roll, even alone (https://chromium-review.googlesource.com/c/chromium/src/+/1290785), maybe Android roll too?
Original change's description:
> Use OpenGL sampler objects when available.
>
> Bug: skia:8471
> Change-Id: Ida3d08aa72772b8bbd08707048182bee5d27407c
> Reviewed-on: https://skia-review.googlesource.com/c/163123
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
TBR=egdaniel@google.com,bsalomon@google.com,brianosman@google.com
Change-Id: Ieee6823e83b9992a7281806b5a9156cd91fb22b9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:8471
Reviewed-on: https://skia-review.googlesource.com/c/163780
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Bug: skia:8471
Change-Id: Ida3d08aa72772b8bbd08707048182bee5d27407c
Reviewed-on: https://skia-review.googlesource.com/c/163123
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Bug: skia:7901
Change-Id: Ic83e9f0c2a493335671fe431ffba6f649812d406
Reviewed-on: https://skia-review.googlesource.com/c/163481
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
This reverts commit 0c583af06d.
Reason for revert: DDL is failing
Original change's description:
> Widen internal API to support more complex YUV formats
>
> Bug: skia:7901
> Change-Id: I46fec08711b8b483cf58ccae733e4dc2a9689231
> Reviewed-on: https://skia-review.googlesource.com/c/162280
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com
Change-Id: Ibe3dd7abbce4a3b6afe74c565198dadc61a9f439
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:7901
Reviewed-on: https://skia-review.googlesource.com/c/163257
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Bug: skia:7901
Change-Id: I46fec08711b8b483cf58ccae733e4dc2a9689231
Reviewed-on: https://skia-review.googlesource.com/c/162280
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Current savings : 96K on intel mac
Breaks -- these subclass don't have a pipeline
- emboss
- perlinnoise
For now, shadercontext is still on -- clients must opt-out with SK_DISABLE_LEGACY_SHADERCONTEXT
Bug: skia:
Change-Id: Idd14cae4013e8de92f16b0707f8b8d43bb6d11dd
Reviewed-on: https://skia-review.googlesource.com/c/162362
Auto-Submit: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
All uses have been converted to SkPMColor4f (or similar).
Bug: skia:
Change-Id: I220bd5eaf6c35b17321c1e8bc92ace7ff92908c4
Reviewed-on: https://skia-review.googlesource.com/c/162749
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This adds SkPMColor4f conversions to/from RGBA bytes (ie GrColor).
I had previously made some free functions that did the same thing.
I'm ambivalent about which option is nicer, but wanted to have one
method, so I converted everything to use the new versions.
Bug: skia:
Change-Id: I4194c44b5bd12228075fd1932a14cf31c8d6a3c1
Reviewed-on: https://skia-review.googlesource.com/c/162560
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Bug: skia:
Change-Id: I11109b35558630e60118653c9c72a976bc6e4650
Reviewed-on: https://skia-review.googlesource.com/c/159151
Reviewed-by: Mike Klein <mtklein@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Previously we didn't do this at all for multiple-texture ops.
Improve the test detecting when filtering can be disabled.
Make draw_image_set GM create tiles with pixel of overlap for correct
filtering.
Add draw_image_set_rect_to_rect to exercise filtering/aa disablement
in combination with tiling.
Makes SkGpuDevice filter out inverted src rects (as is done implicitly
in SkBaseDevice by relying on drawImageRect).
Puts GrTextureOp::fFilter in bitfield.
Change-Id: Iee96cb54d665877c7f4aee422a3a7af2b249b1d6
Reviewed-on: https://skia-review.googlesource.com/c/161641
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Change the behavior from allocating only the memory needed for T.
to an exponential growth starting at 1024.
Change-Id: Id37e0fb9e269feebf669ebc73f9e26dcd0589452
Reviewed-on: https://skia-review.googlesource.com/c/162102
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Herb Derby <herb@google.com>
No API changes
TBR=reed
NOTRY=TRUE
Bug: skia:
Change-Id: I1ffde14bc6ebf0cf3d89735f70fb9a385b35d167
Reviewed-on: https://skia-review.googlesource.com/c/161940
Commit-Queue: Heather Miller <hcm@google.com>
Reviewed-by: Heather Miller <hcm@google.com>
This reverts commit 11422c63d3.
Reason for revert: Perf regression
Original change's description:
> Tie mip map cache purging to Images, not Bitmaps/PixelRefs
>
> We were potentially using different keys for lookup vs. add, because we
> were adding with a key based on the pixelRef, which may not have the
> same uniqueID as the originating image.
>
> Bug: skia:
> Change-Id: Ib4d3d5ead9f5a574cf6d1920080bc9c4ae66c1d0
> Reviewed-on: https://skia-review.googlesource.com/c/161625
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
TBR=mtklein@google.com,brianosman@google.com,reed@google.com
Change-Id: I9bdce1c6b1d9bf13cc477d2e7f20f7cc0f204b2f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/161828
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
* Fixes isTextureBacked() for SkImage_GpuYUVA
* Hooks in SkImage_GpuYUVA::MakePromiseYUVATexture()
* Pass down plane texture sizes to MakePromiseYUVATexture()
* Move some other methods to SkImage_GpuBase.
Bug: skia:7901
Change-Id: I33d62c16b426abba5830f7168f9f8fd54a0cb093
Reviewed-on: https://skia-review.googlesource.com/c/161149
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
are not recyclable.
Change-Id: I5ff9c48b3d7b37531a3f052bd5188a8afcacf3cb
Reviewed-on: https://skia-review.googlesource.com/c/161860
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
We were potentially using different keys for lookup vs. add, because we
were adding with a key based on the pixelRef, which may not have the
same uniqueID as the originating image.
Bug: skia:
Change-Id: Ib4d3d5ead9f5a574cf6d1920080bc9c4ae66c1d0
Reviewed-on: https://skia-review.googlesource.com/c/161625
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This reverts commit 0a0304c426.
Reason for revert: Breaking metal
Original change's description:
> Add experimental API to draw a set of SkImages in one SkCanvas call.
>
> The client provides a src and dst rect for each image as well as
> a bitfield that indicates whether each edge of the image should be
> antialiased. This per-edge AA is useful for tiled compositors.
>
> Rather than take a full SkPaint this API only takes an alpha, a filter
> quality (which is pinned to kLow), and a blend mode. This is a likely
> point of future evolution.
>
> Currently the API is only fully implemented for kSrcOver on the GPU
> backend. With other blend modes or on other backends AA will be ignored
> for images that do not have all four edge AA flags set.
>
> BUG: skia:8444
>
> Change-Id: I143998dda8ad6a25f64e18cd600392ba553030ac
> Reviewed-on: https://skia-review.googlesource.com/c/159062
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
TBR=mtklein@google.com,bsalomon@google.com,brianosman@google.com,reed@google.com
Change-Id: I815baaeee5de9c6722cf2b9d071a8e2f7c1b6a96
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/161622
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
The client provides a src and dst rect for each image as well as
a bitfield that indicates whether each edge of the image should be
antialiased. This per-edge AA is useful for tiled compositors.
Rather than take a full SkPaint this API only takes an alpha, a filter
quality (which is pinned to kLow), and a blend mode. This is a likely
point of future evolution.
Currently the API is only fully implemented for kSrcOver on the GPU
backend. With other blend modes or on other backends AA will be ignored
for images that do not have all four edge AA flags set.
BUG: skia:8444
Change-Id: I143998dda8ad6a25f64e18cd600392ba553030ac
Reviewed-on: https://skia-review.googlesource.com/c/159062
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
For destinations, Premul vs. Unpremul is actually meaningful
for these color types - it determines whether or not we divide
through by alpha after blending. Opaqueness ought to just be
a performance hint, and only for sources.
Bug: skia:
Change-Id: I801a64316ec9c92642982cd2096f8bec9a7855f3
Reviewed-on: https://skia-review.googlesource.com/c/161423
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This reverts commit 9835dd51b3.
Reason for revert: Chrome unit tests failing?
Original change's description:
> Fix image info checking for always-opaque color types
>
> The old code overlooked 101010x and 888x. The GPU code for
> readPixels tried to enfore this, but incorrectly, and the
> writePixels code missed it entirely.
>
> Bug: skia:
> Change-Id: Ib69473703f2ae7604d4b21ec6728b7d764becd9a
> Reviewed-on: https://skia-review.googlesource.com/c/161148
> Commit-Queue: Brian Osman <brianosman@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>
> Auto-Submit: Brian Osman <brianosman@google.com>
TBR=mtklein@google.com,bsalomon@google.com,brianosman@google.com
Change-Id: I360375f2bf21576db914f5e177ac56e398ca7023
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/161380
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
The old code overlooked 101010x and 888x. The GPU code for
readPixels tried to enfore this, but incorrectly, and the
writePixels code missed it entirely.
Bug: skia:
Change-Id: Ib69473703f2ae7604d4b21ec6728b7d764becd9a
Reviewed-on: https://skia-review.googlesource.com/c/161148
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
This reverts commit c0a74a1f76.
Reason for revert: made flutter 7K bigger for no real gain.
Original change's description:
> SkTArray: clean up, no change to behaviour
>
> Change-Id: I15883216995a0ffe1ee1b183291cf0ea5867f613
> Reviewed-on: https://skia-review.googlesource.com/c/161042
> Commit-Queue: Hal Canary <halcanary@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>
TBR=mtklein@google.com,halcanary@google.com
Change-Id: I10756cd384c352ede68636a08e7cdd83c6833e4f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/161260
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Change-Id: I15883216995a0ffe1ee1b183291cf0ea5867f613
Reviewed-on: https://skia-review.googlesource.com/c/161042
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Bug: skia:7901
Change-Id: I8722373148f99cb16e2aa9c825832bb83fa4e979
Reviewed-on: https://skia-review.googlesource.com/c/161043
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
This bug was introduced in https://skia-review.googlesource.com/c/skia/+/160162 (Make GrYUVtoRGBEffect more flexible)
I don't know why I wasn't seeing this locally!
Change-Id: Ic4d9b88b70c6d691d1e30d5ee0dc592a00b9b4e7
Reviewed-on: https://skia-review.googlesource.com/c/161044
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
also:
delete src/core/SkSinglyLinkedList.h
add prependToAndReset() to SkDynamicMemoryWStream.
All test PDFs are identical.
Change-Id: I528873f2f5061f07dd416a71f39d97ee97ef3c7d
Reviewed-on: https://skia-review.googlesource.com/c/159323
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
Commit-Queue: Cary Clark <caryclark@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
This is split out of: https://skia-review.googlesource.com/c/skia/+/143113 (Reduce arbitrary opList splitting when sorting (take 3)).
It needs to be behind a context option because, without mini-flushes, it can cause OOM on smaller devices (e.g., Nexus7 and AndroidOne).
Change-Id: Icde3302bd033a9c4634bb0ca97c950456e73db7c
Reviewed-on: https://skia-review.googlesource.com/c/160763
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Bug: skia:
Change-Id: Ibfe5d7e4c713bf637318f3e2ecc219495bd62879
Reviewed-on: https://skia-review.googlesource.com/c/160767
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>
Change-Id: I73a35fb4d408fb5eeabbb99f0362bd75e8814c7d
Reviewed-on: https://skia-review.googlesource.com/c/159485
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Bug: skia:7901
Change-Id: If5f747ff95c65ac95cfed8c1282cc08019d8006a
Reviewed-on: https://skia-review.googlesource.com/c/160024
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Coping paints take significant time. The ApplyFontToPaint
idiom requires a copy and a dtor. This CL keeps the paint and
font in parallel through the code until a paint is actually
needed, then a special ctor is used to create it.
Also, inline a bunch of text blob calls that were showing up
in perf.
Change-Id: I7da746a287e4d3942e45e9536ef9acdc64f084d4
Reviewed-on: https://skia-review.googlesource.com/c/159222
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
TBR=bsalomon@google.com
Bug: skia:7903
Change-Id: Ib5a3bdba99da4cfb79115d1ff7b2c014272a5556
Reviewed-on: https://skia-review.googlesource.com/c/159520
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
Looks like SkColorSpaceXformSteps is its only user,
and it can easily switch over to skcms instead.
We're now making 3-6 function calls instead of inlining,
but on the other hand, they're replacing 3-6 calls to powf()...
Guarded with SK_LEGACY_TF_APPLY.
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I502d4b3979a4e912820c925b63a174406801be0b
Reviewed-on: https://skia-review.googlesource.com/c/159762
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Motivation: using this in an experiment of mine (I want a
std::vector<SkDynamicMemoryWStream>.)
Change-Id: I28e2c468156ace2f9e7d5e09937e05bc8b7e8200
Reviewed-on: https://skia-review.googlesource.com/c/159326
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
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>
This is a reland of 58887bc3c1
Original change's description:
> hash tf, and whole colorspace
>
> Change-Id: I088124ead162d369c5c9f8bdd3fc0a39b2b3de46
> Reviewed-on: https://skia-review.googlesource.com/c/159486
> Commit-Queue: Mike Klein <mtklein@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
Change-Id: Idec6b6817f7a2136083caecd20c35e1eb9f2f388
Reviewed-on: https://skia-review.googlesource.com/c/159622
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Change-Id: I005623828b6f074077d5ba6a4e72f3192bfbfb12
Reviewed-on: https://skia-review.googlesource.com/c/159623
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
I'd like to remove this from the virtual onGetPixels as well, but that
requires staging a chromium change.
Bug: skia:
Change-Id: I078e5135daaa77803d8474027a98da2973556afb
Reviewed-on: https://skia-review.googlesource.com/c/159522
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
This reverts commit 58887bc3c1.
Reason for revert: hash collisions reported on 32-bit x86
Original change's description:
> hash tf, and whole colorspace
>
> Change-Id: I088124ead162d369c5c9f8bdd3fc0a39b2b3de46
> Reviewed-on: https://skia-review.googlesource.com/c/159486
> Commit-Queue: Mike Klein <mtklein@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
TBR=mtklein@google.com,brianosman@google.com
Change-Id: Ia8580074bd94a9fa158cdd98dc6b021ee5650883
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/159620
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Change-Id: I088124ead162d369c5c9f8bdd3fc0a39b2b3de46
Reviewed-on: https://skia-review.googlesource.com/c/159486
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Change-Id: I1adf711d39f441154aa1c032d49583d0c45d2568
Reviewed-on: https://skia-review.googlesource.com/c/159482
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
Convert GrConstColorProcessor to store SkPMColor4f
Bug: skia:
Change-Id: I6c505856653a02e576ae11fca59dc307545437f7
Reviewed-on: https://skia-review.googlesource.com/c/159152
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Change-Id: I3da7c566cdf9256e57ac7e7f30fee18b9c1a144d
Reviewed-on: https://skia-review.googlesource.com/c/159460
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
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>
Bug: skia:
Change-Id: If5ed79680f215ac5087469b4c04942885bdb5fd0
Reviewed-on: https://skia-review.googlesource.com/c/159322
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This object is now redundant with fEncodedInfo. It holds an
SkColorSpace, which is never used now that SkCodec uses skcms.
SkCodec::getInfo() no longer returns a reference, but creates an
SkImageInfo from the SkEncodedInfo the same way fSrcInfo was
previously created.
Add SkCodec::bounds() and ::dimensions() to replace calling these
methods on getInfo().
Remove srcInfo from SkMaskSwizzler::Create, which just wants to know
whether the src is opaque.
Remove the srcColorType from conversionSupported. Only the base class
version used it. Make it look at fEncodedInfo.color() instead.
Bug: skia:6839
Bug: chromium:887372
Change-Id: I2c0583cae76121211c1a6b49979972fa86daf077
Reviewed-on: https://skia-review.googlesource.com/c/157563
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Change-Id: I08181d2f5a81a4f0781304dd7fab2cb1452b2c30
Reviewed-on: https://skia-review.googlesource.com/c/159300
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This reverts commit 55aea84baa.
Reason for revert: Google3 roll failing like
third_party/skia/HEAD/include/gpu/vk/GrVkDefines.h:15:10: fatal error: '../../../third_party/vulkan/SkiaVulkan.h' file not found
#include "../../../third_party/vulkan/SkiaVulkan.h"
Original change's description:
> Reland "Always include public/include headers for vulkan and just guard src files with SK_VULKAN."
>
> This reverts commit 684b506f35.
>
> Reason for revert: Chrome change has landed to fix broken chrome roll.
>
> Original change's description:
> > Revert "Always include public/include headers for vulkan and just guard src files with SK_VULKAN."
> >
> > This reverts commit 6e2d607334.
> >
> > Reason for revert: chrome roll
> >
> > Original change's description:
> > > Always include public/include headers for vulkan and just guard src files with SK_VULKAN.
> > >
> > > This should allow a client to build a skia library that doesn't use vulkan but still
> > > has all the public headers defined so that they don't have to build two versions of
> > > their code.
> > >
> > > Bug: chromium:862144
> > > Change-Id: I0eecbe0bc48123619f217e2cf318eb9a8c77ccb2
> > > Reviewed-on: https://skia-review.googlesource.com/158661
> > > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > > Commit-Queue: Greg Daniel <egdaniel@google.com>
> >
> > TBR=egdaniel@google.com,bsalomon@google.com,cblume@chromium.org
> >
> > Change-Id: I76ae6f435333755fa5d546fc1e5999a324b4fd05
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug: chromium:862144
> > Reviewed-on: https://skia-review.googlesource.com/c/159000
> > Reviewed-by: Mike Klein <mtklein@google.com>
> > Commit-Queue: Mike Klein <mtklein@google.com>
>
> TBR=egdaniel@google.com,mtklein@google.com,bsalomon@google.com,cblume@chromium.org
>
> Change-Id: Id019b428f880efbd7ead8dee4178c6190469a290
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: chromium:862144
> Reviewed-on: https://skia-review.googlesource.com/c/159145
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>
TBR=egdaniel@google.com,mtklein@google.com,bsalomon@google.com,cblume@chromium.org
Change-Id: I0e5c72e2d79dac28021b02168a9e11ac08db765c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:862144
Reviewed-on: https://skia-review.googlesource.com/c/159155
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This reverts commit 684b506f35.
Reason for revert: Chrome change has landed to fix broken chrome roll.
Original change's description:
> Revert "Always include public/include headers for vulkan and just guard src files with SK_VULKAN."
>
> This reverts commit 6e2d607334.
>
> Reason for revert: chrome roll
>
> Original change's description:
> > Always include public/include headers for vulkan and just guard src files with SK_VULKAN.
> >
> > This should allow a client to build a skia library that doesn't use vulkan but still
> > has all the public headers defined so that they don't have to build two versions of
> > their code.
> >
> > Bug: chromium:862144
> > Change-Id: I0eecbe0bc48123619f217e2cf318eb9a8c77ccb2
> > Reviewed-on: https://skia-review.googlesource.com/158661
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
>
> TBR=egdaniel@google.com,bsalomon@google.com,cblume@chromium.org
>
> Change-Id: I76ae6f435333755fa5d546fc1e5999a324b4fd05
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: chromium:862144
> Reviewed-on: https://skia-review.googlesource.com/c/159000
> Reviewed-by: Mike Klein <mtklein@google.com>
> Commit-Queue: Mike Klein <mtklein@google.com>
TBR=egdaniel@google.com,mtklein@google.com,bsalomon@google.com,cblume@chromium.org
Change-Id: Id019b428f880efbd7ead8dee4178c6190469a290
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:862144
Reviewed-on: https://skia-review.googlesource.com/c/159145
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>