Commit Graph

15 Commits

Author SHA1 Message Date
Ben Wagner
b985b4b67f Remove use of ICU C++ API from SkParagraph.
This is mostly about consolidating and removing use of
icu::UnicodeString. It was used mostly as an intermediary for
conversion, and the new conversions should make one fewer copy of the
data.

Change-Id: I1d0e5f0dc21c47ed7c80f456b9129c4c9a36b09a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/292718
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2020-05-28 22:07:40 +00:00
Julia Lavrova
18db52f2ee Skips in underline decorations
Bug: skia:10166
Change-Id: Ib1d71f69d8647840f71c8599ca3517cb575bf945
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/287620
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2020-05-06 18:59:34 +00:00
Mike Klein
96f6401789 harmonize rewrite-includes and gn-format checks
The CheckGeneratedFiles bot only required rewriting
.gn files, while the presubmit wants both .gn and .gni files.

It also appears that the #includes rewrite script runs on
both the presubmit and CheckGeneratedFiles bots.

These presubmits run on the CQ before landing right?
If so, no need for them in the CheckGeneratedFIles bot at all.

And of course, format .gni files.

Change-Id: Icd4526d62f85088862ad93566cc9ace11dc3e33f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281505
Reviewed-by: Eric Boren <borenet@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2020-04-03 17:00:54 +00:00
Julia Lavrova
2e30fde046 Font resolution: all unit tests working
Change-Id: Ie6ee30901d599ceefa42651add79bb0288c54c48
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/249004
Commit-Queue: Julia Lavrova <jlavrova@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Julia Lavrova <jlavrova@google.com>
2019-11-08 17:24:14 +00:00
Julia Lavrova
b7b0b3ad53 Paragraph cache: caching the shaped results only.
That makes layout phase 10 times faster (since the shaping takes 90% of it).

LRU cache is attached to the FontCollection object and has the same life time.
Currently it has hardcoded limit on the entry numbers (128).
One the number reached, the least recently used element is removed from the cache
to free the space for a new one.

Change-Id: I597e334422614e33715d7a9ed13acf7b1f9cd0e4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230755
Commit-Queue: Julia Lavrova <jlavrova@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Reviewed-by: Julia Lavrova <jlavrova@google.com>
2019-08-09 16:51:41 +00:00
Julia Lavrova
5207f35f33 The current version...
Adding cache
Caching shaped results
Base+Index for referencing arrays
The very first and naive version of cache
Cache measurement, lines and picture
Added text blob cache for lines
Removed Run* from Cluster
Removed const char* from Cluster and Run
Few minor changes

Change-Id: I444a1defa950aed5999cfa1c3545fd83ccb54ce9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/227840
Commit-Queue: Julia Lavrova <jlavrova@google.com>
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Reviewed-by: Mike Reed <reed@google.com>
2019-07-23 13:31:39 +00:00
Ben Wagner
7232e90e92 Fix header name in build file.
Change Iterator.h to the actual name Iterators.h. This was caught by
the cmake bot, but it would be nice to use gn check in the future.

Change-Id: If5deb82a33329306ce4456e67d3518a75526b18a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/225900
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2019-07-09 21:45:02 +00:00
Julia Lavrova
35f88226bb Adding locale
Change-Id: I4f118f37a1226f4259d0e5be3b6b557b38b3b316
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/222785
Commit-Queue: Julia Lavrova <jlavrova@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-07-09 20:55:51 +00:00
Julia Lavrova
9af5cc4d98 Adding TestFontCollection
Change-Id: I43c20616dd842e9ffeaac614c853be4702a819a7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/222104
Commit-Queue: Julia Lavrova <jlavrova@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
2019-06-20 20:42:46 +00:00
Julia Lavrova
6e6333fba4 Refactor font resolution out of font iterator;
few minor bug fixes

Change-Id: Ibc60e972480f3503965af873f36001ed233382ec
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/221544
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2019-06-18 19:23:33 +00:00
Julia Lavrova
a3552c5e6d Reland "SkParagraph"
This is a reland of 10ad0b9b01

Original change's description:
> SkParagraph
>
> Change-Id: I0a4be75fd0c18021c201bcc1edfdfad8556edeff
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/192100
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Julia Lavrova <jlavrova@google.com>

Change-Id: I46cf43eae693edf68e45345acd0eb39e04e02bfc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/219863
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2019-06-11 17:20:36 +00:00
Herb Derby
07cd38dc13 Revert "SkParagraph"
This reverts commit 10ad0b9b01.

Reason for revert: Breaks google3 build

Original change's description:
> SkParagraph
> 
> Change-Id: I0a4be75fd0c18021c201bcc1edfdfad8556edeff
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/192100
> Reviewed-by: Ben Wagner <bungeman@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Julia Lavrova <jlavrova@google.com>

TBR=borenet@google.com,djsollen@google.com,halcanary@google.com,bungeman@google.com,kjlubick@google.com,reed@google.com,drott@chromium.org,jlavrova@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I3f4ef2f34b7489d008c2fe92527d39fba0e16ff7
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/219858
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2019-06-10 13:16:53 +00:00
Herb Derby
9577f01ba0 Revert "Add FontCollection.h to gni"
This reverts commit 9e1e8caff3.

Reason for revert: ooops it was in includes

Original change's description:
> Add FontCollection.h to gni
> 
> Change-Id: I0e720d6cf023303328fd68ce70e09a81e61088f2
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/219697
> Commit-Queue: Herb Derby <herb@google.com>
> Reviewed-by: Herb Derby <herb@google.com>

TBR=herb@google.com,jlavrova@google.com

Change-Id: I4c2c08765ed3502323af028fe0aeb57472db7de0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/219756
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2019-06-09 13:59:48 +00:00
Herbert Derby
9e1e8caff3 Add FontCollection.h to gni
Change-Id: I0e720d6cf023303328fd68ce70e09a81e61088f2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/219697
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Herb Derby <herb@google.com>
2019-06-09 13:24:20 +00:00
Julia Lavrova
10ad0b9b01 SkParagraph
Change-Id: I0a4be75fd0c18021c201bcc1edfdfad8556edeff
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/192100
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Julia Lavrova <jlavrova@google.com>
2019-06-07 17:23:23 +00:00