aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkGlyph.h
Commit message (Collapse)AuthorAge
* Revert "Revert "SkTypes: extract SkTo""Gravatar Hal Canary2018-06-14
| | | | | | | | | | | | | | | | This reverts commit fdcfb8b7c23fbf18f872d2c31d27978235033876. > Original change's description: > > SkTypes: extract SkTo > > > > Change-Id: I8de790d5013db2105ad885fa2683303d7c250b09 > > Reviewed-on: https://skia-review.googlesource.com/133620 > > Reviewed-by: Mike Klein <mtklein@google.com> Change-Id: Ida74fbc5c21248a724a5edbf9fae18a33bcb23aa Reviewed-on: https://skia-review.googlesource.com/134506 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* fonts: Ignore re-initialization of fallback glyphs from the server.Gravatar Khushal2018-06-13
| | | | | | | | | | | | | | If the client finds that the server re-initializes a cached path/image, we consider this an error and invalid data. But since we might initialize a glyph using a fallback on the client, and receive the correct version from the server later, this is not longer true. Bug: 829622 Change-Id: I34ab17b54139d89a15179265d4aed4a1fe36fd47 Reviewed-on: https://skia-review.googlesource.com/133566 Commit-Queue: Khusal Sagar <khushalsagar@chromium.org> Commit-Queue: Mike Klein <mtklein@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
* Revert "SkTypes: extract SkTo"Gravatar Hal Canary2018-06-13
| | | | | | | | | | | | | | | | | | | | | | | This reverts commit 2a2f67592602b18527bc3fd449132d420cd5b62e. Reason for revert: this appears to be what is holding up the Chrome roll. Original change's description: > SkTypes: extract SkTo > > Change-Id: I8de790d5013db2105ad885fa2683303d7c250b09 > Reviewed-on: https://skia-review.googlesource.com/133620 > Reviewed-by: Mike Klein <mtklein@google.com> TBR=mtklein@google.com,halcanary@google.com No-Presubmit: true No-Tree-Checks: true No-Try: true Change-Id: Iafd738aedfb679a23c061a51afe4b98a8d4cdfae Reviewed-on: https://skia-review.googlesource.com/134504 Reviewed-by: Hal Canary <halcanary@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* fonts: Fix memory allocation for fallback glyphs.Gravatar Khushal2018-06-12
| | | | | | | | | | | | | | | | When allocating the mask for a fallback glyph, we allocate it on the arena on the SkScalerContext while the image belongs to a glyph on a different cache. This can lead to use-after-free bugs if accessing the image after the context owning that memory is destroyed. Fix this by allocating on the arena from the owning cache. R=herb@google.com, mtklein@google.com Bug: 829622 Change-Id: Ife53e24f5bc868f36c43f2adcd7a2629ab5577fe Reviewed-on: https://skia-review.googlesource.com/134182 Commit-Queue: Mike Klein <mtklein@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
* SkTypes: extract SkToGravatar Hal Canary2018-06-12
| | | | | | Change-Id: I8de790d5013db2105ad885fa2683303d7c250b09 Reviewed-on: https://skia-review.googlesource.com/133620 Reviewed-by: Mike Klein <mtklein@google.com>
* Glyph search of desperationGravatar Herb Derby2018-06-08
| | | | | | | Change-Id: I0ae768c5517c3ee3f6822fea0926b3f27214a0e4 Reviewed-on: https://skia-review.googlesource.com/132260 Commit-Queue: Herb Derby <herb@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
* 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>
* Remove android specific code - v2Gravatar Herb Derby2018-05-07
| | | | | | | Change-Id: I2010b168f1a1f3bc48b86a075b0398eaf46ea328 Reviewed-on: https://skia-review.googlesource.com/126480 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Revert "Remove android specific code"Gravatar Greg Daniel2018-05-07
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 5570ea0c2549722f4069add1875743e6c44fc50b. Reason for revert: Possibly breaking chrome Original change's description: > Remove android specific code > > Change-Id: Ib9b1f936d1aee920ba7064a9eccffaca6696812f > Reviewed-on: https://skia-review.googlesource.com/125341 > Commit-Queue: Mike Reed <reed@google.com> > Reviewed-by: Mike Reed <reed@google.com> > Auto-Submit: Herb Derby <herb@google.com> TBR=herb@google.com,reed@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Change-Id: I95578d720fc4d5924296245522f880dc15624be9 Reviewed-on: https://skia-review.googlesource.com/126360 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
* Remove android specific codeGravatar Herb Derby2018-05-04
| | | | | | | | Change-Id: Ib9b1f936d1aee920ba7064a9eccffaca6696812f Reviewed-on: https://skia-review.googlesource.com/125341 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Mike Reed <reed@google.com> Auto-Submit: Herb Derby <herb@google.com>
* Reland "Remove devKerning"Gravatar Herb Derby2018-05-02
| | | | | | | | | | | | | | | | | | | | | | This is a reland of c86c5c0144b85d0bc8ec791f9609ee2d4e7d835a Original change's description: > Remove devKerning > > Dev kerning is not supported by any scalers. This is > mostly removed. The remaining fields fRsbDelta and > fLsbDelta are kept to keep Android compiling. > > Change-Id: If1a9ee9bb599d4e1bdf4b3751ac0c65246350809 > Reviewed-on: https://skia-review.googlesource.com/124921 > Reviewed-by: Ben Wagner <bungeman@google.com> > Commit-Queue: Herb Derby <herb@google.com> Change-Id: Ibf5fac5f1442c7e62392d5146ad460da27b10d5c Reviewed-on: https://skia-review.googlesource.com/125300 Reviewed-by: Herb Derby <herb@google.com> Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Revert "Remove devKerning"Gravatar Mike Klein2018-05-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit c86c5c0144b85d0bc8ec791f9609ee2d4e7d835a. Reason for revert: 4 of 5 Original change's description: > Remove devKerning > > Dev kerning is not supported by any scalers. This is > mostly removed. The remaining fields fRsbDelta and > fLsbDelta are kept to keep Android compiling. > > Change-Id: If1a9ee9bb599d4e1bdf4b3751ac0c65246350809 > Reviewed-on: https://skia-review.googlesource.com/124921 > Reviewed-by: Ben Wagner <bungeman@google.com> > Commit-Queue: Herb Derby <herb@google.com> TBR=bungeman@google.com,herb@google.com,reed@google.com Change-Id: If865f702868192a1b72cd811baa996dd1282bbce No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/125263 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
* Revert "Add padding back to make msan happy"Gravatar Mike Klein2018-05-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 2050565fe116008ad6df7533900f5f76dd5b9730. Reason for revert: 1 of 5 Original change's description: > Add padding back to make msan happy > > SkGlyph are stored directly in the hash table with uninitialized > pad bytes. When the hash table is resized, the uninitialized pad > bytes are moved causing msan to complain. > > Change-Id: I559ff1bd369d12be061cce7d3c826c2afdd3a03c > Reviewed-on: https://skia-review.googlesource.com/125240 > Commit-Queue: Herb Derby <herb@google.com> > Commit-Queue: Mike Klein <mtklein@google.com> > Auto-Submit: Herb Derby <herb@google.com> > Reviewed-by: Mike Klein <mtklein@google.com> TBR=mtklein@google.com,herb@google.com Change-Id: Iaa61ad17c837544bd7394ddc6fc52c14d8389d7e No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/125260 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
* Add padding back to make msan happyGravatar Herbert Derby2018-05-02
| | | | | | | | | | | | | SkGlyph are stored directly in the hash table with uninitialized pad bytes. When the hash table is resized, the uninitialized pad bytes are moved causing msan to complain. Change-Id: I559ff1bd369d12be061cce7d3c826c2afdd3a03c Reviewed-on: https://skia-review.googlesource.com/125240 Commit-Queue: Herb Derby <herb@google.com> Commit-Queue: Mike Klein <mtklein@google.com> Auto-Submit: Herb Derby <herb@google.com> Reviewed-by: Mike Klein <mtklein@google.com>
* Remove devKerningGravatar Herb Derby2018-05-01
| | | | | | | | | | | Dev kerning is not supported by any scalers. This is mostly removed. The remaining fields fRsbDelta and fLsbDelta are kept to keep Android compiling. Change-Id: If1a9ee9bb599d4e1bdf4b3751ac0c65246350809 Reviewed-on: https://skia-review.googlesource.com/124921 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Add accessor and less for raw glyph ID and WSGravatar Herb Derby2018-03-14
| | | | | | | | | | Accessor is for debugging and Android. Less is for ordered containers. Change-Id: Ic4b7e0e9e32506f8594db961c274f93c5b5d1cee Reviewed-on: https://skia-review.googlesource.com/114369 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Cleanup size calculations in SkGlyphGravatar Herb Derby2018-03-14
| | | | | | | | | BUG=skia:7515 Change-Id: Ie9d255a93ecff86ce018f8510332bdb280ec575e Reviewed-on: https://skia-review.googlesource.com/113863 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Herb Derby <herb@google.com>
* Alloc glyph image correctly for SkMask::k3D_Format.Gravatar Ben Wagner2017-11-14
| | | | | | | | | | | | | | | | | | | | | | Re-enable the code to test the emboss mask filter, updating it to use the new emboss mask filter factory. Add a test to ensure that embossed text is drawn correctly, as before glyphs did not allocate the proper amount of memory for the k3D_Format which the emboss mask filter produces. Fixes SkEmbossMask::Emboss to write the whole of the mul and add planes to avoid pixel differences and MemorySanitizer errors. Update the GPU to understand the k3D_Format and use just the alpha plane, ignoring the mul and add plane which it currently cannot support. Change-Id: I90edf34a918c06b0c6b24bfc43ce7031419eca41 Reviewed-on: https://skia-review.googlesource.com/70260 Reviewed-on: https://skia-review.googlesource.com/70962 Reviewed-on: https://skia-review.googlesource.com/71282 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Revert "Alloc glyph image correctly for SkMask::k3D_Format."Gravatar Brian Osman2017-11-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 1662257bdaaaf26b016bf2a3e329c34f7f5ed581. Reason for revert: Android still using this API Original change's description: > Alloc glyph image correctly for SkMask::k3D_Format. > > Remove the no longer used outside Skia SK_SUPPORT_LEGACY_EMBOSSMASKFILTER > define, and either delete the code it guards or update it to use the new > emboss mask filter factory. > > Re-enable the code to test the emboss mask filter. > > Add a test to ensure that embossed text is drawn correctly, as before > glyphs did not allocate the proper amount of memory for the k3D_Format > which the emboss mask filter produces. > > Fixes SkEmbossMask::Emboss to write the whole of the mul and add planes > to avoid pixel differences and MemorySanitizer errors. > > Update the GPU to understand the k3D_Format and use just the alpha > plane, ignoring the mul and add plane which it currently cannot support. > > Change-Id: Icac1a3f37d6e8c6be3151df570f5e14111e18585 > Reviewed-on: https://skia-review.googlesource.com/70260 > Reviewed-by: Herb Derby <herb@google.com> > Reviewed-on: https://skia-review.googlesource.com/70962 > Commit-Queue: Ben Wagner <bungeman@google.com> TBR=djsollen@google.com,bungeman@google.com,herb@google.com Change-Id: Id6625bae8d3bd70ce7aa3045348c04fdd146c637 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/71183 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Alloc glyph image correctly for SkMask::k3D_Format.Gravatar Ben Wagner2017-11-14
| | | | | | | | | | | | | | | | | | | | | | | | Remove the no longer used outside Skia SK_SUPPORT_LEGACY_EMBOSSMASKFILTER define, and either delete the code it guards or update it to use the new emboss mask filter factory. Re-enable the code to test the emboss mask filter. Add a test to ensure that embossed text is drawn correctly, as before glyphs did not allocate the proper amount of memory for the k3D_Format which the emboss mask filter produces. Fixes SkEmbossMask::Emboss to write the whole of the mul and add planes to avoid pixel differences and MemorySanitizer errors. Update the GPU to understand the k3D_Format and use just the alpha plane, ignoring the mul and add plane which it currently cannot support. Change-Id: Icac1a3f37d6e8c6be3151df570f5e14111e18585 Reviewed-on: https://skia-review.googlesource.com/70260 Reviewed-by: Herb Derby <herb@google.com> Reviewed-on: https://skia-review.googlesource.com/70962 Commit-Queue: Ben Wagner <bungeman@google.com>
* Revert "Alloc glyph image correctly for SkMask::k3D_Format."Gravatar Ben Wagner2017-11-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 6b26deb8d6067589ce9b7853ab8e8d39de1a45de. Reason for revert: GPU bots failing Original change's description: > Alloc glyph image correctly for SkMask::k3D_Format. > > This removes the no longer used outside Skia > SK_SUPPORT_LEGACY_EMBOSSMASKFILTER define, and either deletes the code > it guards or updates it to use the new emboss mask filter factory. This > re-enables the code to test the emboss mask filter. Also added is a test > to ensure that embossed text is drawn correctly, as before this glyphs > did not allocate the proper amount of memory for the k3D_Format which > this mask filter produces. This also fixes SkEmbossMask::Emboss to write > the whole of the mul and add planes to avoid pixel differences and > MemorySanitizer errors. > > Change-Id: Ib492c72a19d6a27d140e3cd48179a3ca9ce313f5 > Reviewed-on: https://skia-review.googlesource.com/70260 > Commit-Queue: Ben Wagner <bungeman@google.com> > Reviewed-by: Herb Derby <herb@google.com> TBR=djsollen@google.com,bungeman@google.com,herb@google.com,reed@google.com Change-Id: I8a9db6c00e0cb84bdd4833474a9ffffa6ecc606c No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/70920 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Alloc glyph image correctly for SkMask::k3D_Format.Gravatar Ben Wagner2017-11-13
| | | | | | | | | | | | | | | | | This removes the no longer used outside Skia SK_SUPPORT_LEGACY_EMBOSSMASKFILTER define, and either deletes the code it guards or updates it to use the new emboss mask filter factory. This re-enables the code to test the emboss mask filter. Also added is a test to ensure that embossed text is drawn correctly, as before this glyphs did not allocate the proper amount of memory for the k3D_Format which this mask filter produces. This also fixes SkEmbossMask::Emboss to write the whole of the mul and add planes to avoid pixel differences and MemorySanitizer errors. Change-Id: Ib492c72a19d6a27d140e3cd48179a3ca9ce313f5 Reviewed-on: https://skia-review.googlesource.com/70260 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Herb Derby <herb@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>
* Remove advance[XY]Fixed getters.Gravatar benjaminwagner2016-03-28
| | | | | | | | | Reverts https://codereview.chromium.org/1772863002 after updating Android. BUG=skia:4632 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1842453002 Review URL: https://codereview.chromium.org/1842453002
* Change type of SkGlyph::fAdvance[XY] to float.Gravatar benjaminwagner2016-03-24
| | | | | | | BUG=skia:4632 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1737693006 Review URL: https://codereview.chromium.org/1737693006
* Un-deprecate new methods to fix Android.Gravatar benjaminwagner2016-03-16
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1808663004 Review URL: https://codereview.chromium.org/1808663004
* Hide new methods from non-Android.Gravatar benjaminwagner2016-03-07
| | | | Review URL: https://codereview.chromium.org/1769933004
* Add advance[XY]Fixed getters for Android.Gravatar benjaminwagner2016-03-07
| | | | | | | | This prepares for changing the type of these fields to float. BUG=skia:4632 Review URL: https://codereview.chromium.org/1772863002
* 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
* Add SK_BEGIN_REQUIRE_DENSE / SK_END_REQUIRE_DENSE.Gravatar mtklein2015-11-24
| | | | | | | | Use in on a few examples of things we hash. BUG=skia: Review URL: https://codereview.chromium.org/1468483002
* 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
* Revert of Parallel cache - preliminary (patchset #23 id:440001 of ↵Gravatar jyasskin2015-09-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1264103003/ ) Also reverts https://codereview.chromium.org/1333003002/ which was layered on top. Reason for revert: Appears to leak GDI handles: http://build.chromium.org/p/chromium.memory.fyi/builders/Windows%20Unit%20%28DrMemory%20full%29%20%282%29/builds/8247 ~~Dr.M~~ Error #1: HANDLE LEAK: GDI handle 0x03050a84 and 3 similar handle(s) were opened but not closed: ~~Dr.M~~ # 0 system call NtGdiCreateDIBSection ~~Dr.M~~ # 1 GDI32.dll!CreateDIBSection +0xdc (0x768ead23 <GDI32.dll+0x1ad23>) ~~Dr.M~~ # 2 skia.dll!HDCOffscreen::draw [third_party\skia\src\ports\skfonthost_win.cpp:499] ~~Dr.M~~ # 3 skia.dll!SkScalerContext_GDI::generateImage [third_party\skia\src\ports\skfonthost_win.cpp:1233] ~~Dr.M~~ # 4 skia.dll!SkScalerContext::getImage [third_party\skia\src\core\skscalercontext.cpp:530] ~~Dr.M~~ # 5 skia.dll!SkGlyphCache::OnceFillInImage [third_party\skia\src\core\skglyphcache.cpp:252] ~~Dr.M~~ # 6 skia.dll!sk_once_slow<> [third_party\skia\include\core\skonce.h:76] ~~Dr.M~~ # 7 skia.dll!SkGlyphCache::findImage [third_party\skia\src\core\skglyphcache.cpp:260] ~~Dr.M~~ # 8 skia.dll!D1G_RectClip [third_party\skia\src\core\skdraw.cpp:1479] ~~Dr.M~~ # 9 skia.dll!SkDraw::drawPosText [third_party\skia\src\core\skdraw.cpp:1838] ~~Dr.M~~ #10 skia.dll!SkBitmapDevice::drawPosText [third_party\skia\src\core\skbitmapdevice.cpp:348] ~~Dr.M~~ #11 skia.dll!SkCanvas::onDrawPosText [third_party\skia\src\core\skcanvas.cpp:2433] ~~Dr.M~~ #12 skia.dll!SkCanvas::drawPosText [third_party\skia\src\core\skcanvas.cpp:2507] ~~Dr.M~~ #13 skia.dll!SkRecords::Draw::draw<> [third_party\skia\src\core\skrecorddraw.cpp:109] ~~Dr.M~~ #14 skia.dll!SkRecord::Record::visit<> [third_party\skia\src\core\skrecord.h:170] ~~Dr.M~~ #15 skia.dll!SkRecordDraw [third_party\skia\src\core\skrecorddraw.cpp:55] ~~Dr.M~~ #16 skia.dll!SkBigPicture::playback [third_party\skia\src\core\skbigpicture.cpp:43] ~~Dr.M~~ #17 skia.dll!SkCanvas::onDrawPicture [third_party\skia\src\core\skcanvas.cpp:2800] ~~Dr.M~~ #18 skia.dll!SkCanvas::drawPicture [third_party\skia\src\core\skcanvas.cpp:2770] ~~Dr.M~~ #19 cc.dll!cc::DrawingDisplayItem::Raster [cc\playback\drawing_display_item.cc:51] ~~Dr.M~~ #20 cc.dll!cc::DisplayItemList::Raster [cc\playback\display_item_list.cc:107] ~~Dr.M~~ #21 cc.dll!cc::DisplayListRasterSource::RasterCommon [cc\playback\display_list_raster_source.cc:122] ~~Dr.M~~ #22 cc.dll!cc::DisplayListRasterSource::PlaybackToCanvas [cc\playback\display_list_raster_source.cc:100] ~~Dr.M~~ #23 cc.dll!cc::TileTaskWorkerPool::PlaybackToMemory [cc\raster\tile_task_worker_pool.cc:208] ~~Dr.M~~ #24 cc.dll!cc::OneCopyTileTaskWorkerPool::PlaybackAndCopyOnWorkerThread [cc\raster\one_copy_tile_task_worker_pool.cc:413] ~~Dr.M~~ #25 cc.dll!cc::`anonymous namespace'::RasterBufferImpl::Playback [cc\raster\one_copy_tile_task_worker_pool.cc:53] ~~Dr.M~~ #26 cc.dll!cc::`anonymous namespace'::RasterTaskImpl::Raster [cc\tiles\tile_manager.cc:131] ~~Dr.M~~ #27 cc.dll!cc::`anonymous namespace'::RasterTaskImpl::RunOnWorkerThread [cc\tiles\tile_manager.cc:90] ~~Dr.M~~ #28 cc.dll!cc::TaskGraphRunner::RunTaskWithLockAcquired [cc\raster\task_graph_runner.cc:418] ~~Dr.M~~ #29 cc.dll!cc::TaskGraphRunner::Run [cc\raster\task_graph_runner.cc:361] ~~Dr.M~~ #30 base.dll!base::SimpleThread::ThreadMain [base\threading\simple_thread.cc:66] ~~Dr.M~~ #31 base.dll!base::`anonymous namespace'::ThreadFunc [base\threading\platform_thread_win.cc:82] ~~Dr.M~~ #32 KERNEL32.dll!BaseThreadInitThunk +0x11 (0x7570337a <KERNEL32.dll+0x1337a>) ~~Dr.M~~ Note: @0:15:51.087 in thread 196 ~~Dr.M~~ Note: handles created with the same callstack are closed here: ~~Dr.M~~ Note: # 0 system call NtGdiDeleteObjectApp ~~Dr.M~~ Note: # 1 GDI32.dll!DeleteObject +0x149 (0x768e57d3 <GDI32.dll+0x157d3>) ~~Dr.M~~ Note: # 2 skia.dll!HDCOffscreen::draw [third_party\skia\src\ports\skfonthost_win.cpp:471] ~~Dr.M~~ Note: # 3 skia.dll!SkScalerContext_GDI::generateImage [third_party\skia\src\ports\skfonthost_win.cpp:1233] ~~Dr.M~~ Note: # 4 skia.dll!SkScalerContext::getImage [third_party\skia\src\core\skscalercontext.cpp:530] ~~Dr.M~~ Note: # 5 skia.dll!SkGlyphCache::OnceFillInImage [third_party\skia\src\core\skglyphcache.cpp:252] ~~Dr.M~~ Note: # 6 skia.dll!sk_once_slow<> [third_party\skia\include\core\skonce.h:76] ~~Dr.M~~ Note: # 7 skia.dll!SkGlyphCache::findImage [third_party\skia\src\core\skglyphcache.cpp:260] ~~Dr.M~~ Note: # 8 skia.dll!D1G_RectClip [third_party\skia\src\core\skdraw.cpp:1479] ~~Dr.M~~ Note: # 9 skia.dll!SkDraw::drawPosText [third_party\skia\src\core\skdraw.cpp:1838] ~~Dr.M~~ Note: #10 skia.dll!SkBitmapDevice::drawPosText [third_party\skia\src\core\skbitmapdevice.cpp:348] ~~Dr.M~~ Note: #11 skia.dll!SkCanvas::onDrawPosText [third_party\skia\src\core\skcanvas.cpp:2433] ~~Dr.M~~ Note: #12 skia.dll!SkCanvas::drawPosText [third_party\skia\src\core\skcanvas.cpp:2507] ~~Dr.M~~ Note: #13 skia.dll!SkRecords::Draw::draw<> [third_party\skia\src\core\skrecorddraw.cpp:109] ~~Dr.M~~ Note: #14 skia.dll!SkRecord::Record::visit<> [third_party\skia\src\core\skrecord.h:170] ~~Dr.M~~ Note: #15 skia.dll!SkRecordDraw [third_party\skia\src\core\skrecorddraw.cpp:55] ~~Dr.M~~ Note: #16 skia.dll!SkBigPicture::playback [third_party\skia\src\core\skbigpicture.cpp:43] ~~Dr.M~~ Note: #17 skia.dll!SkCanvas::onDrawPicture [third_party\skia\src\core\skcanvas.cpp:2800] ~~Dr.M~~ Note: #18 skia.dll!SkCanvas::drawPicture [third_party\skia\src\core\skcanvas.cpp:2770] ~~Dr.M~~ Note: #19 cc.dll!cc::DrawingDisplayItem::Raster [cc\playback\drawing_display_item.cc:51] ~~Dr.M~~ Note: #20 cc.dll!cc::DisplayItemList::Raster [cc\playback\display_item_list.cc:107] ~~Dr.M~~ Note: #21 cc.dll!cc::DisplayListRasterSource::RasterCommon [cc\playback\display_list_raster_source.cc:122] ~~Dr.M~~ Note: #22 cc.dll!cc::DisplayListRasterSource::PlaybackToCanvas [cc\playback\display_list_raster_source.cc:100] ~~Dr.M~~ Note: #23 cc.dll!cc::TileTaskWorkerPool::PlaybackToMemory [cc\raster\tile_task_worker_pool.cc:208] ~~Dr.M~~ Note: #24 cc.dll!cc::OneCopyTileTaskWorkerPool::PlaybackAndCopyOnWorkerThread [cc\raster\one_copy_tile_task_worker_pool.cc:413] ~~Dr.M~~ Note: #25 cc.dll!cc::`anonymous namespace'::RasterBufferImpl::Playback [cc\raster\one_copy_tile_task_worker_pool.cc:53] ~~Dr.M~~ Note: #26 cc.dll!cc::`anonymous namespace'::RasterTaskImpl::Raster [cc\tiles\tile_manager.cc:131] ~~Dr.M~~ Note: #27 cc.dll!cc::`anonymous namespace'::RasterTaskImpl::RunOnWorkerThread [cc\tiles\tile_manager.cc:90] ~~Dr.M~~ Note: #28 cc.dll!cc::TaskGraphRunner::RunTaskWithLockAcquired [cc\raster\task_graph_runner.cc:418] ~~Dr.M~~ Note: #29 cc.dll!cc::TaskGraphRunner::Run [cc\raster\task_graph_runner.cc:361] ~~Dr.M~~ Note: #30 base.dll!base::SimpleThread::ThreadMain [base\threading\simple_thread.cc:66] ~~Dr.M~~ Note: #31 base.dll!base::`anonymous namespace'::ThreadFunc [base\threading\platform_thread_win.cc:82] ~~Dr.M~~ Note: #32 KERNEL32.dll!BaseThreadInitThunk +0x11 (0x7570337a <KERNEL32.dll+0x1337a>) Original issue's description: > Parallel cache. > > TBR=reed@google.com > > BUG=skia:1330 > > Committed: https://skia.googlesource.com/skia/+/6f2a486040cb25465990196c229feb47e668e87f > > Committed: https://skia.googlesource.com/skia/+/bf2988833e5a36c6b430da6fdd2cfebd0015adec TBR=reed@google.com,mtklein@google.com,mtklein@chromium.org,herb@google.com BUG=skia:1330 [mtklein mucking around] NOTREECHECKS=true Review URL: https://codereview.chromium.org/1339493002
* Parallel cache.Gravatar herb2015-09-09
| | | | | | | | | | TBR=reed@google.com BUG=skia:1330 Committed: https://skia.googlesource.com/skia/+/6f2a486040cb25465990196c229feb47e668e87f Review URL: https://codereview.chromium.org/1264103003
* Revert of Parallel cache - preliminary (patchset #22 id:420001 of ↵Gravatar herb2015-09-04
| | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1264103003/ ) Reason for revert: Seems to freeze android devices. Original issue's description: > Parallel cache. > > TBR=reed@google.com > > BUG=skia:1330 > > Committed: https://skia.googlesource.com/skia/+/6f2a486040cb25465990196c229feb47e668e87f TBR=reed@google.com,mtklein@google.com,mtklein@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:1330 Review URL: https://codereview.chromium.org/1327703003
* Parallel cache.Gravatar herb2015-09-04
| | | | | | | | TBR=reed@google.com BUG=skia:1330 Review URL: https://codereview.chromium.org/1264103003
* Style Change: NULL->nullptrGravatar halcanary2015-08-27
| | | | | | DOCS_PREVIEW= https://skia.org/?cl=1316233002 Review URL: https://codereview.chromium.org/1316233002
* Change the GlyphCache to use a hash table instead of doing its own ad-hocGravatar herb2015-07-21
| | | | | | | hashing. This change appears to be performance neutral. BUG=skia: Review URL: https://codereview.chromium.org/1216983003
* Fix uninitialized memory bug in the SkGlyphCache.Gravatar herb2015-03-05
| | | | | | | | | | | | | | | | | | | The core of the problem is that the system is asked to lookup the metrics for a character with id == 0. This causes a hit in the fCharToGlyphHash matching the sentinel glyph. This happens because fCharToGlpyhHash is initialized with all zeros, therefore, the fID is zero matching the char with id == 0. The fAdvanceX field of the sentinel glyph is in fact not initialized. The bigger question is now did a zero character get passed to getUnicharMetrics? The breaking code is basically as follows: wchar_t glyph = L'S'; paint.measureText(&glyph, 2); This get mischaracterized as a utf8 string instead of a utf16(?) string. Because of the little endian ordering, this is the character string 'L' '\0'. Since the size of the original string is two bytes (but a single character) the '\0' is treated as its own character and past to getUnicharMetrics. TEST: On windows failed using DrMemory. With this change does not fail. BUG=463204 Review URL: https://codereview.chromium.org/977063002
* Make the glyph array entries inline.Gravatar herb2015-02-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Perf Reports bin/c --match nytimes --config 8888 desk_nytimes.skp_1_mpd 1.41ms -> 1.38ms 0.98x desk_nytimes.skp_1 1.94ms -> 1.87ms 0.97x bin/c --match nytimes --config gpu desk_nytimes.skp_1_mpd 1.63ms -> 1.59ms 0.97x desk_nytimes.skp_1 1.56ms -> 1.5ms 0.97x Here are results from mac instruments: --match nytimes --config gpu --samples 10000 --skps /Users/herb/src/skia/skps Inline: Total Samples Running Time Self Symbol Name 94335 94335.0ms 98.3% 0.0 start 2365 2365.0ms 2.4% 2365.0 SkGlyphCache::getGlyphIDMetrics(unsigned short, int, int) 975 975.0ms 1.0% 975.0 SkGlyphCache::lookupMetrics(unsigned int, SkGlyphCache::MetricsType) Clean: Total Samples Running Time Self Symbol Name 96833 96833.0ms 97.3% 0.0 start 3418 3418.0ms 3.4% 3418.0 SkGlyphCache::getGlyphIDMetrics(unsigned short, int, int) 1961 1961.0ms 1.9% 1961.0 SkGlyphCache::lookupMetrics(unsigned int, SkGlyphCache::MetricsType) BUG=skia: Committed: https://skia.googlesource.com/skia/+/4c08f16b252a55e438a61f26e5581394ed177da1 Committed: https://skia.googlesource.com/skia/+/b4c29ac173e6f8844327338687248b98bc94132d Review URL: https://codereview.chromium.org/885903002
* BUG=skia:Gravatar herb2015-02-25
| | | | | | | | | | (mtklein from here on) No public API changes. TBR=reed@google.com Committed: https://skia.googlesource.com/skia/+/f8d24e2c0c7b44b7ccf20e40890514db4cde7b15 Review URL: https://codereview.chromium.org/939123002
* Revert of Make fID and MixedID calculations private (patchset #5 id:80001 of ↵Gravatar scroggo2015-02-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/939123002/) Reason for revert: This actually *does* change the public API - fID is now private, and it was being used on Android. See https://android-build.storage.googleapis.com/builds/git_master-skia-linux-volantis-userdebug/1751533/5242b865d3e9bebc650c9b326dfa9d68c8bd1f59562bf32b85301fb984dc8b26/logs/build.log?Signature=Q0el9M4kTu1KQ8u02KX9TH1Pa22y9BkDK1IW%2B9OeJJNfrDEVzLXAz0XQ%2BHHQM8xVjft06jZJva1V8InZmgjcOk6PdZQbQW6XwwsHLKsbpbAE48iTWH3AlJAAoTtj9cifzgeHW8g80IcVxwHXmINRER%2BLPz3eHGisgfTTFUoWYCc%3D&GoogleAccessId=701025073339-mqn0q2nvir9iurm6q5d00tdv7blbgvjr%40developer.gserviceaccount.com&Expires=1424786471 : In file included from frameworks/base/libs/hwui/tests/../font/Font.cpp:26:0: external/skia/src/core/SkGlyph.h: In member function 'android::uirenderer::CachedGlyphInfo* android::uirenderer::Font::cacheGlyph(const SkPaint*, glyph_t, bool)': external/skia/src/core/SkGlyph.h:157:17: error: 'uint32_t SkGlyph::fID' is private uint32_t fID; ^ frameworks/base/libs/hwui/tests/../font/Font.cpp:482:39: error: within this context newGlyph->mGlyphIndex = skiaGlyph.fID; We need to update Android in order to hide fID. Original issue's description: > BUG=skia: > > (mtklein from here on) > No public API changes. > TBR=reed@google.com > > Committed: https://skia.googlesource.com/skia/+/f8d24e2c0c7b44b7ccf20e40890514db4cde7b15 TBR=mtklein@google.com,herb@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/951353002
* BUG=skia:Gravatar herb2015-02-24
| | | | | | | | (mtklein from here on) No public API changes. TBR=reed@google.com Review URL: https://codereview.chromium.org/939123002
* Revert of Make the glyph array entries inline. (patchset #11 id:190001 of ↵Gravatar mtklein2015-02-09
| | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/885903002/) Reason for revert: Still broken. Original issue's description: > Make the glyph array entries inline. > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/4c08f16b252a55e438a61f26e5581394ed177da1 > > Committed: https://skia.googlesource.com/skia/+/b4c29ac173e6f8844327338687248b98bc94132d TBR=reed@google.com,herb@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/911513003
* Make the glyph array entries inline.Gravatar herb2015-02-09
| | | | | | | | BUG=skia: Committed: https://skia.googlesource.com/skia/+/4c08f16b252a55e438a61f26e5581394ed177da1 Review URL: https://codereview.chromium.org/885903002
* Revert of Make the glyph array entries inline. (patchset #10 id:170001 of ↵Gravatar bsalomon2015-02-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/885903002/) Reason for revert: I suspect this is causing the off-by-one character issues that show up in gold.skia.org as of now. All the errors I've seen are on a Win7 bot. Example: good: https://gold.skia.org/img/images/35396bb0d299b81c0031dc0632a019d4.png bad: https://gold.skia.org/img/images/484e511f9e696d95031cd25aeae59da0.png Original issue's description: > Make the glyph array entries inline. > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/4c08f16b252a55e438a61f26e5581394ed177da1 TBR=mtklein@google.com,reed@google.com,herb@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/897463004
* Make the glyph array entries inline.Gravatar herb2015-02-02
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/885903002
* Remove distance field generation and storage from SkGlyphCache.Gravatar jvanverth2015-01-07
| | | | | | BUG=skia:3103 Review URL: https://codereview.chromium.org/834103004
* remove unused kLCD_MaskFormatGravatar reed2014-11-13
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/728673002