COLR fonts can use a magic palette index value 0xFFFF to
indicate the foreground color of the drawing context. Support this by
defining a flag plus saving the foreground palette value on the
SkScalerContextRec when creating the SkStrikeCache entry. Then the
FreeType backend can use the palette value when performing the COLR
drawing runs.
Fixed: skia:12576
Change-Id: I573c67482d9c53dade04eba60449e8ed1b8528fd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/463656
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Making the strike-to-source scale part of the SkStrikeSpec needs
to be handled more carefully now that the "SkMatrix is always the
same" invariant is broken.
Start with MakeCanonicalized focusing mainly on SkFont.
Change-Id: I8e3ab6120751ce280fea03b87be200155d736130
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/467080
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
When we failed to commit, we were keeping the old command buffer around
which could lead to issues if we tried to use it later.
Change-Id: I7397735931c49d5383490bbc213059bd42d2ea84
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/467777
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Bug: b/197827241
Change-Id: I39cda3f3dd46f9a340c319aaf9463253db2a7705
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/467357
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Prior to the force_highp trick, the GrConvertPixels version failed, just
like the GPU would do if we disabled the canvas2D fast path. With the
highp trick, all tests pass.
Bug: skia:12592
Change-Id: I63ad2fd3b67863b6a736316e7c7b3b9bd2ee8970
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/467516
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
These replace the Galaxy 6s for MailT860 coverage.
Change-Id: I79f1f80a68d5532916c8303acef426a05260e406
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/467518
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
This was causing some curves that needed barely more than N segments to
be rendered with N instead of N+1.
Change-Id: I4b3efbbbcfd2e514d0e5a24df6d83f15f18dbe73
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/467596
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Auto-Submit: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Rather than having this class write directly to a GPU buffer, which
also included an ugly hack to support extra instance data that was not
points, it is now just an iterator style object. This allows the
caller to iterate over all the triangles and do whatever it wants with
them. This is both faster and more versatile.
Bug: skia:12524
Change-Id: I43cdd721bc50607cc34ebf415390b4d493f4d697
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/466917
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
This makes sure we only compile the shared objs once when we have two
targets (gpu and graphite) that use them.
Bug: skia:12466
Change-Id: Ife0b6ae35c797a6a9ee8311d1b6088dca2a978d2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/467520
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
It's a performance foot-gun today (disables raster pipeline), and will
hopefully be unnecessary in the future.
Change-Id: I241484286388e4bd2a429a6d22e3b96ecf975cec
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/467456
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Bug: skia:12466
Change-Id: Id1e8311cbe5bfbc7a2c9aa9cc106ebef1d363e63
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/467459
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Add a getter to SkTypeface to provide information on whether it
needs access to the foreground color (in COLR fonts) so that the
strike cache can determine caching requirements.
Since remote SkTypefaces do not have access to table information,
implement this as a serializable flag, with font-blob backed
implementations being able to return this based on whether they
have a COLR table or not, starting with FreeType.
Preparation for supporting foreground color in FreeType COLR
rasterisation.
Bug: skia:12576
Change-Id: I7e71b0ec12e17f652ab7b43adffc43bc780ce2e7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/466936
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
0e9e321b57..8aec7f358e
2021-11-03 yuxinhu@google.com Add World Cricket Championship 2 Trace
2021-11-03 timvp@google.com Vulkan: Don't submit XFB queries when XFB is inactive
2021-11-03 cnorthrop@google.com DEPS: Update Android SDK source to android-31
2021-11-03 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from 542593f0e311 to 7a571328541a (2 revisions)
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 robertphillips@google.com on the revert to ensure that a human
is aware of the problem.
To file a bug in ANGLE: https://bugs.chromium.org/p/angleproject/issues/entry
To file a bug in Skia: https://bugs.chromium.org/p/skia/issues/entry
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/+doc/main/autoroll/README.md
Cq-Include-Trybots: skia/skia.primary:Build-Debian10-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
Tbr: robertphillips@google.com
Test: Test: TransformFeedbackTest.TransformFeedbackQueryPausedDrawThenResume
Test: Test: angle_perftests --gtest_filter="*world_cricket_championship_2*"
Test: Test: dEQP.GLES3/functional_transform_feedback*
Change-Id: I51af4abe5e56a8daffb06f905552d190b264ca8a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/467444
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bot-Commit: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Bug: chromium:1264217
Change-Id: I1af45a9e8fe0245aee4587405ec4899e10c96cf3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/466443
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Change-Id: Ibe056629a78c49f9d03eb7658c605866f31fafe5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/467303
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
FreeType COLRv1 API clarifies a couple of FT_Paint* struct's use of
FT_Fixed, adapt to that in the Skia implementation.
Contains FreeType roll to contain
d3d3ff7 [sfnt] Clarify `COLR` v1 FT_Paint* format representations
which shifts some of the COLRv1 output values to 16.16 fixed-point values.
12ef831fc3..e6e6cbf164
Fixed: skia:12594
Change-Id: I379737e333427e5229dddf20c82cf126641269b9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/466356
Auto-Submit: Dominik Röttsches <drott@chromium.org>
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
The previous version forced unique draws as the alpha changed (because
paint color was converted to a uniform). This version just uses a simple
wrapper FP that invokes the shader FP with the opaque paint color, then
multiplies the paint alpha against the result.
Bug: skia:11942
Bug: chromium:1265678
Bug: chromium:1265736
Cq-Include-Trybots: luci.skia.skia.primary:Canary-Chromium
Change-Id: I21fab1f1b0746e410509ddb4cbce5acdd21c89db
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/467077
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
The fuzzer triggered this error in a strange way that involves parsing a
TK_INVALID token. The fuzzer's original input used \xFF bytes in the
shader text to do this. I replaced these with the ` character since it
behaved the same, but allows our test inputs to remain basic ASCII.
The root problem is that `cast_expression`, part of no-op arithmetic
simplification, can now fail because expressions like `int(4000000000)`
no longer get past Constructor::Convert. Previously we had assumed
`cast_expression` could never return null; now we check its result for
null before using it.
Change-Id: I7335395bab0daf1f788b0c7c154904b2372ae13f
Bug: oss-fuzz:40660
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/467316
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Change-Id: I7b6d7412d431532ae553627d63a93b53cbd4f2b4
Bug: skia:12584
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/466773
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
These devices have all died and they are superseded by the Wembley
devices.
Change-Id: Ie8402a910768ab8460d5a9ca94b13aeb6e15d428
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/467296
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
Updated ReturnsValueOnEveryPathES3 to remove overlap with the ES2 tests,
and fixed some broken cases. Disabled the ReturnValueOnEveryPathES3 test
on Intel + Windows because switch statements on Intel + Windows are
pretty broken.
Change-Id: Id93e8af1ef7bf11fd74ef12a464c77d56cc032a0
Bug: skia:11209, skia:12465
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/467078
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Cleaning out old TODOs.
Change-Id: Ia54bffab5145d61dbacc3da5617e0e3293a6ddf2
Bug: skia:11209
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/467076
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
I had forgotten this helper existed.
Change-Id: Ic90c9ec9d338c8feb16db2d7fb68bc8ef3ed74c2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/466442
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Bug: chromium:1265766
Change-Id: Iae9281098c587dd54334f3fdbff157b37063277b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/467017
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
This means we don't have to have the JPEG headers around
even if we aren't building with JPEG enabled.
Change-Id: Icd6b3b88aef845511741ea77a0e8ce64ffd66f25
Bug: skia:12584
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/466765
Reviewed-by: Leon Scroggins <scroggo@google.com>
This is a reland of b95c83353f
Original change's description:
> [graphite] Fill in basic vertex and index buffers.
>
> Bug: skia:12466
> Change-Id: I2398fcabc6c797a0bfc2ebccc0289cbf8fd8c72f
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/466436
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Bug: skia:12466
Change-Id: Iac083c75d15f46ede1c8337da2914ad0161909e0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/466774
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Also fix some missing includes in:
- src/gpu/effects/GrPorterDuffXferProcessor.cpp
- src/gpu/GrDirectContext.cpp
- tools/DDLPromiseImageHelper.h
Change-Id: I1b30827e1442fd01534427b52549f8775300b365
Bug: skia:12584
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/466876
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
SkPDFDevice::drawPoints would usually draw nothing in perspective when
ScopedContentEntry could not be created due to perspective. Handle this
the same way as the path effect case by using draw_points to handle this
through the more general drawPaths which can flatten the perspective.
Bug: skia:12572
Change-Id: Ieaac4d6d99319b3d189b73fc316706c581d516e5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/466377
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
If our shaders pass a halfN uniform to Metal, we need to put SkHalf data
into the uniform buffer.
Change-Id: I92324715e7fb64f3b342fdf2c6994ebb86ba1773
Bug: skia:12339
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/465756
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Uint was inconsistent--we had UByte and UShort, so ints should be UInt.
Change-Id: I71fdc3db902cdf62ab1de705dca2b0d069e9effb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/466499
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
I strongly suspect we no longer need this, since it's been 9 months.
More importantly, this number is just the modification time of the
idevice_id binary on the RPi image
(https://chrome-internal.googlesource.com/infradata/config/+/refs/heads/
main/configs/chromium-swarm/scripts/skia_mobile.py#1008), and that
number changes on the rpi2-* image, so leaving this here would prevent
any jobs from ever running on the machines we're moving to.
Change-Id: Id5c627a387b6cdadf721ef9838a1674a140a5f27
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/466766
Reviewed-by: Joe Gregorio <jcgregorio@google.com>
Commit-Queue: Erik Rose <erikrose@google.com>