Commit Graph

1765 Commits

Author SHA1 Message Date
Ben Wagner
c4de11b6d7 Don't build hb-icu
Since "Build HarfBuzz without ICU support" e07555f6aa, HarfBuzz in Skia
has not been using ICU. However, hb-icu support files are still being
built. Remove them from the build.

Change-Id: Ib8dcf8a2139255ee1a1019197c38414305ca082e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/432997
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2021-07-26 16:51:44 +00:00
Kevin Lubick
ad858e76e3 [canvaskit] Fix gm compilation
This removes some files that were deleted in early July 2021

Change-Id: I3a79a0d58eea16b4e14a548261f1279497860275
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/431259
Reviewed-by: Brian Osman <brianosman@google.com>
2021-07-22 16:57:32 +00:00
Kevin Lubick
391429f78b [canvaskit] Expose AsWinding
Bug: skia:11858
Change-Id: Iedbc2333779f2fac5029779bae44da48d8dd7b8f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/430956
Reviewed-by: Ben Wagner <bungeman@google.com>
2021-07-22 16:36:33 +00:00
Kevin Lubick
7fc705bdd7 [canvaskit] Fix red_line.skp test
Change-Id: I7c9610faf56af21fff17d1bfd96297770defb951
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/430857
Auto-Submit: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2021-07-21 14:06:36 +00:00
Julia Lavrova
fb4d380747 Wrong line metrics in case of a force text wrapping
Change-Id: I8fb6530c46ba8fb7f6fa2894227193ca6a9e391b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/430220
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2021-07-20 17:22:40 +00:00
Mike Reed
5caab8eea6 FilterQuality is now removed from CanvasKit
(it had already been abandoned by Skia)

MakeMatrixTransform now takes FilterOptions | CubicResampler
(just like drawAtlas) so that it can have a single entry-point
that picks either variant of SamplingOptions.

Proposal : migrate this pattern (one name, 2 parameter types)
to methods like drawImage, drawImageRect, etc.

Change-Id: I309fbd8be94e642a57ab3016dad7252537ded7d3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/429496
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2021-07-20 14:19:46 +00:00
Mike Reed
ee8b8e1984 Supporess skp test for now
Not a critical test, but its data file is out of date.

Change-Id: I41a1a94b2235e5b853e1516af7129f1cc0c0c785
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/430217
Reviewed-by: Mike Reed <reed@google.com>
2021-07-20 00:12:58 +00:00
Brian Osman
946a4cb8ac First pass at a no-SkSL CPU build
This just disables everything that depends on SkSL today:

- Color filters:
  - HighContrast
  - Lerp
  - Luma
  - Overdraw
- Skottie effects:
  - BlackAndWhite
  - BrightnessContrast
  - DisplacementMap
  - FractalNoise
  - Sphere
  - Threshold
  - GradientColorFilter (indirectly, this uses ColorFilters::Lerp)

Cq-Include-Trybots: luci.skia.skia.primary:Canary-Android,Canary-Chromium,Canary-Flutter,Canary-G3
Bug: skia:12197
Change-Id: I26269bd4423897142b8f2fdcc4ab1b274e767cba
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/427376
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2021-07-19 21:19:51 +00:00
Mike Reed
4043111918 Purge 2020 picture versions
Pull a thread, and end up removing logs of old fontmgr code.

Change-Id: I73cebf9c011a99e9d12fd728e8677fcb0700407f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/429338
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2021-07-19 19:35:49 +00:00
Mike Reed
1f261da41e Stop using filterquality
Change-Id: I0fd8ace529cde3b36df72dd4d80bba18c1388b20
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/429497
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2021-07-18 15:48:36 +00:00
Jim Van Verth
94fda947eb Reland "Fix directional shadows."
This is a reland of 6789b82401

Original change's description:
> Fix directional shadows.
>
> The xy offset calculation for drawShadow was not quite correct. Rather
> than normalizing the light vector and using the xy values of that as the
> base offset value, we should scale the light vector by 1/z.
>
> See https://github.com/flutter/engine/pull/27124#issuecomment-880182653
> for more detail.
>
> Bug: skia:10781
> Change-Id: Ib69a313cb96a532f8d89644e3d69f666a184e897
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/428880
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>

Bug: skia:10781
Change-Id: Ib58d374aa03d0144512e5ded6ccd572c74783607
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/428978
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
2021-07-16 16:49:52 +00:00
Jorge Betancourt
5514beaf3b [androidkit] bind SkImageFilters to java shared library
SkImageFilter::image
SkImageFilter::blend
SkImageFilter::dropShadow
Change-Id: Ie8cce8a06a2f50b2b3c905097740cc10b91a6c86
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/428577
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2021-07-16 16:18:55 +00:00
John Stiles
55f0d7acfa Always enforce format specifiers on SkDebugf.
Change-Id: Icba60060ab4dec45c8ef1b1e2f35056626adc0a7
Bug: skia:12143, 192062380
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/428616
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
2021-07-15 20:11:24 +00:00
Ben Wagner
7dc26fadc9 Call hb_face_count before hb_face_create
As pointed out at https://github.com/harfbuzz/harfbuzz/issues/248 one
should call hb_face_count to do a sanitizer check before calling
hb_face_create.

Change-Id: I71795962a027188d702274f84e3bfa6c15fcd130
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/428322
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2021-07-15 12:08:25 +00:00
Julia Lavrova
3cf050bba6 Fixing placeholder position
Bug: skia:12130
Change-Id: Iac2f4f1799f054694d33259f31d1216aa040c5e0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/426923
Commit-Queue: Julia Lavrova <jlavrova@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2021-07-13 20:47:50 +00:00
Julia Lavrova
2eafe9c17d Fixing canvaskit test after fixing line metrics
Change-Id: I8ad525bd8cc44e194811b2c1760ea4ce430bf2a4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/427486
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2021-07-13 19:24:50 +00:00
Tyler Denniston
f8b7c1ac5f Pass CTM to path effects (experimental)
Add an overload to SkPathEffect that can be used when the CTM is known
at the callsite. GPU callsites are not handled here, that will be
tackled in a separate CL.

Path effects must implement the filterPath virtual that accepts the CTM,
although they are not obligated to use it. If a path effect does
use the CTM, the output geometry must be in the original coordinate
space, not device space.

Bug: skia:11957
Change-Id: I01615985599fe2736de954bb10dac881b0554ae7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/420239
Commit-Queue: Tyler Denniston <tdenniston@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2021-07-13 18:42:55 +00:00
Julia Lavrova
3a44eb92e9 Apparently, line metrics should not include newlines
(Flutter doc is wrong)
Bug: skia:12127

Change-Id: I422a870d3cf6346cf8b37834fe89c846f804e236
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/423586
Commit-Queue: Julia Lavrova <jlavrova@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2021-07-13 17:16:23 +00:00
Julia Lavrova
f3ee264564 Count trailing spaces when calculating glyph position
Bug: skia:12126
Change-Id: I1431ef3e63f8f07785a39887fa4ac6f60685c549
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/423636
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2021-07-13 14:54:13 +00:00
Florin Malita
46f39a0aa0 [skottie] Avoid null ptr deref in motion tile effect
If the layer shader local matrix is non-invertible, we end up with a
null layer shader and a null phase pass shader.


Bug: oss-fuzz:36099
Change-Id: I4fead885709e10b42e3e447d960151e0eb29e7d9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/427337
Commit-Queue: Florin Malita <fmalita@chromium.org>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: Florin Malita <fmalita@chromium.org>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-07-13 13:21:23 +00:00
Mike Reed
63ec43cf55 Hide deprecated filterquality
Change-Id: Ia320f07c3836a077d6feafb4a59a7c89325f9fcd
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/425057
Reviewed-by: Yegor Jbanov <yjbanov@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2021-07-13 00:45:12 +00:00
Mike Reed
bccbec3147 Remove drawImageAtCurrentFrame
Unused by flutter
Would need variants for sampling options
Easy for clients to achieve this with other APIs

Change-Id: Ia8b29f5183f5b729b62ef35e87897d5312b38da5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/427197
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2021-07-12 20:08:40 +00:00
Mike Reed
c98dbc6410 Hide deprecated SkPaint::getBlendMode
Callers should use asBlendMode or getBlendMode_or

Bug: skia:12173
Change-Id: I8b62527a2ae11c9bf0c1473c4fffa53b38aa7017
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/425756
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Yegor Jbanov <yjbanov@google.com>
2021-07-11 17:14:21 +00:00
Florin Malita
a0e44d7cf5 [skottie] Avoid null ptr deref in motion tile effect
If the input tile is infinite, the gradient shader instantiation fails
(degenerate endpoints).  Just ingnore the phase in that case.

Bug: oss-fuzz:35903
Change-Id: Ib78043a2157b0eaaf6f5957ae831c134be2a4e30
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/426396
Commit-Queue: Florin Malita <fmalita@chromium.org>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Auto-Submit: Florin Malita <fmalita@chromium.org>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2021-07-09 13:54:06 +00:00
Robert Phillips
024668cf7f Rename gn options to skgpu_v1 and skgpu_v2
Bug: skia:11837
Change-Id: Ie9221d2cd8e42bebb6a8a9a8ef51ba4a488ce6ca
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/424036
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-07-01 17:09:33 +00:00
Florin Malita
1df8756419 [androidkit] Color filter support
Add MatrixColorFilter, HSLAMatrixColorFilter and ComposeColorFilter.

Change-Id: I047368adcd13452566a40e91a6f594dd525efd5f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/422517
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2021-06-29 12:42:19 +00:00
Jorge Betancourt
4588910612 [androidkit] expose paint stroke settings
Change-Id: I9e34c319ff8b056e5b9cc0104be2ad50b37284c9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/422618
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2021-06-28 20:19:22 +00:00
Jorge Betancourt
0ce582790a [androidkit] introduce clipping to java Canvas
clipPath(), clipRect(), clipRRect(), clipShader()

Change-Id: Iee2571c6ab7c3f8cdfbfc4df223fd59d307b5c62
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/420880
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2021-06-28 16:04:49 +00:00
Kevin Lubick
9f39daff8f [canvaskit] Deploy 0.28.1
Change-Id: I001eae691e9167d67eab82a5eeb3650dc6f0118f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/422516
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2021-06-28 15:28:26 +00:00
Kevin Lubick
83fd9695c5 [canvaskit] Add getGlyphIDs to Typeface API
Bug: skia:12113
Change-Id: Ice0986370a76b7051de50deb6c6ace644eb4e6f4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/422016
Reviewed-by: Ben Wagner <bungeman@google.com>
2021-06-25 18:52:06 +00:00
Kevin Lubick
7027be602b [canvaskit] Add Typeface.MakeFreeTypeFaceFromData
This will replace needing to call FontMgr.RefDefault()
just to call MakeTypefaceFromData().

Change-Id: I72a8c3be62267f6c54c48a5309ef9351acb16768
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/421916
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2021-06-25 18:52:06 +00:00
John Stiles
7bf799956d Reland "Add format-specifier warnings to SkDebugf."
This is a reland of e58831cd95

Original change's description:
> Add format-specifier warnings to SkDebugf.
>
> This CL fixes up many existing format-specifier violations in Skia.
> Note that GCC has a warning for formatting nothing, so existing calls to
> `SkDebugf("")` have been removed, or replaced with `SkDebugf("%s", "")`.
> These were apparently meant to be used as a place to set a breakpoint.
>
> Some of our clients also use SkDebug with bad format specifiers, so this
> check is currently only enabled when SKIA_IMPLEMENTATION is true.
>
> Change-Id: I8177a1298a624c6936adc24e0d8f481362a356d0
> Bug: skia:12143
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/420902
> Auto-Submit: John Stiles <johnstiles@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

Bug: skia:12143
Change-Id: Id3c0c21436ebd13899908d5ed5d44c42a0e23921
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/421918
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-06-25 17:57:43 +00:00
Tyler Denniston
283dba5785 Revert "Add format-specifier warnings to SkDebugf."
This reverts commit e58831cd95.

Reason for revert: looks like breaking a few build bots

Original change's description:
> Add format-specifier warnings to SkDebugf.
>
> This CL fixes up many existing format-specifier violations in Skia.
> Note that GCC has a warning for formatting nothing, so existing calls to
> `SkDebugf("")` have been removed, or replaced with `SkDebugf("%s", "")`.
> These were apparently meant to be used as a place to set a breakpoint.
>
> Some of our clients also use SkDebug with bad format specifiers, so this
> check is currently only enabled when SKIA_IMPLEMENTATION is true.
>
> Change-Id: I8177a1298a624c6936adc24e0d8f481362a356d0
> Bug: skia:12143
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/420902
> Auto-Submit: John Stiles <johnstiles@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>

TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com

Change-Id: I07848c1bf8992925c9498e916744d0840355a077
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:12143
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/421917
Reviewed-by: Tyler Denniston <tdenniston@google.com>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
2021-06-25 13:33:10 +00:00
John Stiles
e58831cd95 Add format-specifier warnings to SkDebugf.
This CL fixes up many existing format-specifier violations in Skia.
Note that GCC has a warning for formatting nothing, so existing calls to
`SkDebugf("")` have been removed, or replaced with `SkDebugf("%s", "")`.
These were apparently meant to be used as a place to set a breakpoint.

Some of our clients also use SkDebug with bad format specifiers, so this
check is currently only enabled when SKIA_IMPLEMENTATION is true.

Change-Id: I8177a1298a624c6936adc24e0d8f481362a356d0
Bug: skia:12143
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/420902
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2021-06-25 11:05:59 +00:00
Florin Malita
b445cbeee2 [androidkit] Add remaining gradients
Consolidate the common logic in a Gradient base class, and add
radial/conical/sweep factories.

Change-Id: Ife15ae78e7c6df48cfa67fe20054f9bd9a8a1e90
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/420897
Commit-Queue: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2021-06-24 17:43:38 +00:00
Jorge Betancourt
b75ee08162 [androidkit] add bounds and paint to canvas.saveLayer()
Change-Id: I55701ebb23bcf31a8f1e1533b030f685f2f10127
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/420117
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2021-06-23 16:40:45 +00:00
Jorge Betancourt
7280b36687 [androidkit] add gaussian blur filter to java ImageFilters
Change-Id: I63f3f3feaf590971633c88857105ed14dbab2bb8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/420122
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2021-06-22 15:42:11 +00:00
Chris Dalton
685e09b31a Reland "Purge ccpr"
This is a reland of 7bf6bc0d06

Original change's description:
> Purge ccpr
>
> Now that the clip atlas has been successfully migrated to
> tessellation, we don't need this code anymore!
>
> Change-Id: Ic97f50cff7c4ee59f4476f8410f0b30a32df4e90
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419857
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>

Change-Id: If0be86902e7cc4755eba91a89be1ec1a6a4b54b2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419720
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-06-19 18:42:38 +00:00
Brian Osman
fe83ab6706 Revert "Purge ccpr"
This reverts commit 7bf6bc0d06.

Reason for revert: Android build references kCoverageCounting

Original change's description:
> Purge ccpr
>
> Now that the clip atlas has been successfully migrated to
> tessellation, we don't need this code anymore!
>
> Change-Id: Ic97f50cff7c4ee59f4476f8410f0b30a32df4e90
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419857
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>

TBR=robertphillips@google.com,brianosman@google.com,csmartdalton@google.com,michaelludwig@google.com

Change-Id: I01d99287978f848eb8bf900c07cba90ceb3b6edc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419898
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-06-19 15:13:19 +00:00
Ben Wagner
5a479e187d Check hb_font_create return value
There are very few ways that hb_font_create can fail. It will do minimal
sanitization if the data begins with a known magic signature, but will
otherwise return a valid hb_font which more or less looks like a valid
font with no glyphs and upem of 1000. This appears to be the reason gfx
is only using hb_face_create_for_tables to avoid the issue where a
system font may be understood by FreeType and otherwise be valid, but
not recognized by HarfBuzz.

Keep the efficiency of hb_font_create when it can be used, but check if
the resulting hb_font has no glyphs. If it has no glyphs attempt to use
hb_face_create_for_tables instead.

See https://github.com/harfbuzz/harfbuzz/issues/248

Change-Id: Iaf82127152cdf6de160274234bcb19b5ccbccc1b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419805
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2021-06-18 22:21:47 +00:00
Chris Dalton
7bf6bc0d06 Purge ccpr
Now that the clip atlas has been successfully migrated to
tessellation, we don't need this code anymore!

Change-Id: Ic97f50cff7c4ee59f4476f8410f0b30a32df4e90
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419857
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
2021-06-18 21:46:36 +00:00
Brian Osman
f62632c7c3 Remove SkShaders::Lerp
It's entirely unused, and trivial for clients to create with SkSL.

Change-Id: I197986232d3706f5af3a197f0fb8e744e1009e5f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419796
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2021-06-18 16:40:08 +00:00
Florin Malita
ca8191b0ad [androidkit] Add linear gradient
Change-Id: Ie08dcde421bb4f67b8467361bda563d5a65ddbd2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/416777
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2021-06-17 20:55:53 +00:00
Ben Wagner
e07555f6aa Build HarfBuzz without ICU support
In addition to reducing the dependency footprint of HarfBuzz as a
library, removing the slow conversion from ICU script to HarfBuzz script
representation should speed things up a bit. Additional clean up to
remove the no longer used SkUnicodeScript parameter will be put off
until later as a separate API change.

Bug: skia:12095
Change-Id: Ib7982a59670cc9c25cb1489b9622a98968ae1a38
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419196
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2021-06-17 15:44:13 +00:00
Kevin Lubick
fba8a742cb [canvaskit] Deploy 0.28.0 to npm
Change-Id: Ia1f97a476816b7e9d5a7d994b41676fb21979783
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419356
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2021-06-17 14:02:23 +00:00
Kevin Lubick
c5f8433d47 [canvaskit] Add known swiftshader bug to Changelog
b/188239650

Change-Id: I371b24bc7210decd3cba22e6adc2432a688f0059
Bug: skia:11965
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419156
Reviewed-by: Chris Dalton <csmartdalton@google.com>
2021-06-17 13:49:04 +00:00
Kevin Lubick
be03ef1565 Remove ableist language
Change-Id: Ie9ef50a14906c9350adbe16720291dca944ad7fc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/418738
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2021-06-16 21:37:21 +00:00
Jorge Betancourt
cfa4774f9a [androidkit] expose SkPath to androidkit
Change-Id: Ibc871459234ba72b0ab948c601e0895c15e21126
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/415797
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2021-06-16 20:23:20 +00:00
Chris Dalton
2e2488c813 Call test.modifyGrContextOptions() in wasm tests
Change-Id: Ie6b641d1df7040f5a13fb654b83c90c5e07e0171
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/419116
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Auto-Submit: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2021-06-16 19:59:51 +00:00
Brian Osman
759802fdd1 Reland "Fix more new Clang warnings"
This is a reland of 3d5483a547

Original change's description:
> Fix more new Clang warnings
>
> Change-Id: I82a13744669a6b5c23e23e6a719ec79878114dab
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/418697
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Kevin Lubick <kjlubick@google.com>

Change-Id: I6a81630c09d7aed906196b28adced0bf0a88e18d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/418938
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-06-16 17:40:07 +00:00
Brian Osman
6448ec390d Revert "Fix more new Clang warnings"
This reverts commit 3d5483a547.

Reason for revert: Android roll.

Original change's description:
> Fix more new Clang warnings
>
> Change-Id: I82a13744669a6b5c23e23e6a719ec79878114dab
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/418697
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Kevin Lubick <kjlubick@google.com>

TBR=kjlubick@google.com,brianosman@google.com

Change-Id: I2032ee5efdb297b7cfdbe60ff2546305ef96ea57
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/418937
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-06-16 14:03:58 +00:00
Kevin Lubick
c4de8e4aad [canvaskit] Add documentation about node/npm
Change-Id: I3818a37bdd3b4fb512559b2c61f5150942450cf4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/418956
Reviewed-by: Tyler Denniston <tdenniston@google.com>
2021-06-16 13:03:32 +00:00
Harry Terkelsen
e5d23f0b1f [canvaskit] Fix incorrect malloc for text style shadows
Change-Id: Id0de9a3a557dc712d947a80f0bc7333122773870
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/416687
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2021-06-16 12:34:06 +00:00
Brian Osman
3d5483a547 Fix more new Clang warnings
Change-Id: I82a13744669a6b5c23e23e6a719ec79878114dab
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/418697
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2021-06-15 18:32:48 +00:00
Florin Malita
4f382641ec [androidkit] Add pinch-zoom support to cube demo
Also add translate/scale Canvas helpers.

Change-Id: I8c46d45f73a41907d8d8f83b355a4185b6975f06
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/416776
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2021-06-15 14:06:17 +00:00
Kyle Carlstrom
1907f9051e Expanded PropertyObserver interface to include Node Type
Change-Id: I86b0ab3445f8fe4790492fa1b942c97e3053af9e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/417264
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
2021-06-11 17:00:47 +00:00
Jorge Betancourt
f961bc256d [androidkit] expose image filters to androidkit library
Add DistantLitDiffuse lighting filter as template for future filters to be added


Change-Id: Ib641b26512b0501538dfd54b17ab127bdef98f88
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/414976
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2021-06-04 21:18:38 +00:00
Florin Malita
bbaf630c76 [svg] Document container size semantics
Also add a helper for accessing the root SVG element:
SkSVGDOM::getRoot().

Bug: skia:11144
Change-Id: Icc7af8f0521203de26836e56dee8c503a56997c0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/415746
Commit-Queue: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Tyler Denniston <tdenniston@google.com>
2021-06-04 19:24:37 +00:00
Jorge Betancourt
416477a8af [androidkit] expose saveLayer
Additionally, pass return value from native save and saveLayer to java

Change-Id: I1a4e04305ba8e57f6a639978b00f8e2ca1a59f90
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/415170
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2021-06-04 15:29:53 +00:00
Kevin Lubick
78297af33a [canvaskit] Remove *Builders in favor of Malloc.
Change-Id: Ie785281d0759575ff4f7ece379dceeb065765405
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/414521
Reviewed-by: Nathaniel Nifong <nifong@google.com>
2021-06-03 17:43:58 +00:00
Kevin Lubick
82186e944e [canvaskit] Remove 2d arrays from path commands
Change-Id: I6fbd91f4073ab5eca319bd6b44c72bb9904375bc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/414238
Reviewed-by: Nathaniel Nifong <nifong@google.com>
2021-06-03 17:43:42 +00:00
Kevin Lubick
7b6a92818d [canvaskit] Add Surface.makeFromTexture
This includes a helper Surface.makeFromTextureSource that will
make the gl calls with some sensible defaults.

Change-Id: I31bb2f3118b4749e77fb1fc2cb013d35ccb7cfce
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/413336
Reviewed-by: Brian Osman <brianosman@google.com>
2021-06-03 12:29:07 +00:00
Kevin Lubick
72fb3fcdf0 [canvaskit] Use copy1darray to send arrays to JSSpan
This approach is 5 to 20x faster than the existing version,
mostly by minimizing the number of back-and-forths, especially
in the vanilla JS Array case.

Change-Id: Icb4212f781b80ef743f3deb1c17ea6af80ea828b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/414517
Reviewed-by: Mike Reed <reed@google.com>
2021-06-02 14:18:59 +00:00
Julia Lavrova
658d96662b Fixing the worst case when text cannot be resolved at all
(hanging on Mac)
Bug: skia:11996

Change-Id: I4dcd8175d0d4440a7c7ef73be26508018ad86c46
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/412661
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2021-05-27 17:43:57 +00:00
Kevin Lubick
123e55968d [canvaskit] Build with emsdk 2.0.20
Change-Id: I4c3bdc8dd0d0dc8b12b2d430d5ea9a20d170b82b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/412876
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2021-05-27 12:36:41 +00:00
Kevin Lubick
61b0a88357 [canvaskit] Update testing dependencies
Other devs should run `npm ci` to install these locally.

Change-Id: I4581e8afe2401b10edae86b8bfd6fe398546cd0f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/412836
Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
2021-05-27 12:31:20 +00:00
Kevin Lubick
dc5530e5b3 [canvaskit] Retry loading assets for tests
This cuts down on some flakiness I saw locally.

Change-Id: I8659b2cabacb99f3839a4b44daec852061184d55
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/412663
Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
2021-05-27 12:31:06 +00:00
Kevin Lubick
95d599c0a0 [canvaskit] Introduce self-documenting pointer types
Change-Id: I72dfe6098dae699d85cf87b6432e27cf845c832d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/412659
Reviewed-by: Mike Reed <reed@google.com>
2021-05-27 12:30:54 +00:00
Jorge Betancourt
614e398ed3 expose Matrix transpositions and setUniform to RuntimeEffectBuilder
Change-Id: I78b57c3ad5e735335d1e2cc34e6c51a2ced6fc03
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/412796
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2021-05-26 20:31:39 +00:00
Mike Reed
0e4477e713 Switch to malloc/free to be compatible with CanvasKit.Malloc
Inspired by https://skia-review.googlesource.com/c/skia/+/410876

Change-Id: Iaf64f379e74d46b46c795dd5f04db32406b976b4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/411576
Auto-Submit: Mike Reed <reed@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2021-05-24 12:22:13 +00:00
Mike Reed
ec9d0e865d Move patheffect details to (private) base subclass
bug: skia:11957
Change-Id: Iceaa0ac1d7a3f049d2725629d78c755ad03a2862
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/411302
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2021-05-22 01:55:43 +00:00
Florin Malita
50cc5d4147 [androidkit] Image shader support
Tangential updates:

 - new encoded input stream Image factory
 - Paint setters now return the object to support a fluent workflow
 - cube demo updated to store face paints instead of colors


Change-Id: I6142a229b18165112ef1fe76acae38bc4b27480d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/410789
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2021-05-21 17:30:43 +00:00
Florin Malita
6e5d64b160 [androidkit] Add SamplingOptions
Mirroring SkSamplingOptions.

Change-Id: I6c4d21fb3f123e7931271fcc830d82f6b0215c40
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/410786
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2021-05-20 20:29:55 +00:00
Florin Malita
934c02142e [androidkit] Introduce Image support
Two sources from now:

  - encoded data factory
  - Surface.makeImageSnapshot()

Change-Id: Icbf2f855e489839dc82db425916c8644418a2fb7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/410324
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
2021-05-20 20:28:55 +00:00
Kevin Lubick
82c4a69b27 [canvaskit] Roll 0.27.0
Change-Id: I216d91caa48a8d596d303a5dfa8a403b56b2d11a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/410857
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2021-05-20 18:57:24 +00:00
Kevin Lubick
6017b4833f [canvaskit] Remove two previously deprecated APIs
Change-Id: I952f688fe4292344d1d4a57a29179eaddb35360b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/410856
Reviewed-by: Kevin Lubick <kjlubick@google.com>
2021-05-20 18:44:50 +00:00
Julia Lavrova
10e7e77909 Reland "Switching SkText to UTF16"
This is a reland of a3262aa1d2

Original change's description:
> Switching SkText to UTF16
>
> Required some changes in SkUnicode to support it
> SkShaper still works on UTF8
>
> Change-Id: I76645668e1d9bf95eb4539a066deea2b24ecf5e9
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/406360
> Reviewed-by: Julia Lavrova <jlavrova@google.com>
> Commit-Queue: Julia Lavrova <jlavrova@google.com>

Change-Id: Ib21898d4acda8ab78e5e6fd1c7b9b0da41c3fa83
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/407396
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2021-05-19 17:54:14 +00:00
Mike Reed
0dfb1c93c1 Use template specialization to remove redundant parameter
Change-Id: I74762ff88ec0220ff023957668bdda9c4a487f1e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/409999
Reviewed-by: Herb Derby <herb@google.com>
2021-05-18 19:43:53 +00:00
Florin Malita
a1304f513e [androidkit] Add SurfaceRenderer utility
Most samples use the same render thread boilerplate -- consolidate as
a utility base class.

Also add Canvas.getWidth/getHeight.

Change-Id: I27c9f51b4fd9d228a39593fbd4650a66d10240c2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/409896
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2021-05-18 19:37:44 +00:00
Yegor Jbanov
3c429d05f9 make jline a JS object
Change-Id: Ib0e48868c77270f091c2d6ad857cd47278aff8a9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/410036
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Commit-Queue: Yegor Jbanov <yjbanov@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2021-05-18 19:25:54 +00:00
Mike Reed
bdfd776161 Optimize reading from a JS array
Grants read-access to a JS array, either ...
- direct peek into the (malloc'd buffer)
- quick copy (the src was a typed_array)
- slow copy (had to perform a per-element lookup)

Change-Id: Id389f244039d35aefd84e0d95d598cbe15cd28c4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/409397
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2021-05-18 15:25:37 +00:00
Ethan Nicholas
55a63afc5f Make it possible to use the DSL from within the compiler itself
The DSL would not previously function within the compiler, because it
expected to be in charge of everything itself. The compiler and DSL also
disagreed about how to handle some things, such as the DSL not
respecting the compiler's override flags.

This CL moves responsibility for much of the setup process into
DSL::Start(), which the compiler now invokes. DSL::Start() now also
takes a ProgramSettings instead of DSL-specific flags, and the
externalFunctions vector has been moved into ProgramSettings.

Change-Id: I283ed8366e25d67f02c43833743c5f8afdedaefc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/408136
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2021-05-18 15:10:53 +00:00
Florin Malita
5e8d88ef29 [androidkit] Add support for Skottie animations
Change-Id: Ibba2c0c8ad5b10d90f0bb30a3a859dacb94a03ad
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/409400
Commit-Queue: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2021-05-18 14:49:43 +00:00
Mike Reed
e8cd0a5404 Don't need/want to pay attention to non-shaping attributes
Change-Id: I16d75c9d8fb3c61a4993fe216142e80884bc2ad1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/409576
Reviewed-by: Mike Reed <reed@google.com>
2021-05-18 01:06:08 +00:00
Kevin Lubick
5b38536d76 [canvaskit] Add tests for getGlyphIntercepts
Change-Id: I115dafccb74bdf5a61f7ed25bf97fc1cec682c1d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/409403
Reviewed-by: Mike Reed <reed@google.com>
2021-05-17 19:24:07 +00:00
Jorge Betancourt
ec978bbc4d expose canvas.localToDevice to androidKit
Change-Id: Ia6af3a06b9be078fd0b281a89fad0641082fd0ee
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/409336
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2021-05-17 18:41:20 +00:00
Mike Reed
bc7c754ce3 Expose glyphIntercepts to CK
bug: skia:12000
Change-Id: I40f130b0eab21ef4a53ee88eed8f62c4f3a577c1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/408899
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Yegor Jbanov <yjbanov@google.com>
2021-05-15 15:30:50 +00:00
Mike Reed
81e2f9355b Expose intercepts on SkFont
Already exposed (on TextBlob), so this makes it available for clients
that may use drawGlyphs directly. (including canvaskit/flutter)

Change-Id: I8b4bd51e13827dc3970d5a6d06f0e0d3031af13c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/408638
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2021-05-14 14:50:42 +00:00
Florin Malita
16eead830a [skottie] Clamp OpacityEffect values
Animated opacities can yield values > 1, which trigger RenderContext
asserts.

Clamp explicitly to avoid this issue.  Also avoid allocating a new
RenderContext when the value is >= 1 (no op).

TBR=
Change-Id: I1639af7ab50f4ccf9cd79cb950f14b64dd2619ba
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/408256
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
2021-05-14 14:19:22 +00:00
Florin Malita
4c0da73206 [skottie] Text fill/stroke opacity animators
Implement support for fill and stroke opacity animators.

TBR=reed
Bug: skia:11966
Change-Id: I206c949d0fc685c63043e672f16e9c1ac35a6d53
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/405397
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Florin Malita <fmalita@google.com>
2021-05-13 20:03:52 +00:00
Jorge Betancourt
025b914468 [androidkit] add getter for matrices
Change-Id: I0fd42b2506d794622852bd55aa4e8c2545216312
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/407916
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2021-05-13 19:29:53 +00:00
John Stiles
154bd1f522 Avoid repeated failure messages in the dm logs.
Successful dm runs on Windows currently include this message many
thousands of times over. This pollutes the logs for no benefit.

Change-Id: I127b4588ed25d8f51ac70d0f87645bd9c28cec5a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/408057
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-05-13 17:27:45 +00:00
Jorge Betancourt
e3f8030494 [androidkit] implement ThreadedSurface backed by WindowSurface
This moves ownership of the SkSurface to ThreadedSurface::fWindowSurface.

When we pass a Message to the SurfaceThread, we will include  a pointer to ThreadedSurface.fWindowSurface so we can call:
getCanvas() to draw the SkPicture
WindowSurface's constructor so it can hold the WindowContext made during the init

To reference WindowSurface in SurfaceThread, we need to make a header for Surface.cpp (added in this cl)

Change-Id: I8c67223eee301a1b6e0d05934e1f8597cf70bc64
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/404918
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2021-05-13 17:15:49 +00:00
Brian Osman
a5842bc903 Move SkSpan to include/, for use in public API
Change-Id: I674f038600afd6d49316c1ece515941ee5579068
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/406939
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-05-12 13:19:32 +00:00
Brian Osman
2305b7914e Use SkMakeSpan in SkShaper_harfbuzz
Fixes G3 roll

Change-Id: I0d7c3c74f793fb2c22db969fb2a6f93e39931918
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/407099
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2021-05-11 22:33:59 +00:00
Robert Phillips
0c9962a7c8 Revert "Switching SkText to UTF16"
This reverts commit a3262aa1d2.

Reason for revert: I believe this is blocking the Flutter roll

Original change's description:
> Switching SkText to UTF16
>
> Required some changes in SkUnicode to support it
> SkShaper still works on UTF8
>
> Change-Id: I76645668e1d9bf95eb4539a066deea2b24ecf5e9
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/406360
> Reviewed-by: Julia Lavrova <jlavrova@google.com>
> Commit-Queue: Julia Lavrova <jlavrova@google.com>

TBR=bungeman@google.com,reed@google.com,jlavrova@google.com

Change-Id: I68b66dfbc4f3668a8fb765d5f557699e396cd3f5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/407177
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
2021-05-11 22:24:20 +00:00
Julia Lavrova
a3262aa1d2 Switching SkText to UTF16
Required some changes in SkUnicode to support it
SkShaper still works on UTF8

Change-Id: I76645668e1d9bf95eb4539a066deea2b24ecf5e9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/406360
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2021-05-11 20:31:29 +00:00
Brian Osman
ae87bf1e49 Remove SkSpan class template deduction guides
This effectively reverts a80ce1a36d,
and goes back to using SkMakeSpan (which works in C++14).

Change-Id: Iaa63c86b5acaadbdd60588b0a5c703820e810770
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/406938
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2021-05-11 20:06:29 +00:00
Jorge Betancourt
e3934b937e [androidkit] expose lookAt, perspective, and inverse Matrix construction
Change-Id: I94de24b2e47365cd65025166d83dd8b6c8fda90a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/405857
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2021-05-10 23:25:54 +00:00
Jorge Betancourt
c44ede6c78 [androidkit] expose minimal stroke settings to Java
Change-Id: I012aa2760ff2b39f0c21d6e235cf6731d13bfe3f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/405856
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2021-05-10 16:33:32 +00:00