SkStrikeSpecStorage was a temporary name until all uses of
SkStrikeSpec were cleaned up. Do the final rename.
Change-Id: Iaba987ecdfe46ca9eee8d530d5095840cdca300d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/219209
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Convert over remaining callsights for strike lookup, and reduce the SkStrikeCache
API.
- one friend decl.
Change-Id: I109a747061030f26ff908472ea55a4424d5c10f1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209109
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
This can generate spurious warnings like:
In included file: unused function 'SkStrStartsWith'
../../third_party/skia/include/core/SkString.h:23:13: note: error occurred here
[-Wunused-function]
Change-Id: I4bdfc054d1d24dddf2f8ed68b0a8ebd2cb1a746b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/217986
Commit-Queue: Jeremy Roman <jbroman@chromium.org>
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Use in GrColorMatrixFragmentProcessor.
Also make GrColorMatrixFragmentProcessor::Make() call
SkMatrix44::set4x4().
9bf803677ea133368178e1eb23e120dd823da151
Bug: skia:8962
Change-Id: I2476f4af03b4e43cc843e6eda28673d1c2454acc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/217496
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Also adds flexibility to unpremul the input, clamp the output, premul the
output or not.
Also fixes SkMatrix44 as a ctype.
The intent is to reuse this for rgb->yuv conversion in async rescale and
read.
Bug: skia:3962
Change-Id: I470d1cfebdbd79d8541b633c1747d510a5549ac4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/217128
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
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>
It appears all known users have been mirgrated to the new enums.
Change-Id: Id64083c18bf8aa5f2ec935c80af3babebad90a2d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/215459
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Change-Id: I9bb7b1f0f238937b59539d1b60e0f9b106498201
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/215444
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
Change-Id: I7f6fe83cfb653819c1b5d865421f4fd2121e9b4d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/212418
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
This reverts commit 046ecb1b5e.
Reason for revert: Flutter
Original change's description:
> remove SkMiniPicture and co.
>
> This was an optimization for Chromium that I believe is no longer
> relevant in a world of PaintOpBuffers.
>
> Change-Id: Ic7526715a0ef1c3cec387a44189b7d56d5107af5
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213680
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Klein <mtklein@google.com>
TBR=mtklein@google.com,reed@google.com,chinmaygarde@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: Ibf1ccee88c9ea140210cb9258ec96f9841e84c24
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/214661
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This is implemented at backend-neutral level and so misses some
opportunities to reduce the number of passes in the GPU backend.
Filter quality is interpreted as:
none - single nearest neighbor resampling
low - chain of bilinear resamplings. 2x up/down except for one
step which may be smaller than 2x.
medium - same as low
high - when both scale factors are up then same as low but with bicubic
filtering rather than linear. Otherwise, same as low.
Bug: skia:8962
Change-Id: I4467636c14b802d6a0d9b5c363c1ad9e87a1a44b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213831
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This consolidates the scale decomposition and SkMatrixImageFilter logic
that SkCanvas did during a layer save into an applyCTM function. It is
expanded to handle the extra transformation steps for backdrops.
The backdrop logic in SkCanvas has also been updated to only snap the
necessary portion of the buffer, and also use applyCTM. Previously any
backdrop filter with a CTM beyond scale/translate would do no filtering.
Unfortunately, perspective has caused too many headaches to solve in a
single CL, so its issues are recorded at skbug.com/9074.
Other minor fixes that were encountered while working on this:
- Raster's CopyFromRaster() incorrectly held onto the subset after copying.
(unfortunately it looks like snapBackImage() needs to copy; referencing
the subset directly corrupted the output).
- SkLocalMatrixImageFilter now supports complex CTMs assuming its input
supports CTMs.
- CropRects need to apply in the source coordinate system, but are not
aware of complex CTMs when performing clipping. For a simple fix, any
filter with a crop rect set cannot support complex CTMs until that's
updated.
Bug: skia:9074, chromium:959412
Change-Id: I1276a4ec400dfefb958c14beda078bdf1d087baa
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213080
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
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>
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>
Sorry for yanking you around on whether on not this is worth doing.
Seems like SkRTrees are going to stick around for now for Flutter,
so I think we might as well keep both implementations up to date.
This ripples out a little further than in Chromium, as the math we're
deleting here was the only use of the aspect ratio of the passed-in
bounds, that itself the only use of those bounds themselves. So we can
un-plumb all that too. I'd still like to see how much we can minimize
the need for those user-provided bounds at all, especially when we're
calculating them all here.
Change-Id: Iea07e8e3d23a4dd31da8bcde512b24caabc96a10
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213840
Reviewed-by: James Bankoski <jimbankoski@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Tacking on parts[2] lets us keep things like IWYU comments
#include "something.h" // IWYU pragma: keep
Rerun the script too... not much interesting.
Change-Id: I9f02c81ffece0ecf3e99730d4a12d49e01417ddc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213697
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>
This was an optimization for Chromium that I believe is no longer
relevant in a world of PaintOpBuffers.
Change-Id: Ic7526715a0ef1c3cec387a44189b7d56d5107af5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/213680
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
SkStrikeSpecStorage is the centralized class for creating different sets of
SkScalerContextRecs/Effects for different text rendering methods.
It is initailly called SkStrikeSpecStorage, but as a last stage will be
renamed to SkStrikeSpec as it encompasses the current functionality of
the existing SkStrikeSpec.
I'm breaking up a much larger prototype for this CL and several
following CLs. The prototype is at:
https://skia-review.googlesource.com/c/skia/+/209109
Change-Id: I617eaae6fcb4b0b29914c3f1a82c52c81d81aabe
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/212733
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Initial version. Current limitations: No Metal support, no color space
conversions, for each src color type only one dst color type is legal (
which may or may not be the src color type), no alpha type conversions.
Bug: skia:8962
Change-Id: I6f046a32342b8f5ffb1799d67d7ba15c250ef9bf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/212981
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
This reverts commit 693bc2bae5.
Reason for revert: <INSERT REASONING HERE>
Original change's description:
> Revert "Add flush() to SkImage."
>
> This reverts commit d0503a72ac.
>
> Reason for revert: <INSERT REASONING HERE>
>
> Original change's description:
> > Add flush() to SkImage.
> >
> > This allows a client to ensure all uses of a texture-backed image have
> > been flushed.
> >
> > Does nothing if the image isn't texture-backed.
> >
> > The implementation adds support for triggering a flush if any of a set
> > of proxies are used rather than just a single proxy.
> >
> > Change-Id: I358882d9737e63c6e69b924c0767f49b8f8f36ec
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/212405
> > Commit-Queue: Brian Salomon <bsalomon@google.com>
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
>
> TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com
>
> Change-Id: Ie376bf4225307f45b8fb3eb4a63bf84702365797
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/212884
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com
Change-Id: Idcba378ce2e3af0af9d0eef35737670055539ec5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/212960
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
This reverts commit d0503a72ac.
Reason for revert: <INSERT REASONING HERE>
Original change's description:
> Add flush() to SkImage.
>
> This allows a client to ensure all uses of a texture-backed image have
> been flushed.
>
> Does nothing if the image isn't texture-backed.
>
> The implementation adds support for triggering a flush if any of a set
> of proxies are used rather than just a single proxy.
>
> Change-Id: I358882d9737e63c6e69b924c0767f49b8f8f36ec
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/212405
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com
Change-Id: Ie376bf4225307f45b8fb3eb4a63bf84702365797
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/212884
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This allows a client to ensure all uses of a texture-backed image have
been flushed.
Does nothing if the image isn't texture-backed.
The implementation adds support for triggering a flush if any of a set
of proxies are used rather than just a single proxy.
Change-Id: I358882d9737e63c6e69b924c0767f49b8f8f36ec
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/212405
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
In particular, linear metrics now means 'linearly scalable metrics' as
expected. This also makes the documentation for the setter and getter
for subpixel positioning agree.
Change-Id: I08f5009f32516a0fdaecefc1d7dbe5f43c005a69
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/212406
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
This adds readPixel and a partial stub of window.createImageData
Change-Id: Iee992312b9331b71852fe2198f844a7e4ae9e963
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/211344
Reviewed-by: Mike Reed <reed@google.com>
Change-Id: I4ed40624f64aada1163585aa2a8bd0b643b2ccec
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/211992
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
Noticed that there was an include for <array> in there that didn't make
a lot of sense, so cleaned up the others which are hanging around from
older code which was in there.
Change-Id: I77acbb0914989e9bf67ab74dfd842a798ea592f3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/206172
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Add a shim to redirect until clients are updated
Change-Id: Ib43614e5620b1a24ca18187c1646a8ed1a9ee7a4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/211003
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
1. want to standardize on naming convention (matching shaders asA...)
2. want to eliminate legacy asColorMatrix with its 255 bias
Bug: skia:
Change-Id: I43258aa3a406b92a3246e13e5dd996fcc207c784
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/210621
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
SK_SAMPLES_FOR_X doesn't do anything other than set the SK_?32_SHIFT
macros, so we can just set them instead, and further we can derive
everything we need from SK_R32_SHIFT.
Change-Id: I766d00c868da04939208353d09201f189a99c0c7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/210121
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Disallowing static global initializers is more Skia-user friendly.
Does it make sense to nest these both together under is_skia_dev_build
(built from our GN tree && !is_official_build)? Seems like maybe we
can also do the Android TODO?
Change-Id: I882f917c1a8156102ecc9cec58d2aba638015b9e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/210210
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
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>
Bug: skia:9012
Change-Id: I13ef8dea81a9d138b557be53b7adf19285fc9fce
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209810
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
This lets clients explicitly declare which SkUserConfig.h
to use, rather than implictly via include directory priority.
See include/gpu/gl/GrGLConfig.h for a similar setup.
Looks like keeping an #else case around is going to be the
easiest way to keep Android building, unless I can find a
way to push -DSK_USER_CONFIG_HEADER up to Skia's reverse
dependencies.
Change-Id: I9c297324cbafbd5f0d1a3dc1c90f0ceae0339e88
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209866
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Change-Id: Ica7d62c758558c0e2c7bea9da8a08f25d1cfaeed
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209805
Commit-Queue: Hal Canary <halcanary@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>