aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkGlyphCache.cpp
Commit message (Collapse)AuthorAge
* fonts: Handle fallback to using paths for text rendering for remoting.Gravatar Khushal2018-05-17
| | | | | | | | | | | | | | | | | | SkRemoteGlyphCache only sends images for glyphs, even for cases where the gpu falls back to drawing text as paths. This includes cases in SkDraw::ShouldDrawTextAsPaths and when the glyph exceeds the max bounds that can fit on the atlas. Fix this by identifying these cases in the renderer and sending paths instead. Note: We still don't handle distance field text correctly. R=herb@google.com, bsalomon@google.com Bug: skia:7913 Change-Id: I17d4eccbeaa2e995ae67b61c76cebd27f8280329 Reviewed-on: https://skia-review.googlesource.com/128203 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Khusal Sagar <khushalsagar@chromium.org>
* fonts: Fix memory accounting for deserialized glyphs.Gravatar Khushal2018-05-15
| | | | | | | | | | | | | | | When deserializing glyphs in the SkRemoteGlyphCache, we allocate from the arena for the SkGlyphCache but don't account for it in the total memory used by the cache. Fix that and avoid exposing the SkArenaAlloc from SkGlyphCache, since that can result in such brittle use. R=herb@google.com Bug: 829622 Change-Id: Iecff9ce6e0ed2c641957535363edec3e3fad178d Reviewed-on: https://skia-review.googlesource.com/128112 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Khusal Sagar <khushalsagar@chromium.org>
* Untangle strike cache and glyph cacheGravatar Herb Derby2018-04-19
| | | | | | | | | | | | The strike cache and the glpyh cache have been friends for a long time. Untangle this twisted relationship. BUG=skia:7515 Change-Id: Ie77393f6923e9886ec90ff7a60a1200e78319937 Reviewed-on: https://skia-review.googlesource.com/122084 Commit-Queue: Herb Derby <herb@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>
* Move strike cache Find*() to strike cacheGravatar Herb Derby2018-04-18
| | | | | | | | | BUG=skia:7515 Change-Id: Ic1580d4752d51a62df5427a28f843bc7b3181797 Reviewed-on: https://skia-review.googlesource.com/122020 Commit-Queue: Herb Derby <herb@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Move node information to SkStrikeCacheGravatar Herb Derby2018-04-17
| | | | | | | | | | | | | | Move all the information for handling nodes into SkStrikeCache. Having all the cache organization in SkStrikeCache will localize all the Chrome pinning machinery to this class. BUG=skia:7515 Change-Id: I5bc5488ddfe1806d62927d13148af36dac08eae9 Reviewed-on: https://skia-review.googlesource.com/121888 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Reorganize strike cache and glyph cache codeGravatar Herbert Derby2018-04-17
| | | | | | | | | BUG=skia:7515 Change-Id: I05867890e88de7a7d23b60d9eec989d93d39d333 Reviewed-on: https://skia-review.googlesource.com/121783 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Rename SkGlyphCacheGlobals to SkStrikeCacheGravatar Herb Derby2018-04-16
| | | | | | | Change-Id: I7773c1fff309bf9416f16fe9908191eeba94eb99 Reviewed-on: https://skia-review.googlesource.com/121356 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Distinguish between glyphs with empty path and no path.Gravatar Ben Wagner2018-04-05
| | | | | | | | | BUG=skia:4904 Change-Id: I065e3b4d8596b415ddaf094d7f9a4b65da64d4d4 Reviewed-on: https://skia-review.googlesource.com/117280 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Herb Derby <herb@google.com>
* Regularize SkGlyphCache creation.Gravatar Herb Derby2018-03-20
| | | | | | | | | | | | | This allows no need for downcasting for specialized use of SkScalerContext for the remote case. This allows cache priming to be used in a single process. BUG=skia:7515 Change-Id: I963a50e36af9deef5a3414fc8a4c94ccfc38deaf Reviewed-on: https://skia-review.googlesource.com/115121 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Remove DetachCache and AttachCache.Gravatar Herb Derby2018-03-12
| | | | | | | Change-Id: I78697bed25f5d26ad91318b1fa3efbfc697a428a Reviewed-on: https://skia-review.googlesource.com/113275 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Remove TLS glyph cache calls.Gravatar Herb Derby2018-03-09
| | | | | | | Change-Id: Iafeb02d395cac81e8fe6d74c989a37607503919c Reviewed-on: https://skia-review.googlesource.com/113208 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Remove one use of AttachCache, and a paint variant of FindOrCreate...Gravatar Herb Derby2018-03-09
| | | | | | | | | | This is a point change to see if it causes bad draws using config gldft. Checked with skdiff on that config. Change-Id: Ibee4630df21456ba9dccf28480bded82d1d9bf47 Reviewed-on: https://skia-review.googlesource.com/113204 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Revert "Remove attach and detach glyph cache."Gravatar Herb Derby2018-03-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 61d56b92a4076f8afd644d015913641d691e39c8. Reason for revert: broke gldft text Original change's description: > Remove attach and detach glyph cache. > > BUG=skia:7515 > > Change-Id: Ib978e3cf4cfffdefe6453feb520e5e73684abf2e > Reviewed-on: https://skia-review.googlesource.com/112560 > Reviewed-by: Ben Wagner <bungeman@google.com> > Commit-Queue: Herb Derby <herb@google.com> TBR=bungeman@google.com,herb@google.com Change-Id: Id5723a3abcd103ed20197bba2dab06e8074be633 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:7515 Reviewed-on: https://skia-review.googlesource.com/112745 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Remove attach and detach glyph cache.Gravatar Herb Derby2018-03-07
| | | | | | | | | BUG=skia:7515 Change-Id: Ib978e3cf4cfffdefe6453feb520e5e73684abf2e Reviewed-on: https://skia-review.googlesource.com/112560 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Add GetTypefaceOrDefault to SkPaintPrivGravatar Herb Derby2018-03-06
| | | | | | | | | | | | Remove most uses of GetDefaultTypeface. SkTypeface has fewer friends. BUG=skia:7515 Change-Id: Iedec5b39b9ef8c638772be4971075491b59b740b Reviewed-on: https://skia-review.googlesource.com/112300 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Herb Derby <herb@google.com>
* SkGlyphCache - update core routines.Gravatar Herb Derby2018-03-05
| | | | | | | | | | | | | | | | | - Allows different methods for creating SkGlyphCaches - Enables passing FontMetrics for cache creation. - Removes VisitCache - Removes VisitAll - Introduces SkExclusiveStrikePtr which should replaces SkAutoGlyphCache with simpler mechanism. BUG=skia:7515 Change-Id: Ibada35e3985335179d2cc8284a837fc525224c92 Reviewed-on: https://skia-review.googlesource.com/111063 Reviewed-by: Ben Wagner <bungeman@google.com> Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Herb Derby <herb@google.com>
* SkScalerContext - make some fields private.Gravatar Herb Derby2018-02-23
| | | | | | | | | BUG=skia:7515 Change-Id: Id7230db89e47703db465250c8fac99937d69721d Reviewed-on: https://skia-review.googlesource.com/109810 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Move glyph cache and descriptor functions off of SkPaintGravatar Herb Derby2018-01-23
| | | | | | | | | BUG=skia:7515 Change-Id: If17b157db1077a9a3c0f9efd03929f62a3486419 Reviewed-on: https://skia-review.googlesource.com/98841 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Herb Derby <herb@google.com>
* Directly use SkScalerContextRec.Gravatar Ben Wagner2017-11-01
| | | | | | | | | | | | | | | | | Some time ago SkScalerContext::Rec was made SkScalerContextRec so that it could be forward declared. However, SkScalerContext::Rec remains as a typedef to SkScalerContextRec. This removes the typedef and updates the users to use the SkScalerContextRec type directly. This change was prompted by my own confusion when looking at some code which mixed these two, by IntelliSense's confusion when declaring an argument with one and defining with the other, and reducing the general proliferation of nested 'Rec' types in Skia. Change-Id: I3a23a4bdd83a591807c78cea6aa7a0117544b614 Reviewed-on: https://skia-review.googlesource.com/66153 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Remove last uses of SkTypeface::style() in Skia.Gravatar Ben Wagner2017-08-08
| | | | | | | | | | | The Lua typeface.getStyle now returns SkFontStyle. Dumping a glyph cache entry is now more accurate. SkTypeface::MakeFromTypeface now does a more accurate check. Change-Id: I6150636c8c674353bd0eed4d95aa0794d3919c39 Reviewed-on: https://skia-review.googlesource.com/32200 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* add API to change max pointsize for font cacheGravatar Mike Reed2017-06-01
| | | | | | | | Bug: skia:6585 Change-Id: I6df8c439dca0a154e8fbfce6d66c536665dff1d7 Reviewed-on: https://skia-review.googlesource.com/18314 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* fix 36605271Gravatar Cary Clark2017-04-06
| | | | | | | | | | | | | typo in function header makes it appear that a buffer overflow may occur R=djsollen@google.com Bug: b/36605271 Change-Id: Iab6d08ae71f49c46736dc025791faefdeb74df5e Reviewed-on: https://skia-review.googlesource.com/11454 Reviewed-by: Derek Sollenberger <djsollen@google.com> Commit-Queue: Eric Boren <borenet@google.com>
* Move from SkChunkAlloc to SkArenaAlloc for SkGlyphCache.Gravatar Herb Derby2017-01-20
| | | | | | | Change-Id: I221dd1c35898fe2703584f90d14192c8b546af40 Reviewed-on: https://skia-review.googlesource.com/7112 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Clean up glyph id handling.Gravatar Ben Wagner2016-11-11
| | | | | | | | | | | | | | | | | Extract SkPackedID and its strongly typed subclasses SkPackedGlyphID and SkPackedUnicharID out of SkGlyph. This simplifies the code handling these types, as well as making it clearer that we wouuld eventually like to get away from this scheme. Changes SkScalerContext::getPath to take SkPackedGlyphID. Changes SkScalerContext::generatePath to take SkGlyphID. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4722 Change-Id: I365c0c618b7ae0d348272155fac7761a69faa920 Reviewed-on: https://skia-review.googlesource.com/4722 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Herb Derby <herb@google.com>
* SkScalerContext to use smart pointers.Gravatar bungeman2016-10-20
| | | | | | | | | CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-ASAN-Trybot;master.client.skia:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-MSAN-Trybot Change-Id: I27a714388b8ded7dfc968e322b0a587205f575f1 Reviewed-on: https://skia-review.googlesource.com/3731 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Ben Wagner <bungeman@google.com>
* SkDescriptors to be held in unique_ptr.Gravatar bungeman2016-10-19
| | | | | | | | | | | | This also removes the class operator new override along with directly calling malloc in SkData, since it has a similar requirements. CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-ASAN-Trybot;master.client.skia:Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Debug-MSAN-Trybot Change-Id: Ic68aacf2028d6964d9735a55558862afc9edd19b Reviewed-on: https://skia-review.googlesource.com/3541 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Ben Wagner <bungeman@google.com>
* Remove aux procs from SkGlyphCache.Gravatar Ben Wagner2016-10-17
| | | | | | | | | | | Doesn't appear that anyone is using these anymore. The last user was removed with https://codereview.chromium.org/1985163002/ landed as https://skia.googlesource.com/skia/+/c2878e23d405e7ae77f6110602ad75ce1f6b941c Change-Id: I224354cd0d1ecbbb1100aa1e4b415d48637a51f3 Reviewed-on: https://skia-review.googlesource.com/3582 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Herb Derby <herb@google.com>
* GN: default to -O1Gravatar mtklein2016-09-07
| | | | | | | | | | | | | | | | | | | In a GN world we are no longer tied to the Debug/Release dichotomy of GYP, and extra_cflags makes it trivially easy to override any flags we set by default. These two together mean we don't have to make the default Debug build pointlessly unoptimized. -O1 takes negligibly longer to compile than -O0, doesn't make debugging difficult, and the code is considerably better. DM runs ~4x faster this way. Backstory: I just re-noticed we do this for our Debug MSAN builds, which has had a serious wall-time slimming effect. I was about to restore it to my GN MSAN builds when I realized, hey, maybe we should do this for all builds. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2322753002 Review-Url: https://codereview.chromium.org/2322753002
* Eagerly update the unichar to glyphID mapping.Gravatar herb2016-08-17
| | | | | | | | | In addition, some small cleanups. BUG=chromium:635005 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2249063005 Review-Url: https://codereview.chromium.org/2249063005
* Add guards around access to font cache global fields.Gravatar herb2016-06-22
| | | | | | | BUG=589439 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2082423002 Review-Url: https://codereview.chromium.org/2082423002
* Type-erase SkAutoMutexAcquire and SkAutoExclusive.Gravatar mtklein2016-06-10
| | | | | | | | | | This is purely for convenience, to not need to write the lock type in the guard anymore. This should all inline away. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2055023003 Review-Url: https://codereview.chromium.org/2055023003
* Assert complex precondition in SkGlyphCache::Visit.Gravatar bungeman2016-05-19
| | | | | | | | | SkGlyphCache::Visit takes a descriptor and a typeface, but it is implied that the fFontID in the descriptor is the id of the typeface. This seems to be handled correctly by current callers but this is a subtle requirement which if violated could lead to subtle bugs. Review-Url: https://codereview.chromium.org/1992053002
* Rename SkDescriptor::equals to SkDescriptor::operator==Gravatar bsalomon2016-05-17
| | | | | | | BUG=chromium:608566 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1986253002 Review-Url: https://codereview.chromium.org/1986253002
* SkOncePtr -> SkOnceGravatar mtklein2016-05-05
| | | | | | | | | | | | | | | | It's always nice to kill off a synchronization primitive. And while less terse, I think this new code reads more clearly. ... and, SkOncePtr's tests were the only thing now using sk_num_cores() outside of SkTaskGroup, so I've hidden it as static inside SkTaskGroup.cpp. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1953533002 CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Committed: https://skia.googlesource.com/skia/+/9bd3fc7fa9bb7cad050bd619aa93d4c48ebb5c02 Review-Url: https://codereview.chromium.org/1953533002
* Revert of SkOncePtr -> SkOnce (patchset #1 id:1 of ↵Gravatar reed2016-05-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1949313003/ ) Reason for revert: ok, I have no idea what's going on Original issue's description: > Reland of SkOncePtr -> SkOnce (patchset #1 id:1 of https://codereview.chromium.org/1945293004/ ) > > Reason for revert: > previous revert unneeded (I think) > > Original issue's description: > > Revert of SkOncePtr -> SkOnce (patchset #4 id:60001 of https://codereview.chromium.org/1953533002/ ) > > > > Reason for revert: > > broken the Mac and Linux builders, e.g.: > > > > https://build.chromium.org/p/chromium/builders/Mac/builds/15151 > > https://build.chromium.org/p/chromium/builders/Linux%20x64/builds/19052 > > > > Original issue's description: > > > SkOncePtr -> SkOnce > > > > > > It's always nice to kill off a synchronization primitive. > > > And while less terse, I think this new code reads more clearly. > > > > > > ... and, SkOncePtr's tests were the only thing now using sk_num_cores() > > > outside of SkTaskGroup, so I've hidden it as static inside SkTaskGroup.cpp. > > > > > > BUG=skia: > > > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1953533002 > > > CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot > > > > > > Committed: https://skia.googlesource.com/skia/+/9bd3fc7fa9bb7cad050bd619aa93d4c48ebb5c02 > > > > TBR=herb@google.com,mtklein@chromium.org > > # Skipping CQ checks because original CL landed less than 1 days ago. > > NOPRESUBMIT=true > > NOTREECHECKS=true > > NOTRY=true > > BUG=skia: > > > > Committed: https://skia.googlesource.com/skia/+/7eb33da7eede34c050b865dbb1b60c3dcea7191b > > TBR=herb@google.com,mtklein@chromium.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/82da9a8aa0ce648f36882830765b42e0ada6c0fa TBR=herb@google.com,mtklein@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review-Url: https://codereview.chromium.org/1948313002
* Reland of SkOncePtr -> SkOnce (patchset #1 id:1 of ↵Gravatar reed2016-05-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1945293004/ ) Reason for revert: previous revert unneeded (I think) Original issue's description: > Revert of SkOncePtr -> SkOnce (patchset #4 id:60001 of https://codereview.chromium.org/1953533002/ ) > > Reason for revert: > broken the Mac and Linux builders, e.g.: > > https://build.chromium.org/p/chromium/builders/Mac/builds/15151 > https://build.chromium.org/p/chromium/builders/Linux%20x64/builds/19052 > > Original issue's description: > > SkOncePtr -> SkOnce > > > > It's always nice to kill off a synchronization primitive. > > And while less terse, I think this new code reads more clearly. > > > > ... and, SkOncePtr's tests were the only thing now using sk_num_cores() > > outside of SkTaskGroup, so I've hidden it as static inside SkTaskGroup.cpp. > > > > BUG=skia: > > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1953533002 > > CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot > > > > Committed: https://skia.googlesource.com/skia/+/9bd3fc7fa9bb7cad050bd619aa93d4c48ebb5c02 > > TBR=herb@google.com,mtklein@chromium.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/7eb33da7eede34c050b865dbb1b60c3dcea7191b TBR=herb@google.com,mtklein@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review-Url: https://codereview.chromium.org/1949313003
* Revert of SkOncePtr -> SkOnce (patchset #4 id:60001 of ↵Gravatar reed2016-05-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1953533002/ ) Reason for revert: broken the Mac and Linux builders, e.g.: https://build.chromium.org/p/chromium/builders/Mac/builds/15151 https://build.chromium.org/p/chromium/builders/Linux%20x64/builds/19052 Original issue's description: > SkOncePtr -> SkOnce > > It's always nice to kill off a synchronization primitive. > And while less terse, I think this new code reads more clearly. > > ... and, SkOncePtr's tests were the only thing now using sk_num_cores() > outside of SkTaskGroup, so I've hidden it as static inside SkTaskGroup.cpp. > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1953533002 > CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot > > Committed: https://skia.googlesource.com/skia/+/9bd3fc7fa9bb7cad050bd619aa93d4c48ebb5c02 TBR=herb@google.com,mtklein@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review-Url: https://codereview.chromium.org/1945293004
* SkOncePtr -> SkOnceGravatar mtklein2016-05-04
| | | | | | | | | | | | | | It's always nice to kill off a synchronization primitive. And while less terse, I think this new code reads more clearly. ... and, SkOncePtr's tests were the only thing now using sk_num_cores() outside of SkTaskGroup, so I've hidden it as static inside SkTaskGroup.cpp. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1953533002 CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Review-Url: https://codereview.chromium.org/1953533002
* Revert "Revert of Pass effects directly to fontcache (patchset #8 id:140001 ↵Gravatar reed2016-04-12
| | | | | | | | | | | | | | of https://codereview.chromium.org/1863013003/ )" add SK_SUPPORT_NEW_ONCREATESCALERCONTEXT for chrome this has now landed https://codereview.chromium.org/1878913002/ TBR= BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1880873002 Review URL: https://codereview.chromium.org/1880873002
* Revert of Pass effects directly to fontcache (patchset #8 id:140001 of ↵Gravatar borenet2016-04-11
| | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1863013003/ ) Reason for revert: Seems to have broken the DEPS roll. Original issue's description: > Pass effects directly to fontcache > > BUG=skia:5176 > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1863013003 > > Committed: https://skia.googlesource.com/skia/+/c79172857c3f69cc46837e1beeae0c1ead377bb2 TBR=djsollen@google.com,bungeman@google.com,mtklein@google.com,fmalita@chromium.org,msarett@google.com,reed@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:5176 Review URL: https://codereview.chromium.org/1872253004
* Pass effects directly to fontcacheGravatar reed2016-04-11
| | | | | | | BUG=skia:5176 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1863013003 Review URL: https://codereview.chromium.org/1863013003
* Style bikeshed - remove extraneous whitespaceGravatar halcanary2016-03-29
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1842753002 Review URL: https://codereview.chromium.org/1842753002
* add helper to create fancy underlinesGravatar caryclark2016-02-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a couple of utility functions to SkPaint that return the bounds of glyphs between a pair of lines. The common use case envisioned generates the edges of descenders between the top and bottom bounds of an underline to allow computing a stroke that skips those descenders. The implementation stores a linked list in each glyph containing the bounds of the lines parallel to the advance and the outermost intersections within those bounds. When the glyph cache is constructed, the glyph path is intersected with the bounds and the extreme min and max values within the bounds is added to an intercept. Share the text to path iter to construct the data. Make a half-hearted attempt to support vertical text; while the vertical implementation is complete; surrounding code (e.g. paint align) has short-comings with vertical. R=fmalita@chromium.org, reed@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1654883003 Review URL: https://codereview.chromium.org/1654883003
* Use SkAutoTExclusive in SkGlyphCache.Gravatar herb2015-10-23
| | | | | | This replaces the local AutoAcquire class. Review URL: https://codereview.chromium.org/1424563002
* [tracing] Remove counter logic and just use address on glyph cache dumpsGravatar ssid2015-10-23
| | | | | | | | | | This CL removes the logic of counting the index of glyphs and uses the address of the glyph object for dump name. This makes the dump names consistent across multiple dumps. BUG=543479 Review URL: https://codereview.chromium.org/1425443002
* Revert of Stop using SkScalerContext::getAdvance() in SkGlyphCache. ↵Gravatar mtklein2015-10-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (patchset #2 id:20001 of https://codereview.chromium.org/1321243004/ ) Reason for revert: Suspect this is the cause of regressions in crbug.com/527445. It's triggering on Windows and Linux, where getting advances does less than getting full metrics. It's not triggering on Mac, where this CL was a no-op. Original issue's description: > Stop using SkScalerContext::getAdvance() in SkGlyphCache. > > We think it'll simplify things to just always get the full metrics. > On most platforms, it's no different, and we think the platforms that > do differ (FreeType) will be nearly just as cheap. > > Removing this distinction helps us make SkGlyphCaches concurrent by > removing a state (we-have-only-advances) from its logical state machine. > > We see no significant changes running SKPs before and after this CL. > That makes sense, of course, because the SKPs bake some of this into drawPosText. > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/518a2923f11b819fa44ed5cff54155326959540f TBR=reed@google.com,bungeman@google.com,herb@google.com,mtklein@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1383403003
* Strip font name of special characters before dumpingGravatar ssid2015-10-01
| | | | | | | | | | | | | The font name can contain special characters in some OS that is considered as delimiters ('/') by the traces. This causes error in the dump name. This CL strips the fone name obtained before adding it to traces. This also adds discardable memory size for resources in cache. BUG=532838 Review URL: https://codereview.chromium.org/1346993006
* Add support for light dumps in SkTraceMemoryDump interface.Gravatar ssid2015-09-30
| | | | | | | | | | | SkGlyphCache dumps too many glyphs, and to reduce the trace size, RequestDetails enum is added to SkTraceMemoryDump interface. This would tell caches to dump only requested details or not a detailed dump. BUG=499731 Review URL: https://codereview.chromium.org/1310123007
* Revert of Parallel cache - preliminary (patchset #24 id:460001 of ↵Gravatar herb2015-09-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1264103003/ ) Reason for revert: Breaks DrMemory in the chrome roll. Original issue's description: > Parallel cache. > > TBR=reed@google.com > > BUG=skia:1330,528560 > > Committed: https://skia.googlesource.com/skia/+/6f2a486040cb25465990196c229feb47e668e87f > > Committed: https://skia.googlesource.com/skia/+/bf2988833e5a36c6b430da6fdd2cfebd0015adec > > Committed: https://skia.googlesource.com/skia/+/014ffdb01ea5317614a1569efc30c50f06434222 TBR=reed@google.com,mtklein@google.com,mtklein@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:1330,528560 Review URL: https://codereview.chromium.org/1345903002
* Parallel cache.Gravatar herb2015-09-15
| | | | | | | | | | | | TBR=reed@google.com BUG=skia:1330,528560 Committed: https://skia.googlesource.com/skia/+/6f2a486040cb25465990196c229feb47e668e87f Committed: https://skia.googlesource.com/skia/+/bf2988833e5a36c6b430da6fdd2cfebd0015adec Review URL: https://codereview.chromium.org/1264103003