This reverts commit 6377f1c1f9.
Reason for revert: doesn't work with ES2 w/out NPOT extension
Original change's description:
> Use bitmap subset for comparison in texture_domain_effect GMs.
>
> This used to do 2 texel subset draws. The second draw tested a
> non-identity local matrix. Now the first draw exercises local matrix and
> the second draws with a proxy that represents just the bitmap subset to
> give a better basis for comparison.
>
> Change-Id: Ia41330598626c8cc656fd1ca2e289c8184847807
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266616
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Brian Salomon <bsalomon@google.com>
TBR=bsalomon@google.com,michaelludwig@google.com
Change-Id: I08464aab72b157909664d64452db25f22d40bde3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266677
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This used to do 2 texel subset draws. The second draw tested a
non-identity local matrix. Now the first draw exercises local matrix and
the second draws with a proxy that represents just the bitmap subset to
give a better basis for comparison.
Change-Id: Ia41330598626c8cc656fd1ca2e289c8184847807
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266616
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Change-Id: I93c8754d55b9d462b056a77e95b852fc61f1fd66
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266560
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Fix: update the generator code itself for the vec --> ptr change
This reverts commit 44aa1ab584.
Change-Id: Idfec2b42239429e58501ca2ba108ec852891e237
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266575
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Also removes several unused chunks of code that were declaring unused
variables, etc.
Change-Id: I47458736b189d59c0448c6f58b60a9b4ab046db2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266565
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This can allow for more efficient glReadPixels (e.g. read back of GL_R8
as GL_RED, GL_UNSIGNED_BYTE rather than GL_RGBA, GL_UNSIGNED_BYTE).
skia:8962
Change-Id: Ifa219517f1ce14b79e8af88c799cd5ef35f3a24c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266567
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Declares that Skia is right-handed
Change-Id: Ie98773f0f0d748eadc0d1abcd860f6e8dbb56bcf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266564
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
It is possible that some other thread will change the default FcConfig
out from under one of these methods, which is a terrible race. Prevent
this by taking a reference to the default FcConfig in the method and
keeping it alive while it is being used.
Previously an attempt was made to hold onto the FcConfig for the
lifetime of the SkFontConfigInterface_direct object. Unfortunately, some
users are holing onto SkFontConfigInterface_direct as a global and so it
is not obvious to free all instances before calling FcFini, which will
asert that no instances are still using the cache.
Bug: chromium:1004254
Change-Id: Ia173e90b95c43c40d91b366095eb97c0e466ab86
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/246216
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Also simplifies the shaders if we know there's only one atlas texture.
Change-Id: I81063d423fd56cf91caee83ba9eae9d988aa249b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266566
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This reverts commit 1c3e6cf313.
Fixes ES2 without NPOT support
Change-Id: I489e95f2b566d09e1b974421fb92c643e7da5135
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266563
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This is pulled out of the omnibus parameter reordering CL - which has become too large.
Change-Id: Ia647f4aac9f31600c6f72098233fe401895f23df
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266537
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
This reverts commit 3b9c544bf8.
Reason for revert: Probably causing text issues in Chrome
Original change's description:
> Reland "Reland "Add new method for storing DrawOpAtlas texture index.""
>
> This is a reland of dea2f34f09
>
> Original change's description:
> > Reland "Add new method for storing DrawOpAtlas texture index."
> >
> > This is a reland of c8b2e61540
> >
> > Original change's description:
> > > Add new method for storing DrawOpAtlas texture index.
> > >
> > > Storing the texture index in the lower bit of each texture coordinate
> > > seems to have issues on certain iOS devices. Rather than do that, we
> > > use the sign of the texture coordinate to act as our storage bit.
> > > To manage encoding 0 we map [0, N] to [-1, -N-1] to represent a bit.
> > >
> > > Change-Id: Ic588ee92cf858915a1833cf482d4b23bd11c1000
> > > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/263561
> > > Commit-Queue: Jim Van Verth <jvanverth@google.com>
> > > Reviewed-by: Brian Osman <brianosman@google.com>
> >
> > Change-Id: I901502c3d83ff9727c51ad4447b0cee733257649
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264566
> > Reviewed-by: Jim Van Verth <jvanverth@google.com>
> > Commit-Queue: Jim Van Verth <jvanverth@google.com>
>
> Change-Id: I000bb74ca57e321084ca2d1d9dc2f0274880c0da
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264689
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
TBR=jvanverth@google.com,brianosman@google.com
Bug: 1045016
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: Ie376c7b3cb359f5378e4dd983a103da81ec92e5d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266557
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Leak sanitizer ought not to complain any more
now that I'm cleaning up my thread_local caches.
Add an MSAN bot for paranoia about bug.
Bug: skia:9819
Change-Id: I34600b7d40b6ecbc245d1b0acbca5b2fedf83b5d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266523
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Change-Id: I1788cd621704f580ff0c7d930138d463b724f314
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266556
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Change-Id: I9012a2769eb92d0d393e0eeb684a8bee8519323d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266522
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This will let ASAN bots find __cxa_thread_atexit(),
letting us clean up thread_local values at thread
exit rather than having to leak them.
Change-Id: Ifd09a1efe659744bb26adf7280bb0f95722a2325
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266529
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This reverts commit 988af46dd2.
Reason for revert: <INSERT REASONING HERE>
Original change's description:
> Move GrDomainEffect functionality into GrTextureEffect and delete
> the former.
>
> New factories for GrTextureEffect have two main variants:
> MakeTexelSubset(): adjusts the input integer rectangle to account for
> filtering
>
> MakeSubset(): assumes caller has calculated the exact rectangle needed
> as floats.
>
> Currently this disables filtering for shader-based mirroring or repeat.
> Will fix this later. The old effect also did not support this.
>
> Change-Id: If47d8ecfbb349b0d7b39ab5ba864fe3cc1b139e4
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265518
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
TBR=bsalomon@google.com,michaelludwig@google.com
Change-Id: Ib81a79798668cd7df7d07f72a5113be9fc74180c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266536
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This reverts commit 99c54f0290.
Change-Id: I010ac4fdb6c5b6bfbdf63f4dcac5dbf962b0ad9c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266205
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
the former.
New factories for GrTextureEffect have two main variants:
MakeTexelSubset(): adjusts the input integer rectangle to account for
filtering
MakeSubset(): assumes caller has calculated the exact rectangle needed
as floats.
Currently this disables filtering for shader-based mirroring or repeat.
Will fix this later. The old effect also did not support this.
Change-Id: If47d8ecfbb349b0d7b39ab5ba864fe3cc1b139e4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265518
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
This should clear up the apparent leaks,
because Mac doesn't support leak sanitizer.
Change-Id: I688edd50265cfd15346f3fa2b8c1d06a2d3d8125
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266368
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
135f8fcba8..f3b4e6c303
git log 135f8fcba837..f3b4e6c3030f --date=short --first-parent --format='%ad %ae %s'
2020-01-24 syoussefi@chromium.org Vulkan: No inactive samplers left to cleanup in glslang wrapper
2020-01-24 syoussefi@chromium.org Vulkan: Output qualifiers in the translator
2020-01-23 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/spirv-tools/src ab7ac60f14ae..b97057e7f747 (2 commits)
2020-01-23 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/SwiftShader b766e5e7fbf4..c514ab001bb0 (8 commits)
2020-01-23 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/vulkan-tools/src ca9b61a4455f..aaba1e4e6aec (1 commits)
2020-01-23 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/vulkan-validation-layers/src ac02c61ffc63..8317b28e672a (6 commits)
2020-01-23 angle-autoroll@skia-public.iam.gserviceaccount.com Roll third_party/vulkan-loader/src af8c7e040f93..37d3a235af2c (2 commits)
2020-01-23 syoussefi@chromium.org Row-major test: switch to compute
Created with:
gclient setdep -r third_party/externals/angle2@f3b4e6c3030f
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/angle-skia-autoroll
Please CC benjaminwagner@google.com on the revert to ensure that a human
is aware of the problem.
To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md
Cq-Include-Trybots: skia/skia.primary:Build-Debian9-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE
Bug: None
Tbr: benjaminwagner@google.com
Change-Id: I678e32eb1c1497253c4eb3a566f46ffbf6ac8d5e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266431
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Will be used for YUV420 readback on ANGLE ES 2 contexts in Chrome.
Marks the functions as required as Chrome now adds inits these on
GrGLInterface.
Bug: 1040643
Change-Id: I5504d4c9209874991592c9f86aaf7987c316aa40
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265602
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
This reverts commit 5195673c7a.
Reason for revert: Just waiting for the test suppression
Original change's description:
> Revert "Increase precision of some quad AA calculations"
>
> This reverts commit 40a1353126.
>
> Reason for revert: layout tests need rebaseline
>
> Original change's description:
> > Increase precision of some quad AA calculations
> >
> > This stops using the low precision rsqrt and instead does a divide + sqrt.
> > It also separates the single kTolerance value used in GrQuadUtils' math
> > into a fairly fuzzy tolerance for edges/distances being close to zero
> > (e.g. a degenerate quad), and a more precise tolerance for linear systems
> > solutions.
> >
> > The smaller tolerance value used for denominators in these solutions prevents
> > the solved-for coordinates from being mis-classified as "bad". The bad coord
> > resolution works on the assumption that its correcting points that are
> > co-located, but if the input coords were sufficiently large the linear
> > equations would have small denominators that were less than the fuzzy tolerance
> > and then the geometry would be improperly collapsed to a line.
> >
> > For the selected zoom level of GM_crbug_10141204, this change is sufficient
> > to prevent the draw from being discarded. However, when animating the zoom
> > level, the input shape is sometimes still considered a fullscreen clear when
> > it shouldn't be. A follow up change will improve precision in CropToRect()
> >
> > Bug: skia:9779, chromium:10141204
> > Change-Id: Id1518a908c03e7813868c4eff014d18388f8f62e
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265976
> > Reviewed-by: Robert Phillips <robertphillips@google.com>
> > Commit-Queue: Michael Ludwig <michaelludwig@google.com>
>
> TBR=robertphillips@google.com,michaelludwig@google.com
>
> Change-Id: I44012a2728f75e235678f733c6da8870b84ae3ab
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:9779, chromium:10141204
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266220
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>
TBR=robertphillips@google.com,michaelludwig@google.com
Change-Id: Ie7f19c1f7c4b742f34b24157aa7800f2a974e5bf
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:9779, chromium:10141204
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266221
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
The gradient shader allocates data in the SkArenaAlloc
and points into it via its uniforms (as if it were a
bitmap or image), so we need to keep that alive while
it may be used. The scope of CacheKey() is not long
enough.
When the cache is disabled or we get a cache miss,
everything was fine, since we were working out
of the long-lived fAlloc in Builder().
But when we hit something in the cache, we'd be left
trying to draw from data in this temporary scoped
SkArenaAlloc in CacheKey(), a use-after-free.
Change-Id: Ie873d57339180f4cd320c940a72aeb0563b93325
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266356
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
I think this should catch the use-after-free when it runs
gm/lumafilter. Reassuring to have running... may also want
to add MSAN bots.
Change-Id: Ia8ed9acdb66b2e5fca02d91922d01dddbd7f2207
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266359
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Making it easier to modify the objects that are emitted by the generator
and consumed by the FP (as a pre-cursor to sampling children with
explicit coords).
Change-Id: Id746a23537c97ba7a8ac27a63622503f59c902f5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266377
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Moves the interface up to Ganesh level and starts using it from other
locations.
Change-Id: I939d2b357d3ae8551976d0d71b877b72da403712
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266063
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
This allows me to find uses of the eviction registratoin
easier in my IDE.
Change-Id: I127911f769d90716f6c8bb69d71b2255786aec21
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/265981
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Change-Id: Ib5318575ab929f1e911c8cb13753fd6d19d48818
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266202
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
gm/lumafilter is drawing wrong for me with SkVMBlitter,
but only when I enable its cache. I thought it must be
a collision between program fingerprints, but on further
inspection that doesn't seem to be the case, even 32-bit.
But now that I've done this, might as well keep it.
Even if p(collision) is small, p^2 is smaller.
Other small cleanups to what we hash and how:
- don't include derived fields in Instruction equality and hashing
- use SkOpts::hash() instead of manual std::hash/xor hack
Small struct layout changes to keep everything dense.
Change-Id: I5ba817296f0bfefa0e18f62d103094d0c63bd50d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266282
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This is pulled out of the parameter reordering CL - which has become too large.
Change-Id: Id36875dd4a670611ab94a08a3a6df41c474e9022
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266217
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Since we just rely on SkBitmap to manage rowbytes, we don't need to
separately track it in the surface.
Bug: 1038304
Change-Id: Iea2d486019bf4c5bf4f2a87eabc5f00ad71949fc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266219
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
This makes sure that when we are not using repeat mode the colorType of
the producer will match the colorType of the returned proxy.
Bug: chromium:1044862
Change-Id: I9627517c383ff7c3e9801da21ddafdacfb747871
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266218
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>