For some reason, Clang can infer <N,T> but GCC can't.
No big deal... we know exactly the ones we want anyway.
Change-Id: I15ba4d4edbd3bc0f37ebe3c2b6e411726cd9fb69
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/207341
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Was starting to use this and ran into a few problems with clashing
symbols, namely SI and cast(). Seemed simple enough to not use SI,
and to move all the free-standing types into skvx: skvx::cast,
skvx::shuffle, etc.
Change-Id: Ia5d8ef6d0ae5375bf80d76be88d16f0c9cde56e7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/207340
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
This fixes compile errors in Windows DLL builds, where (due to
exceptions?) any of these members might need to call sk_sp's
destructor.
Change-Id: I82986afa4497216cda76b681782ccea3c530ba7a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/207121
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This is rather ham-fisted but I would like to have a short-term fix for the "always-flush" perf regressions.
Change-Id: I508e2d725ac18f50318baf31bc3243fe932c724b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/206697
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
fixes linker errors when using is_component_build
Change-Id: Ie28b0e8881cb81715a959df3a87bae4fa854afda
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/206140
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Auto-Submit: Martin Vejdarski <martin@mainframe.co.uk>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This reverts commit 4187ac5e47.
Reason for revert: test if this is causing the angle GM image diffs
Original change's description:
> Skip flush in GrDrawingManager if the specifed proxy doesn't have any work
>
> This is rather ham-fisted but I would like to have a short-term fix for the "always-flush" perf regressions.
>
> Change-Id: Id359ad5a01a290e7e6c06f7ccc1c385ad47d2c06
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/206277
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>
TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com
Change-Id: I19ea23a6b8e3985353fc1ebaf974513bb922e9f2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/206694
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Idea: transition callers to this, so we can later typedef SkColorFilter
and SkShader to the same thing.
Bug: skia:8937
Change-Id: I000c882e11622091aa44c141aa6ddd1216414f46
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/206685
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Change-Id: I245dbeecbd12f0f79f824d6fff7f0253e7748252
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/206682
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
This is rather ham-fisted but I would like to have a short-term fix for the "always-flush" perf regressions.
Change-Id: Id359ad5a01a290e7e6c06f7ccc1c385ad47d2c06
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/206277
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This reverts commit 3c3b194f3b.
Reason for revert: Seems to be a problem with Inteliris 655, which already
has an extensive blacklist, so adding this test to it
Original change's description:
> Revert "Support clip masks for SaveLayerRec and drawSpecial in Ganesh"
>
> This reverts commit 053b293993.
>
> Reason for revert: breaks on Intel Vulkan
>
> Original change's description:
> > Support clip masks for SaveLayerRec and drawSpecial in Ganesh
> >
> > Change-Id: I2e37e28fcbd3631bccc65253604015871503a089
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/205929
> > Commit-Queue: Michael Ludwig <michaelludwig@google.com>
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
> >
> Change-Id: Ic230fa9bcb16c97f218b94922a280f5b86a90491
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/206203
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: 8961
Change-Id: Ie32071bc2be7501066f7b6cf6d40cfb48dbd9986
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/206393
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Re-add old API behind guard.
This reverts commit f88a0e1c91.
Bug: skia:8941
Change-Id: Id8f211568ce381adc9cae8be01202a83f42da6a5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/206384
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
This reverts commit 12b4902e50.
Reason for revert: hmmm, where is my guard?
Original change's description:
> Revert "Revert "Move localmatrix routines to shaderbase, no need to be public.""
>
> Need to guard this for google3
>
> This reverts commit f88a0e1c91.
>
> Change-Id: Ia169610898c6276ae5af8a869ecc9672f6f4f285
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/206264
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>
> Auto-Submit: Mike Reed <reed@google.com>
TBR=reed@google.com
Change-Id: Ibfb21fa248efbafe4ce3909ec3a1af5cffb221de
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/206398
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Need to guard this for google3
This reverts commit f88a0e1c91.
Change-Id: Ia169610898c6276ae5af8a869ecc9672f6f4f285
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/206264
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
Prior to this CL, the only/typical way to set the matrix was by
16 set() operations, which is slower now that typeMask is not
lazily computed.
Bug: 950253
Change-Id: I72176891068c90f247475deb8e946a8bb4ced7d5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/206346
Auto-Submit: Mason Freed <masonfreed@chromium.org>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
With this change, the SkMatrix44 is now trivially copyable. It will
do more work than before if multiple mutations are performed on a
matrix before the getType() method is called.
Bug: 938563
Change-Id: I3faf88e2b72de264457ebff61a26608baf3afd2e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/206176
Commit-Queue: Florin Malita <fmalita@chromium.org>
Auto-Submit: Mason Freed <masonfreed@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
This reverts commit 053b293993.
Reason for revert: breaks on Intel Vulkan
Original change's description:
> Support clip masks for SaveLayerRec and drawSpecial in Ganesh
>
> Change-Id: I2e37e28fcbd3631bccc65253604015871503a089
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/205929
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
TBR=robertphillips@google.com,reed@google.com,michaelludwig@google.com
Change-Id: Ic230fa9bcb16c97f218b94922a280f5b86a90491
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/206203
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Change-Id: I2e37e28fcbd3631bccc65253604015871503a089
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/205929
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
- no more color tables
- explicitly mention that MakeAllocate does not initialize the pixels
Change-Id: I98b9ef1fecc36ea5d9acbae66ccd8979810c2760
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/206265
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This reverts commit f4a8d6fc94.
Reason for revert: need to guard this for google3
Original change's description:
> Move localmatrix routines to shaderbase, no need to be public.
>
> Requires https://chromium-review.googlesource.com/c/chromium/src/+/1554040
>
> Bug: skia:8941
> Change-Id: I68593bf794d559845b638e1ecbcc658cc5cfe1b4
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/206165
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Commit-Queue: Mike Reed <reed@google.com>
TBR=halcanary@google.com,fmalita@chromium.org,reed@google.com
Change-Id: I2dc2f2ff2291c0b4579f32f1a6a8f283a156f6c0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:8941
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/206263
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
This patch allows SkRRect::trasform() work with any axis aligned matrix
transform meaning it now works with a rotation of 90 or 270 degrees.
Adds relevant unit tests.
Bug: skia:8944
Change-Id: I63678ec0e3556c181517526de55d84666afeb681
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/205860
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
We don't want to just disable the "ccpr" path renderer anymore (or
whatever it should be called), because we are adding an MSAA
implementation. This new cap will eventually tell ccpr whether it can
use coverage counting, or if it should just use the MSAA impl.
Bug: skia:
Change-Id: Ie6e5ca1a637ca4408bc6bb844153afa9da26f58e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/204883
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
This reverts commit 215da624d1.
Reason for revert: Blink issues ironed out.
Original change's description:
> Revert "Remove the NullGL interface (and associated test context)"
>
> This reverts commit de206c75c2.
>
> Reason for revert: Chrome is having issues with the switch to Mock in blink tests.
>
> Original change's description:
> > Remove the NullGL interface (and associated test context)
> >
> > Bug: skia:
> > Change-Id: Ie3c9ee39fc1e0a4406de085c60d8433ffb4419df
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/203708
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
> > Commit-Queue: Brian Osman <brianosman@google.com>
>
> TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com
>
> Change-Id: Iff0cbf29dcea26957efc800a8c33d0ad8285de0a
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/205343
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: skia:
Change-Id: I1f4fbbcb00f302c5d830cb1392badd6ec7a33c69
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/205832
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
We want GrResourceCache to be able to track which resources are held by
refs (as opposed to pending IOs) so that it can track the affect of
flushing on resource purgeability. Therefore, all cases that can add the
first ref to a GrGpuResource must funnel through GrResourceCache. This
lays the groundwork by restricting initial refs.
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:8927
Change-Id: I1213c3db258d2412df6666e3222419211ceaa192
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/205482
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
- move shader factories to their host (e.g. picture->makeShader)
More to do to formally deprecated SkShader::TileMode
Bug: skia:8937
Change-Id: I101e42fb9fba4ab91d028a34888f1fde16fdece4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/205589
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Auto-Submit: Mike Reed <reed@google.com>
The value hasn't changed in a long time, and is unlikely to be useful
anytime soon.
Change-Id: Iec5ca31558bd427087f4b7f90cdde5c3c09f12ef
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/205586
Commit-Queue: Ben Wagner <bungeman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Ben Wagner <bungeman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Change-Id: I30a042a41991a47ff1a4e008b88431b4767453dd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/205496
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This differed from the separate versions in that it snapped to zero.
It was also strictly worse than calling the two separate versions.
Most clients don't need the snapping, so just call the two existing
functions. For clients that need the snapping, call new variants of
each that do snap.
Change-Id: Ia4e09fd9651932fe15caeab1399df7f6281bdc17
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/205303
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
No implementations remain.
Change-Id: I569d2ca9c69df27228a33dd433790c6c06aebe08
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/205340
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This reverts commit de206c75c2.
Reason for revert: Chrome is having issues with the switch to Mock in blink tests.
Original change's description:
> Remove the NullGL interface (and associated test context)
>
> Bug: skia:
> Change-Id: Ie3c9ee39fc1e0a4406de085c60d8433ffb4419df
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/203708
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com
Change-Id: Iff0cbf29dcea26957efc800a8c33d0ad8285de0a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/205343
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
kSynced: Proxy and GrSurface key kept in sync.
kUnsynced: Proxy and GrSurface keys are unrelated.
This will allow cross-context image generators' lazy instantiation
callbacks to use unique keys to find any pre-existing backing GrTexture
rather than keeping an unref'ed bare pointer to the GrTexture.
Bug: skia:8927
Change-Id: Id15e2a64e8d2e56c4ce70b9399eb1d8bcea6ac9a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/204723
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Bug: skia:
Change-Id: Ie3c9ee39fc1e0a4406de085c60d8433ffb4419df
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/203708
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
In the interest of only changing one thing at a time, this should fix the putImageData perf regression in Chrome. It will be followed up by a CL to change prepareSurfaceForExternalIO to always flush (which could have a different perf impact).
On Chrome's putImageData benchmark we get:
w/o this CL: avg 293.1247823176651 runs/s
w/ this CL: avg 374.8427288397461 runs/s
Bug: 942538
Change-Id: I9b9bc752532890f4313a45e5a6aa34b915d5e43d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/205003
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
AE/Lottie allow Bezier control Ys to be outside the [0..1] range.
Update SkCubicMap to do the same.
Bug: skia:8931
Change-Id: I54ee8dbb4e6e0a33a917500523c82fe56c854d4a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/205002
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
SkTLazy now uses std::aligned_storage instead of SkAlignedSStorage, so
update the includes to reflect this.
Change-Id: I2f26e418a3e2836555fcb877a7041e354e569374
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/204781
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Implement SkAndroidFrameworkUtil::getBaseWrappedCanvas, which gets
the real canvas behind SkPaintFilterCanvas. This is useful, because
SkCanvas::drawDrawable works differently on a GPU backed canvas.
Test: Built and ran with Android
Bug: b/128792554
Change-Id: I5b75d42256d7a4efca987d55be2ce064c10fb4e7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/204442
Commit-Queue: Stan Iliev <stani@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
There is some logic in here for 2.0 as well, just as a
"as long as I was looking at the specs", but only 1.0
is really supported.
This seems to resolve the bug where some GPUs weren't
advertising correctly that they had vertex array object
support, by checking for both extension names (with and
without "GL_" prefix)
Of note, this saves about 18 Kb (5.5 Kb gzipped) of code size
by compiling out the unneeded GLES checks/functionality.
Bug: skia:8378
Change-Id: I773bf4dbf231b991051d2a9f640b8047a9010e7d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/203461
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
The current SkTLazy copy and move constructors require copy or move
assignable instead of copy or move constructable. This prevents use with
classes with const members (since they cannot be assigned to after
construction). This change also brings SkTLazy more in line with
std::optional which will eventually take over most of what SkTLazy is used
for.
Change-Id: I7bad4edac6a8b3e8adeebc48400d7298a970ed31
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/204447
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
This lets memory traces agree on how big textures are.
Bug: chromium:944846
Change-Id: I5ea8cb5e1331b4ad8d6f59f656c6e61d44290489
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/203727
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Adrienne Walker <enne@chromium.org>
Change-Id: I21bd0155bf28420c10caf43af29748def510643c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/203171
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Bug: skia:
Change-Id: Id403aabcae1dbf38e55381bb3b4353e85a12a745
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/203705
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Bug: skia:
Change-Id: I5d447ea40ef541682f1e855d14e07bf8e45ee89a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/203392
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Bug: skia:
Change-Id: I93fb561ed0b367c0a207b26aa297b997f06acfa7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/203395
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
We're moving in a different direction for Skia documentation. We no
longer run bookmaker on the bots, and things have already degraded such
that it can't be run. This leaves the generated markdown in place for
the last set of docs that were generated (which are still useful until
the Doxygen docs catch up).
See also: https://skia-review.googlesource.com/c/skia/+/198162
Docs-Preview: https://skia.org/?cl=203464
Bug: skia:
Change-Id: I2f967a9c17dbc1cc899947d365071ef69cfb8ad7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/203464
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This reverts commit 97d957d1db.
Reason for revert: Looking at perf, desktop GPUs get better, many mobile GPUs get worse.
Original change's description:
> Remove GrDrawAtlasOp
>
> The base device turns drawAtlas into drawVertices, which ends
> up being *faster* (in my tests) than our specialized code.
>
> It's certainly possible to write a custom version that's better,
> but for now, it seems better to just do this.
>
> Bug: skia:
> Change-Id: I247f0c0a24fb21c8206f4e3ea9fecac85679ba73
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/203163
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
TBR=bsalomon@google.com,brianosman@google.com,reed@google.com
Change-Id: Idfb3dd7d33a3905644aafdefc99e7814b08d7c7b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/203053
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
The base device turns drawAtlas into drawVertices, which ends
up being *faster* (in my tests) than our specialized code.
It's certainly possible to write a custom version that's better,
but for now, it seems better to just do this.
Bug: skia:
Change-Id: I247f0c0a24fb21c8206f4e3ea9fecac85679ba73
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/203163
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Change-Id: I1fd8cba067c0063c6621641e8196e69fd5e31cec
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/203080
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Previously calling SkImage::alphaType(), for example, woult call
the virtual SkImage_Base::onImageInfo() which would construct
and return a temporary SkImageInfo. This often meant ref-ing a
SkColorSpace.
Change-Id: I54975a6b20dea5bc84739068df0c81c022a12067
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/202711
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
- SkColorSpaceXformer
- makeColorSpace on SkShader, SkColorFilter,
SkImageFilter, SkDrawLooper, and SkLights
- DM support and some bot configs
Bug: skia:8773
Change-Id: I16ef8f487de6c35329b3b0474c1d66d7fa0a6220
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/202430
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Change-Id: I489a54860139d1820471aa0330b29a8ae9eca31e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/202316
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
sk_tool_utils doesn't really fit the naming convention
the rest of code under tools/ tends to use.
Change-Id: I45326a174101c6eb4b6149e9c742f658f2fd23b1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/202313
Auto-Submit: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This allows us to remove certain interfaces at compile time.
This replaces most (all?) of the cases where it was
if (gl) else [implicit gles] to be explicitly
if (gl) else if (gles)
in preparation for adding a WebGL standard.
For consistency, I tried to check first for GL, then for
GLES, which involved re-arranging a few if blocks.
PS 3 removes about 1.2KB (0.4 KB gzipped) from CanvasKit by
removing the GrGLInterface related checks from
GrGlInterface::validate()
PS 8 removes a total of 6.0 KB (2.6 KB gzipped) from
GrGlInterface::validate() and GrGlCaps::*
Bug: skia:8378
Change-Id: Ia91b732d888907f5d94b0eac8ca023084999fa7e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/201604
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Bug: skia:
Change-Id: I5df6735da3d574439f2ca2bcdcf01057adc95384
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/201612
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
one for GL, one for GLES, and one (soon) for WebGL
Bug: skia:8378
Change-Id: Ib13699b7432ed56cce99ac568840e5575bb4d2e5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/201654
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
There is a lot more cleanup associated w/ removing this but this is the minimum that will un-block Flutter.
Change-Id: I7b8595007f912d9ddbb2c9d7a9989e10101f9c92
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/201647
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
- reverse sense of Blend mixer to be (dst, src, mode)
- change pipeline register convention to be (dst, src)
Bug: skia:
Change-Id: I1f1d990001ad941cb8d44e1488c5f14077e181f8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/201386
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
This reverts commit bd9d88a6e4.
Reason for revert: Breaks SkiaRenderer on Android. Rendering is all corrupted, bisected to this change.
Original change's description:
> Reland "Update SkCanvas' experimental SkiaRenderer API"
>
> This reverts commit 90791c202d.
>
> Reason for revert: Jumped the gun, just need to update blacklist
>
> Original change's description:
> > Revert "Update SkCanvas' experimental SkiaRenderer API"
> >
> > This reverts commit 4bf964602a.
> >
> > Reason for revert: vulkan dm crashes
> >
> > Original change's description:
> > > Update SkCanvas' experimental SkiaRenderer API
> > >
> > > This lifts the temporary functions in SkGpuDevice into SkCanvas and
> > > deprecates the older experimental_DrawImageSetV1 and
> > > experimental_DrawEdgeAARect. The new functions can handle paints and
> > > transform batching. Internally, SkCanvas routes the old functions to the
> > > new entry points and all device-level code is updated to handle the new
> > > API features.
> > >
> > > While touching all of the canvas/device/recording areas, the
> > > experimental functions are grouped in an "EdgeAA" cluster instead of being
> > > separated into the image category and the rectangle category.
> > >
> > > Bug: skia:8739
> > > Change-Id: I67c2a724873040ad5dc3307ab5b2823ba1eac54b
> > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/190221
> > > Commit-Queue: Michael Ludwig <michaelludwig@google.com>
> > > Reviewed-by: Brian Salomon <bsalomon@google.com>
> >
> > TBR=bsalomon@google.com,robertphillips@google.com,michaelludwig@google.com
> >
> > Change-Id: I87a5a258c5a1bd15e16389cdf91743772d6fa98a
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug: skia:8739
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/201226
> > Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> > Commit-Queue: Michael Ludwig <michaelludwig@google.com>
>
> TBR=bsalomon@google.com,robertphillips@google.com,michaelludwig@google.com
>
> Change-Id: I75e9b6cbf079a7739b69a7e208730a930621abf9
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:8739
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/201229
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>
> Auto-Submit: Michael Ludwig <michaelludwig@google.com>
TBR=bsalomon@google.com,robertphillips@google.com,michaelludwig@google.com
Change-Id: Ib87ef9b8b8598c16a8a6915920adf0b5dffc644b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:8739
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/201391
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This ensures that we stay in [0,1], except for plus mode, which
requires a larger and more invasive change.
Bug: skia:
Change-Id: I97f6bcea8b10e70e55ba24bcff759ddbb1761794
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/201460
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Guarding the implict constructors and scalar/vector
operations with std::is_convertible ought to make SkVx
types feel more like normal C types, allowing implicit
conversions exactly when the scalar equivalents would.
This shouldn't change the behavior of any code, or make
anything new possible... just nicer to read and write.
Change-Id: Iff4b89012c5b8c7f7933e6841c925b81186bc614
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/201402
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Well, at least we have this to show for an otherwise wasted morning...
Change-Id: I8b0c55c0ff3c4b726a7992fd493dac008c7d3cb7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/201191
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This reverts commit 90791c202d.
Reason for revert: Jumped the gun, just need to update blacklist
Original change's description:
> Revert "Update SkCanvas' experimental SkiaRenderer API"
>
> This reverts commit 4bf964602a.
>
> Reason for revert: vulkan dm crashes
>
> Original change's description:
> > Update SkCanvas' experimental SkiaRenderer API
> >
> > This lifts the temporary functions in SkGpuDevice into SkCanvas and
> > deprecates the older experimental_DrawImageSetV1 and
> > experimental_DrawEdgeAARect. The new functions can handle paints and
> > transform batching. Internally, SkCanvas routes the old functions to the
> > new entry points and all device-level code is updated to handle the new
> > API features.
> >
> > While touching all of the canvas/device/recording areas, the
> > experimental functions are grouped in an "EdgeAA" cluster instead of being
> > separated into the image category and the rectangle category.
> >
> > Bug: skia:8739
> > Change-Id: I67c2a724873040ad5dc3307ab5b2823ba1eac54b
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/190221
> > Commit-Queue: Michael Ludwig <michaelludwig@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
>
> TBR=bsalomon@google.com,robertphillips@google.com,michaelludwig@google.com
>
> Change-Id: I87a5a258c5a1bd15e16389cdf91743772d6fa98a
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:8739
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/201226
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>
TBR=bsalomon@google.com,robertphillips@google.com,michaelludwig@google.com
Change-Id: I75e9b6cbf079a7739b69a7e208730a930621abf9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:8739
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/201229
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
This is a reland of 8b40ac35b2
Original change's description:
> Reintroduce deinstantiate lazy proxy types and use for promise images.
>
> This reverts a fraction of b2c5dae65d to
> restore the deinstantiate lazy proxy type, supporting implementation,
> and tests.
>
> Use them for promise images to avoid thread safety issues for promise
> image resources. Makes promise image instantiation callbacks do a thread
> safe unref of their fulfilled GrTexture in GrResourceCache. The
> GrResourceCache mechanism for receiving unref messages is extended to
> allow multiple pending unrefs. All this is new.
>
>
> Bug: skia:8800
> Change-Id: I7b1d4fea13c053b6fbbd39c0c6eaf567b8bf81f1
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/199002
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
Bug: skia:8800
Change-Id: Ib939fc5c19edf0c6b965c9f6adf0afedd4267703
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/201220
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This reverts commit 4bf964602a.
Reason for revert: vulkan dm crashes
Original change's description:
> Update SkCanvas' experimental SkiaRenderer API
>
> This lifts the temporary functions in SkGpuDevice into SkCanvas and
> deprecates the older experimental_DrawImageSetV1 and
> experimental_DrawEdgeAARect. The new functions can handle paints and
> transform batching. Internally, SkCanvas routes the old functions to the
> new entry points and all device-level code is updated to handle the new
> API features.
>
> While touching all of the canvas/device/recording areas, the
> experimental functions are grouped in an "EdgeAA" cluster instead of being
> separated into the image category and the rectangle category.
>
> Bug: skia:8739
> Change-Id: I67c2a724873040ad5dc3307ab5b2823ba1eac54b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/190221
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
TBR=bsalomon@google.com,robertphillips@google.com,michaelludwig@google.com
Change-Id: I87a5a258c5a1bd15e16389cdf91743772d6fa98a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:8739
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/201226
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
This lifts the temporary functions in SkGpuDevice into SkCanvas and
deprecates the older experimental_DrawImageSetV1 and
experimental_DrawEdgeAARect. The new functions can handle paints and
transform batching. Internally, SkCanvas routes the old functions to the
new entry points and all device-level code is updated to handle the new
API features.
While touching all of the canvas/device/recording areas, the
experimental functions are grouped in an "EdgeAA" cluster instead of being
separated into the image category and the rectangle category.
Bug: skia:8739
Change-Id: I67c2a724873040ad5dc3307ab5b2823ba1eac54b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/190221
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Our only use case for mixed samples is stencil-then-cover. This mode
is now handled by AATypeFlags::kMixedSampledStencilThenCover.
Bug: skia:
Change-Id: Id7431cf83ccb20752d1bc85c6ad41efe408e0359
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/200841
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Just using with composeshader for now, plan to try that sort of generalization
for colorfilters and imagefilters in follow-on cls.
Bug: skia:
Change-Id: Ic9650b8ea6f6278e6bfd657e90befbf9e71f383c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/198823
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
This will turn on explicit allocation (w/o opList sorting) in Chrome. It leaves the old allocation system in place in Android Framework and some of Skia's older bots.
We want:
Flutter and Chrome to always explicitly allocate but not sort opLists outside of DDLs
Android to never explicitly allocate and, thus, automatically never sort opLists
This needs the following Chrome suppression CL to land first:
https://chromium-review.googlesource.com/c/chromium/src/+/15182 (Add flag to skia/config/SkUserConfig.h to unblock Skia roll)
TBR=bsalomon@google.com
Change-Id: I3f51005ebc975ec754c2e0d2c646c0c324b02158
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/200507
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This reverts commit 88b93da63d.
Reason for revert: Chrome
Original change's description:
> Always explicitly allocate except in Android Framework (take 2)
>
> This will turn on explicit allocation (w/o opList sorting) in Chrome. It leaves the old allocation system in place in Android Framework and some of Skia's older bots.
>
> We want:
> Flutter and Chrome to always explicitly allocate but not sort opLists outside of DDLs
> Android to never explicitly allocate and, thus, automatically never sort opLists
>
> This cannot land until after the following Chrome CL lands:
>
> https://chromium-review.googlesource.com/c/chromium/src/+/1516096 (Disable opList sorting within Skia)
>
>
> Change-Id: Ic7d6a1a77a08f2fe42324773f62cccf8175ab3d7
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/199931
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>
TBR=bsalomon@google.com,robertphillips@google.com
Change-Id: Ida481ee9833d6db366b3d315fb4e9850d7c005ab
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/200506
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This reverts commit 2cce805f1f.
Reason for revert: Chrome
Original change's description:
> Always try to reduce opList splitting in DDL contexts/drawingManagers
>
> This may get us in trouble w/ local DDL testing (since we run all our GMs through DDLs). For Chrome this shouldn't yet be a problem (since they are only using DDLs for compositing).
>
> This does mean we're on a tight timeline to land predictive intermediate flushes before Chrome starts using DDLs for rasterization.
>
> Change-Id: I0bb95c075cff3ee49498ff267d76c3a61d16373e
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/199722
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>
TBR=bsalomon@google.com,robertphillips@google.com
Change-Id: Idb2dbda1a41844b2541526d504b117fd4cd628cc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/200505
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This may get us in trouble w/ local DDL testing (since we run all our GMs through DDLs). For Chrome this shouldn't yet be a problem (since they are only using DDLs for compositing).
This does mean we're on a tight timeline to land predictive intermediate flushes before Chrome starts using DDLs for rasterization.
Change-Id: I0bb95c075cff3ee49498ff267d76c3a61d16373e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/199722
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This reverts commit 8b40ac35b2.
Reason for revert: breaks viz_unittests
Original change's description:
> Reintroduce deinstantiate lazy proxy types and use for promise images.
>
> This reverts a fraction of b2c5dae65d to
> restore the deinstantiate lazy proxy type, supporting implementation,
> and tests.
>
> Use them for promise images to avoid thread safety issues for promise
> image resources. Makes promise image instantiation callbacks do a thread
> safe unref of their fulfilled GrTexture in GrResourceCache. The
> GrResourceCache mechanism for receiving unref messages is extended to
> allow multiple pending unrefs. All this is new.
>
>
> Bug: skia:8800
> Change-Id: I7b1d4fea13c053b6fbbd39c0c6eaf567b8bf81f1
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/199002
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
TBR=bsalomon@google.com,robertphillips@google.com
Change-Id: Iba960efba4290a284294c62d0470ad7e932c174a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:8800
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/200460
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This will turn on explicit allocation (w/o opList sorting) in Chrome. It leaves the old allocation system in place in Android Framework and some of Skia's older bots.
We want:
Flutter and Chrome to always explicitly allocate but not sort opLists outside of DDLs
Android to never explicitly allocate and, thus, automatically never sort opLists
This cannot land until after the following Chrome CL lands:
https://chromium-review.googlesource.com/c/chromium/src/+/1516096 (Disable opList sorting within Skia)
Change-Id: Ic7d6a1a77a08f2fe42324773f62cccf8175ab3d7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/199931
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This was another stop-gap color management "solution".
Bug: skia:
Change-Id: I7c0c362840dd35aad51ad8780f2dab591c42a7e2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/199720
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
This reverts a fraction of b2c5dae65d to
restore the deinstantiate lazy proxy type, supporting implementation,
and tests.
Use them for promise images to avoid thread safety issues for promise
image resources. Makes promise image instantiation callbacks do a thread
safe unref of their fulfilled GrTexture in GrResourceCache. The
GrResourceCache mechanism for receiving unref messages is extended to
allow multiple pending unrefs. All this is new.
Bug: skia:8800
Change-Id: I7b1d4fea13c053b6fbbd39c0c6eaf567b8bf81f1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/199002
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Currently doesn't do any clamping, but connects the new config to the
recently added SkColorType. Behavioral changes coming in future CLs.
Bug: skia:
Change-Id: I907396030c435d0aa5931063b3dc6f1b60c661af
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/199980
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This reverts commit e157745dfc.
Reason for revert: Too exciting
Original change's description:
> Always explicitly allocate except in Android Framework
>
> This will turn on explicit allocation (w/o opList sorting) in Chrome. It leaves the old allocation system in place in Android Framework and some of Skia's older bots.
>
>
> Change-Id: Idc02985e52f074894a251c7335ef00b009c72ccd
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/199725
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>
TBR=bsalomon@google.com,robertphillips@google.com
Change-Id: Icb097844de6db92e8151c81616a758837ecd9dfc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/199929
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This will turn on explicit allocation (w/o opList sorting) in Chrome. It leaves the old allocation system in place in Android Framework and some of Skia's older bots.
Change-Id: Idc02985e52f074894a251c7335ef00b009c72ccd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/199725
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This utility color space just maps Y to R, U to G and V to B when flattening or accessing the YUV planes. Clients can then add a colorFilter to directly manipulate the YUV values.
This cannot land in Skia until the following CL lands in Chrome:
https://chromium-review.googlesource.com/c/chromium/src/+/1506004 (Update usage of Skia's SkYUVColorSpace enum to allow the addition of a new value)
Change-Id: Id9403ebbd009b45281d4d53fca52f68692d6c69f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/198160
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
We want:
DDLs to always be sorted
Live rendering to still be sorted w/in Skia
Live rendering to still not be sorted in Chrome and Android
Additionally, we want reduced-opList-splitting to only be enabled on some of Skia's bots.
Change-Id: I15e7d69c7e109749665a86a0169ad918c993dc77
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/199244
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
- Transforming a path in place wasn't updating the gen ID of the path
- Transforming a path into another (uniquely held) path wasn't calling
gen ID change listeners.
Bug: skia:
Change-Id: I9e244725d9bd5776d203ce6b12698cee09d0b714
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/199003
Auto-Submit: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Bug: skia:
Change-Id: I86fd67a792ddfc456e8dd553d9012ed9bc9101f7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/198822
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 reverts commit 9ac0407006.
Reason for revert: Breaking DDL Win10 skpbench bot
Original change's description:
> Distinguish between "flushed" and "finished" idle state callbacks on GrTexture.
>
> This is necessary to convert the promise image API to call Release when all
> work is flushed and Done when all work is complete (future work).
>
> Change-Id: I9745952bb0978ca2aaa79aeed460730b2fea856e
> Bug: skia:8800
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/197163
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: skia:8800
Change-Id: I5e6c4ea072beb4fb67a53d2ea2b007a7d201799d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/198603
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This reverts commit c5e8e150c8.
Reason for revert: Reverting to revert 9ac0407006https://skia-review.googlesource.com/c/skia/+/197163
Original change's description:
> Change promise image contract to for when Release and Done are called.
>
> Now Release is called when all work related to the SkImage is flushed
> and Done is called when it is finished on the GPU in Vulkan. In GL they
> are still both called back-to-back after flushing.
>
> Bug: skia:8800
> Change-Id: I990be7b9ebef8411590afd860ef40511fb5fee32
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/198165
> 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: I13e8211d89ed1b7694c2d7734eeaaf4ba9ad410a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:8800
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/198602
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Now Release is called when all work related to the SkImage is flushed
and Done is called when it is finished on the GPU in Vulkan. In GL they
are still both called back-to-back after flushing.
Bug: skia:8800
Change-Id: I990be7b9ebef8411590afd860ef40511fb5fee32
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/198165
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Drop setter, only keep the parameterized constructor.
Change-Id: I31517df23688b8bd7485bf70c9c055cd1c87edcf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/198245
Auto-Submit: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
This will allow all the glyph drawing closures to live on the
GrTextBlob.
Other cleanup
* Rename glyphCache things to grStrikeCache.
Change-Id: I03e0353a1434230086a08184221272f1e5751ae6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/197244
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
This is necessary to convert the promise image API to call Release when all
work is flushed and Done when all work is complete (future work).
Change-Id: I9745952bb0978ca2aaa79aeed460730b2fea856e
Bug: skia:8800
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/197163
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Now that we never re-fulfill a promise image we no longer need to deinstantiate
promise image proxies. They now can use kSingleUse callback semantics.
This was the only usage of the kDeinstantiate lazy callback type so it is
removed. The DeinstantiateProxyTracker is also no longer required and is
removed.
The GrTexture idle callback mechanism now uses GrReleaseProcHelper, which has
been extended to support chaining multiple callbacks together and an abandon()
method that aborts calling the callback in the destructor. It has been renamed
GrRefCntedCallback to reflect its more general usage.
Bug: skia:8800
Change-Id: I857c9eec57fdf706631a266ec8bea682d6657a7c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/196500
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
We had only used this extension in conjunction with
GL_NV_framebuffer_mixed_samples to draw directly to the framebuffer.
However, it's faster and higher quality to just use our own analytic
AA if we can draw directly to the framebuffer.
It might have been interesting to fake mixed samples using
GL_EXT_raster_multisample and PLS together, but those two extensions
don't appear to ever exist together.
Bug: skia:
Change-Id: Iea489cb0e03fc55aa64d3ea7fccc61b539cc461e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/197082
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
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>
Bug: skia:
Change-Id: I5e664939a446616ef57acc79d26a10e6908cda10
Reviewed-on: https://skia-review.googlesource.com/c/196643
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Prior to this CL, we always used raster-pipeline if the device had a
colorspace. In this CL, we defer to individual shaders to decide if they can still
use the legacy path (onMakeContext).
The motivation is purely performance (and perhaps short-term backwards
compat): the legacy blits are usually faster, so staying in them
(as long as we still draw correctly) is preferable.
Causes some (mostly unimportant) rebaselines, esp. around bilerp, as the
rasterpipeline does a much better (but slower) job of it, and now we will
use the legacy bilerp more often.
Bug: skia:8793
Change-Id: I1e7e482a863a1a09ffef86a87e2aa9a4a8d1b9b5
Reviewed-on: https://skia-review.googlesource.com/c/195888
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Use SkDEBUGCODE(...;) instead of SkDEBUGCODE(...);
clang-format has trouble formatting the new spelling, but
it's already commonly used in skia, and if you have something
SkDEBUGCODE instead of just checking `#if SK_DEBUG` then
there isn't all that much you can do.
(You could make SkDEBUGCODE() insert a static_assert(true, "")
at the end to eat semicolons after it, but that's also
a bit gross. And many SkDEBUGCODE()s already put the ; inside
the parens.)
Bug: chromium:926235
Change-Id: I57bc800309283b7206082d8a7acc4b462a3b4cfa
Reviewed-on: https://skia-review.googlesource.com/c/196421
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Nico Weber <thakis@chromium.org>
This reverts commit 24adb3a356.
Reason for revert: fixes SkGpuDevice extraction when running gbr configs in dm.
Original change's description:
> Revert "Add general quad API to SkGpuDevice"
>
> This reverts commit 339e1cc8d4.
>
> Reason for revert: compositor GM breaks dm on windows
>
> Original change's description:
> > Add general quad API to SkGpuDevice
> >
> > Heavily refactors SkGpuDevice's internal texturing code in an attempt
> > to consolidate entry points for drawing an image. Helps lay the ground
> > work for eventually implementing bitmap tiling with per-edge AA.
> >
> > Bug: skia:
> > Change-Id: I9feb86d5315d73119deb21e954c45e45513a63f6
> > Reviewed-on: https://skia-review.googlesource.com/c/191571
> > Commit-Queue: Michael Ludwig <michaelludwig@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
>
> TBR=bsalomon@google.com,robertphillips@google.com,michaelludwig@google.com
>
> Change-Id: I74bc7eb08855dff5535cf809fc47ce6f16d2c15d
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:
> Reviewed-on: https://skia-review.googlesource.com/c/195889
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>
TBR=bsalomon@google.com,robertphillips@google.com,michaelludwig@google.com
Change-Id: I667eb5b4d1253b050670a64de9f0aa70f4df3a5e
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/196160
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Bug: skia:
Change-Id: I9bab3ff73d3934786d7457c4b1bcf67d01c653f3
Reviewed-on: https://skia-review.googlesource.com/c/196060
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Since these are all already static, it doesn't have any real functional
impact in terms of linking or codegen. But it does supress unused
function warnings in compilation units that don't use everything.
Add a new SI boilerplate macro to go along with SINT and SIT.
Change-Id: If2c09951b7453338dd20a3a88e3abbee5eefcd27
Reviewed-on: https://skia-review.googlesource.com/c/195921
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Add SSE, SSE4.1, and NEON specializations.
The if_then_else() unit tests in SkVxTest.cpp should cover this.
I had to give up on my dream of not using Skia headers for now. There's
really no good way of knowing whether we've got SSE4.1 support in MSVC
except when we explicitly define SK_CPU_SSE_LEVEL=SK_CPU_SSE_LEVEL_SSE41.
This refactor to use SK_CPU_SSE_LEVEL let MSVC point out a slight
ordering problem that would cause an infinite loop calling any of
the specializions like sqrt(float2). I believe moving them after
the float4 specializations will fix that.
Change-Id: I83639f378a182716d1b37e92b6d725472698f874
Reviewed-on: https://skia-review.googlesource.com/c/195920
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This reverts commit 339e1cc8d4.
Reason for revert: compositor GM breaks dm on windows
Original change's description:
> Add general quad API to SkGpuDevice
>
> Heavily refactors SkGpuDevice's internal texturing code in an attempt
> to consolidate entry points for drawing an image. Helps lay the ground
> work for eventually implementing bitmap tiling with per-edge AA.
>
> Bug: skia:
> Change-Id: I9feb86d5315d73119deb21e954c45e45513a63f6
> Reviewed-on: https://skia-review.googlesource.com/c/191571
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
TBR=bsalomon@google.com,robertphillips@google.com,michaelludwig@google.com
Change-Id: I74bc7eb08855dff5535cf809fc47ce6f16d2c15d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/195889
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Heavily refactors SkGpuDevice's internal texturing code in an attempt
to consolidate entry points for drawing an image. Helps lay the ground
work for eventually implementing bitmap tiling with per-edge AA.
Bug: skia:
Change-Id: I9feb86d5315d73119deb21e954c45e45513a63f6
Reviewed-on: https://skia-review.googlesource.com/c/191571
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Change-Id: I7a9810e14734262ee608444bd9308bebfb788a8d
Reviewed-on: https://skia-review.googlesource.com/c/195364
Commit-Queue: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Test: Ran CTS
Bug: b/115613038
Change-Id: I9493de41e0bfaa53436676c8eed2a4f178b6e51e
Reviewed-on: https://skia-review.googlesource.com/c/186400
Commit-Queue: Stan Iliev <stani@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
This moves the smart pointer use up one more level in preparation for
changing SkTypeface::openStream to return unique_ptr as well.
Change-Id: Ib8173d59e03de38b06f6e1b4e6776f1961055ae7
Reviewed-on: https://skia-review.googlesource.com/c/195121
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
This reverts commit 22170b3178.
It was reverted due to the test breaking Google3. This includes a
workaround.
Original change's description:
> Treat kWEBP encode with quality=100 as lossless
>
> In SkEncodeImage and friends, treat quality of 100 as a lossless encode
> when using kWEBP. This seems a good fit for the intent - which is
> presumably to save the highest quality image. This also matches
> Chromium's blink::ImageEncoder::ComputeWebpOptions, which treats a
> quality of 1 (on a float scale from 0 to 1) as a lossless encode.
>
> FWIW, Chromium has had this behavior since
> https://codereview.chromium.org/1937433002, in response to
> crbug.com/523098. The goal is to "maintain sharpness to
> match the JPEG encoder behavior (use WEBP lossless encoding)".
>
> Add a test to verify the new behavior. This requires making tests
> depend on libwebp to use WebPGetFeatures, since the Skia API does not
> provide a way to determine whether an encoded webp file was encoded
> lossless-ly or lossily.
>
> Bug: skia:8586
> Change-Id: Ie9e09c2f7414ab701d696c4ad9edf405868a716f
> Reviewed-on: https://skia-review.googlesource.com/c/175823
> Commit-Queue: Leon Scroggins <scroggo@google.com>
> Reviewed-by: Derek Sollenberger <djsollen@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
TBR=reed@google.com, based on prior approval
Bug: skia:8586
Change-Id: I09c73f71996422f797fd9456fef5dfad9af36839
Reviewed-on: https://skia-review.googlesource.com/c/194194
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
Auto-Submit: Leon Scroggins <scroggo@google.com>
Add a new constructor which merges the SkISize scaledSize with the
SkImageInfo. This allows passing an SkColorSpace to the decode.
Update the test to call the new API.
Bug: b/123301872
Change-Id: I9fd89198e97ac9b8e6dc9fcfe89ed38913a0fe69
Reviewed-on: https://skia-review.googlesource.com/c/189303
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
This CL does make use of a new GrRecordingContextPriv backdoor to break CL deadlocks. This occurs when this CL tries to create GrContext-dependent objects outside its scope.
Change-Id: I278fe9d321f8e0a4f5e9b489b1a5cc01b8974521
Reviewed-on: https://skia-review.googlesource.com/c/191287
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This fixes an issue in Chrome where Skia is calling a promise SkImage
texture release proc from ~SkImage that in turn flushes a SkSurface.
Prior to this change this caused an assert because we had already
decremented the GrTexture's ref count priot to calling the release
proc. This made the GrTexture purgeable, but the cache had not yet
been notified that the texture was purgeable and still had it in its
array of non-purgeable resources. This triggered an assert in the
cache's self-validation checks during the flush.
Now we call the release proc just prior to decrementing the ref count.
This also makes it legal to re-ref the resources from the release proc.
Bug: chromium:933526
Change-Id: I8cd921b77ca3dfe112089f9a553c1a625160d16d
Reviewed-on: https://skia-review.googlesource.com/c/194000
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>