This will reduce memcpy overhead when runs are copied into a paragraph
or when paragraph cache entries are read or written
Change-Id: Id81725f3d8fc70daa17d154093ae7bc8b519118c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/483022
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Commit-Queue: Jason Simmons <jsimmons@google.com>
* Compute and store the hash in the ParagraphCacheKey ctor
* Move the ParagraphCacheKey into the ParagraphCacheValue during construction
Change-Id: If267fe6757c6a6bf7528f4dcc838e88f5458946f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/481239
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Commit-Queue: Jason Simmons <jsimmons@google.com>
As a follow-up to https://skia-review.googlesource.com/c/skia/+/476219,
this sketches out how we can maybe use cc_library for the things
in //modules to make sure something in //src doesn't depend on
anything in //modules, for example.
The following succeeds:
bazel build //modules/skparagraph:skparagraph --config=clang \
--shaper_backend=harfbuzz_shaper --with_icu
As does `make bazel_canvaskit_debug` in //modules/canvaskit
Suggested Review Order:
- third_party/BUILD.bazel for ICU and harfbuzz rules. Pay
special attention to the genrules used to call the python
script for turning the icu .dat file into .S or .cpp.
- bazelrc and bazel/ for new flags and defines that control
use of ICU and harfbuzz. Unlike GN, with the public_defines
that get added in automatically if icu or harfbuzz is
depended upon, we need to set the defines at the top level.
This necessity might go away if we change the atoms to
depend on //modules/skshaper, which could define that flag.
- Top level BUILD.bazel files in //modules/skparagraph,
//modules/skshaper, //modules/skunicode, //modules/canvaskit
- All other .bazel file changes are automatic.
Bug: skia:12541
Change-Id: I38a9e0a9261d7e142eeb271c2ddb23f362f91473
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/478116
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
With this CL we can run as:
dm --src gm skp tests --config grmtl -v --nocpu --nogpu
and not get all the non-Graphite unit tests.
Bug: skia:12466
Change-Id: Ib3f04f315fe4b5731a54e4c72979a0c1e00baf24
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/457898
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
This reverts commit 481a58dfe0.
Reason for revert: Fixing the build
Original change's description:
> Revert "Small changes for SkText that are not in experimental directory"
>
> This reverts commit 92f1bc0083.
>
> Reason for revert: Blocking Android roll.
>
> Original change's description:
> > Small changes for SkText that are not in experimental directory
> >
> > (also made utf 8<->16 conversion static on SkUnicode)
> >
> > Change-Id: Ie64d18ad21a35ec10bd0b350fb7887fb78a419d8
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/448140
> > Reviewed-by: Mike Reed <reed@google.com>
> > Commit-Queue: Julia Lavrova <jlavrova@google.com>
>
> Change-Id: Ieb9eb0495dddfc0f9e9e74861b24efc0201fd520
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/448656
> Auto-Submit: Brian Osman <brianosman@google.com>
> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Change-Id: I1e5859c9dd943c701d4c4e648bdc3e44412eca54
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/448676
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
This reverts commit 92f1bc0083.
Reason for revert: Blocking Android roll.
Original change's description:
> Small changes for SkText that are not in experimental directory
>
> (also made utf 8<->16 conversion static on SkUnicode)
>
> Change-Id: Ie64d18ad21a35ec10bd0b350fb7887fb78a419d8
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/448140
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Julia Lavrova <jlavrova@google.com>
Change-Id: Ieb9eb0495dddfc0f9e9e74861b24efc0201fd520
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/448656
Auto-Submit: Brian Osman <brianosman@google.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
(also made utf 8<->16 conversion static on SkUnicode)
Change-Id: Ie64d18ad21a35ec10bd0b350fb7887fb78a419d8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/448140
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
+small fix for placeholder in getGlyphPositionAtCoordinate
Bug: skia:12322
Change-Id: I8f03c5c808db54fc9742e5817768db4a088bc5b5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/440458
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
These changes will allow us to enable shadowed-variable warnings.
Change-Id: I24ee7e198c1c77b58836237c37557c00452680e1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/439476
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
If we manage to fix all the existing cases of variable shadowing, we
could enable -Wshadow.
Change-Id: Id56c227be7c29c56d6e9253aefcd33607bb1129e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/438576
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
These were reviewed last year at http://review.skia.org/312480 but never
landed. Splitting into small chunks to land individually.
If we manage to fix all the existing cases of variable shadowing, we
could enable -Wshadow.
Change-Id: If993bfe66969d2278009d3a3aba999467f4ac3a4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/435719
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Introduce a build config option where ICU symbols are resolved at
runtime, against existing system libs.
Change-Id: I2325537438de0063fcc4a7c0f8411764cf550f09
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/431037
Commit-Queue: Florin Malita <fmalita@chromium.org>
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Also fixing a small problem with offsets that never appeared
because we never use this code path (but could)
Bug: skia:11947
Change-Id: I8c02c696797ea45d35fcab5746fbc079326e4539
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/404897
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
1. Fold "origin" into the positions (simplification)
2. Extend positions and offset arrays by 1, to include 1-past last glyph
3. Add flags field to run (with just WS flag for now)
Change-Id: I93e38df808a5e9e4e5bcedbc62bc5a7aa433ef2e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/399876
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Reviewed-by: Yegor Jbanov <yjbanov@google.com>
This relands the idea that onMatchFaceStyle is no longer used, but
leaves the baseclass virtual to stage removing it from client
subclasses.
This reverts commit 3c04a65508.
Change-Id: I18570065249c86f7f155c28288dce3ea9d59f619
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/401759
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
SkMaskFilter::MakeBlur expects a sigma value, but Flutter/Libtxt had
incorrectly called it a radius.
Change-Id: I9ab1ef7a92370ca4825a65ca6f06e1fe9ac55167
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/401496
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Commit-Queue: Jason Simmons <jsimmons@google.com>