This reverts commit e67133b8e5.
Removing testing code that's no longer needed.
Change-Id: I27bc5c77d1bc1b928d5cdb89daf82ab5fd3878c8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/236338
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This reverts commit a0c9d43c20.
Reason for revert: G3 references should all be updated.
Original change's description:
> Revert "Remove old version of MakeCrossContextFromPixmap"
>
> This reverts commit 237a95fe7b.
>
> Reason for revert: Flutter in Google 3.
>
> Original change's description:
> > Remove old version of MakeCrossContextFromPixmap
> >
> > Client code has been updated
> >
> > Change-Id: Ic6102effc63c0f4f00a47b8876107aa0b2306e32
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/235296
> > Reviewed-by: Mike Reed <reed@google.com>
> > Commit-Queue: Brian Osman <brianosman@google.com>
>
> TBR=brianosman@google.com,reed@google.com
>
> Change-Id: I0a290030e55987c690b51470a381aca2b6faab2f
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/235397
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
TBR=brianosman@google.com,reed@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: I778bccf7b1c085413a3d119169686e68777bc344
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/235856
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Change-Id: I3be1a4d402a3a7adc6a28d716302d3c9f9316b14
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/235676
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This reverts commit 237a95fe7b.
Reason for revert: Flutter in Google 3.
Original change's description:
> Remove old version of MakeCrossContextFromPixmap
>
> Client code has been updated
>
> Change-Id: Ic6102effc63c0f4f00a47b8876107aa0b2306e32
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/235296
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
TBR=brianosman@google.com,reed@google.com
Change-Id: I0a290030e55987c690b51470a381aca2b6faab2f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/235397
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This does not appear to be used externally, and only internally in 3
sites in GPU, which we can handle explicitly.
For now you can still pass bools to Iter::next() but they are ignored.
After this lands, I will update the callers to remove those.
FWIW: none of our other tests or gms seem to notice this change...
Bug: skia:9339
Change-Id: If40077b1ebb3d47cfce0ec43996ff272318e4a62
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/235104
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Client code has been updated to call new version
Change-Id: Id7e18154fe273590f04435c936121b3a3e3665df
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/235317
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Client code has been updated
Change-Id: Ic6102effc63c0f4f00a47b8876107aa0b2306e32
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/235296
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Not currently used by any clients.
Change-Id: I21d554fb95ffef4f317945ab22c4cfb14fbb6b2a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234660
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
With 462505f310 "include refresh" most of
the useful parts of the SkFontMetrics documentation were removed.
Restore the documentation and update it with the latest information.
Change-Id: I28c13bc194b53265818e31e7b26e93a390f6259c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234945
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Change-Id: I962e923a4994eb549a9c1002323f33d05b936b84
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234912
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This reinterprets the contents of an image as though they were in a
different color space. Helpful for tools and debug visualization.
Bug: chromium:795132 chromium:985500
Change-Id: Ia8739bbd73d72249b8bee9d51dfa11d560a2a1f5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234328
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Old version still exists until client code is migrated.
Change-Id: I087b6b977f586d334f9a20954e7ed7b5e4b7ea5e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234579
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Change-Id: Ie0af47ed842769a3f47056bb1d633c84fa4d06d6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234329
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
These are meant to contrast MakeFromEncoded(), and emphasize that it is deferred/cached,
while the new methods are not.
Change-Id: I83ac22394cb14cdc84ff8507a514bf708734b84f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234476
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Remove return statements immediately following SK_ABORTs.
Change-Id: I6446b6ba3a6fb272d84ea27f38cf366095cf801d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/233565
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Bug: skia:9281
Change-Id: I189dbf652580805641f8c4b9a6587cf15a9049dd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231256
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
In preparation for moving the filter-specific headers from include/effects and into src/effects/imagefilters, this exposes a more convenient API where all filters provided by Skia are accessible from the same factory.
It also only exposes the factories that take the shared enums (SkColorChannel, SkTileMode), so the per-filter enums can be phased out (SkBlurImageFilter::TileMode, etc.). It also accepts an SkIRect* instead of an SkImageFilter::CropRect* since all uses seem to be for integer rectangles and flags are either always on or always off. This will allow us to later remove the CropRect type.
Bug: skia:9280
Change-Id: I71f77ff44b573f87b837d6523b9eb565521f0f36
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230876
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This reverts commit 0355f05b26.
Reason for revert: roll?
Original change's description:
> let color filters tell us their alpha format
>
> There are a bunch of native premul->premul color filters, and about an
> equal number of native unpremul->unpremul filters that all have roughly
> the same logic to interoperate with a premul color pipeline. I haven't
> seen anything that wants premul in and unpremul out or vice versa.
>
> (It's easy to find by grepping for ::unpremul.)
>
> This CL flags the natively unpremul color filters and centralizes the
> logic to handle premul interop. This mostly eliminates the need for
> SkColorFilter subclasses to know shaderIsOpaque, but not quite entirely.
> It's of course used in the centralized SkColorFilter::appendStages(),
> but is still also needed by any subclass that calls that, any subclass
> that composes other color filters. I've commented out any unused
> shaderIsOpaque arguments.
>
> In the future we could imagine handling this outside in a more
> sophisticated way, like eliding unnecessary alpha format conversions.
> We'd need to move this logic out of SkColorFilter::appendStages() to
> it's callers... the blitter, composing subclasses, and any other misc.
>
> Should be no diffs and no interesting perf change.
>
> I couldn't help but correct some misuse of "protected" where I was
> editing anyway. I'm feeling a mega CL coming...
>
> Change-Id: If3528820ca639357864b8b99c8fe11ab60c1ae0d
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231465
> Commit-Queue: Mike Klein <mtklein@google.com>
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Reviewed-by: Mike Reed <reed@google.com>
TBR=mtklein@google.com,fmalita@chromium.org,reed@google.com
Change-Id: Ide8b887fe7ff445f503864ee935908bcb56f637e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231677
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
This reverts commit f4c5f63ab9.
Reason for revert: trying to revert my earlier CL. Sorry! I'll let you reland this one first and I'll rebase next time.
Original change's description:
> SkColorfilters::HSLAMatrix
>
> Introduce an SkColorFilter_Matrix flavor operating in HSLA space.
>
> (CPU-only for now)
>
> Change-Id: If081de062b9e920c3365bd7b281e45bb069c3d1a
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231259
> Commit-Queue: Florin Malita <fmalita@chromium.org>
> Reviewed-by: Mike Reed <reed@google.com>
> Reviewed-by: Mike Klein <mtklein@google.com>
TBR=mtklein@google.com,brianosman@google.com,fmalita@chromium.org,reed@google.com
Change-Id: I6a4e85d3810e2ca30d072937c035c929917d36c9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231678
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Introduce an SkColorFilter_Matrix flavor operating in HSLA space.
(CPU-only for now)
Change-Id: If081de062b9e920c3365bd7b281e45bb069c3d1a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231259
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
There are a bunch of native premul->premul color filters, and about an
equal number of native unpremul->unpremul filters that all have roughly
the same logic to interoperate with a premul color pipeline. I haven't
seen anything that wants premul in and unpremul out or vice versa.
(It's easy to find by grepping for ::unpremul.)
This CL flags the natively unpremul color filters and centralizes the
logic to handle premul interop. This mostly eliminates the need for
SkColorFilter subclasses to know shaderIsOpaque, but not quite entirely.
It's of course used in the centralized SkColorFilter::appendStages(),
but is still also needed by any subclass that calls that, any subclass
that composes other color filters. I've commented out any unused
shaderIsOpaque arguments.
In the future we could imagine handling this outside in a more
sophisticated way, like eliding unnecessary alpha format conversions.
We'd need to move this logic out of SkColorFilter::appendStages() to
it's callers... the blitter, composing subclasses, and any other misc.
Should be no diffs and no interesting perf change.
I couldn't help but correct some misuse of "protected" where I was
editing anyway. I'm feeling a mega CL coming...
Change-Id: If3528820ca639357864b8b99c8fe11ab60c1ae0d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/231465
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
Bug: skia:9280
Change-Id: Ice3624467f5e643f9d3d81da72d77911eeac963e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230198
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Bug: skia:9280
Change-Id: I638c2b3d34be2037648cf27bde933345f8abbd77
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230126
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
We can't remove the loopers themselves, as they are still used
by android and chrome (they just don't ever pass them to skia).
Eventually each of those clients will resolve this, but for now
we just keep the classes (and tests) in skia.
Bug: skia:4783
Change-Id: I5f507e6bb82280f2bc7c0b21eebe59c287aa9265
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230579
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
By making it in a more common header, this enum can be reused by the
SkDisplacementMapEffect.
Bug: skia:9280
Change-Id: Ia8352e0530f915cdad659c657bd86710226582b6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230118
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
While most callers of decomposeScale only depend on the scale factors
that are returned, image filter decomposition depends on the remaining
matrix as well. Hence, the following necessary updates to work with
the new behavior of decomposeScale:
* Update imagefilter DAG sample to reflect prescaling
* Correct embedded matrix in SkApplyCTMToFilter
* Add comment to clipRectBounds() clarifying coordinate spaces and image filters
But, we want to have decomposeScale using preScale() because it then
produces a remainder matrix that can be used as the transform for the
image filter draw, instead of wrapping the image filter in an
SkMatrixImageFilter as currently done by SkApplyCTMToFilter.
Bug: skia:7211
Change-Id: If14570afb4189cebc75f3815e8ccdde05cb074e1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/228438
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Change-Id: I04493af0a6ce1425c4acf68365135722dd3c218b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227857
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
In order to effectively use the explicit backend texture allocation API Chrome needs a way to use them with surface characterizations
Change-Id: Ic61eff9f3b6b0e8280481149d7c08d37a2fe7ec0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/222781
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>