aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkDistanceFieldGen.h
Commit message (Collapse)AuthorAge
* Revert "Reduce the amount of padding needed for SDFs, take 2"Gravatar Jim Van Verth2018-01-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 10105308dc86dccd3d4a0c8b9863d7c749440b21. Reason for revert: Crashing in dm on Chromecast, looks like on dftext gm. Seeing shape drop-outs in persp_shaders_bw on IntelBayTrail in gldft mode (second column, third and fourth rows). Original change's description: > Reduce the amount of padding needed for SDFs, take 2 > > SDF glyphs and paths were padded by 4 pixels, and had an inset of 2 > pixels within that for rendering the shape. We should be able to > use a pad of 2, and outset the original bounds by one texel. This allows us > to increase the maximum size in the atlas. > > Change-Id: I06b229c7a3bc907d75d320461320d0b588f9a77c > Reviewed-on: https://skia-review.googlesource.com/101843 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Jim Van Verth <jvanverth@google.com> TBR=jvanverth@google.com,bsalomon@google.com Change-Id: Iaedb48645027db8a84970571e82edc1f878592ed No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/102040 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Reduce the amount of padding needed for SDFs, take 2Gravatar Jim Van Verth2018-01-30
| | | | | | | | | | | | SDF glyphs and paths were padded by 4 pixels, and had an inset of 2 pixels within that for rendering the shape. We should be able to use a pad of 2, and outset the original bounds by one texel. This allows us to increase the maximum size in the atlas. Change-Id: I06b229c7a3bc907d75d320461320d0b588f9a77c Reviewed-on: https://skia-review.googlesource.com/101843 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Revert "Reduce the amount of padding needed for SDFs."Gravatar Jim Van Verth2018-01-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit b42610aa9b0e431c5658f7f9ada8553e4f90869c. Reason for revert: Seeing some corrupt text in certain GMs. Original change's description: > Reduce the amount of padding needed for SDFs. > > SDF glyphs and paths were padded by 4 pixels, and had an inset of 2 > pixels within that for rendering the shape. We should be able to > use a pad of 1, and the original bounds for the shape. This allows us > to increase the maximum size in the atlas. > > Bug: skia: > Change-Id: I844d6afc4e0a52fc49fe1f6df94b635779290307 > Reviewed-on: https://skia-review.googlesource.com/101440 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Jim Van Verth <jvanverth@google.com> TBR=jvanverth@google.com,bsalomon@google.com Change-Id: Ia34487a3961242c2a6baca601ecf9613b21d6963 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/101860 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Reduce the amount of padding needed for SDFs.Gravatar Jim Van Verth2018-01-30
| | | | | | | | | | | | | SDF glyphs and paths were padded by 4 pixels, and had an inset of 2 pixels within that for rendering the shape. We should be able to use a pad of 1, and the original bounds for the shape. This allows us to increase the maximum size in the atlas. Bug: skia: Change-Id: I844d6afc4e0a52fc49fe1f6df94b635779290307 Reviewed-on: https://skia-review.googlesource.com/101440 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Use ARM fixes for SDF encoding.Gravatar jvanverth2016-02-24
| | | | | | | | This pulls out the encoding fixes by Joel Liang from https://codereview.chromium.org/1643143002/ GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1726763002 Review URL: https://codereview.chromium.org/1726763002
* More win64 warning fixesGravatar bsalomon2014-12-12
| | | | Review URL: https://codereview.chromium.org/798723002
* Fix artifacts in distance field rendering due to bilerpGravatar commit-bot@chromium.org2014-04-15
| | | | | | | | | | | | | | | | | Because we were using the full distance field glyph rect, there were cases when a neighboring texel might be set to full value (e.g. we might copy the glyph over old data after a purge). This was giving artifacts, and insetting the rect by 1 solves the problem. In doing this, I discovered that removing the extra 1 texel pad around the glyph meant to handle bilerp, and insetting by 2, works just as well and saves space in the glyph atlas. R=bsalomon@google.com Author: jvanverth@google.com Review URL: https://codereview.chromium.org/239333002 git-svn-id: http://skia.googlecode.com/svn/trunk@14203 2bbb7eff-a529-9590-31e7-b0007b416f81
* Move distance field generation to the glyph cache.Gravatar commit-bot@chromium.org2014-04-14
| | | | | | | | | | | | | | Distance fields are currently created in GrTextStrike, which is the wrong place. This moves that to the glyph cache where it belongs. As part of my testing, I found that when we fall back to paths in the GrDistanceFieldTextContext it was not scaling them properly, so that's fixed in here too. R=robertphillips@google.com, reed@google.com Author: jvanverth@google.com Review URL: https://codereview.chromium.org/227593010 git-svn-id: http://skia.googlecode.com/svn/trunk@14193 2bbb7eff-a529-9590-31e7-b0007b416f81
* Drop executable flag from headers so that they can be packagedGravatar robertphillips@google.com2014-03-11
| | | | | | | | https://codereview.chromium.org/194883004/ git-svn-id: http://skia.googlecode.com/svn/trunk@13746 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add new module for distance field generation.Gravatar commit-bot@chromium.org2014-03-11
| | | | | | | | | | | | | | | | This improves the speed over the previous method by 10x+, and makes using distance fields practical. BUG=skia:2173 Committed: http://code.google.com/p/skia/source/detail?r=13729 R=bsalomon@google.com, robertphillips@google.com Author: jvanverth@google.com Review URL: https://codereview.chromium.org/178543007 git-svn-id: http://skia.googlecode.com/svn/trunk@13740 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert of Add new module for distance field generation. ↵Gravatar commit-bot@chromium.org2014-03-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/178543007/) Reason for revert: multiple compile errors Original issue's description: > Add new module for distance field generation. > > This improves the speed over the previous method by 10x+, and makes using distance fields practical. > > BUG=skia:2173 > > Committed: http://code.google.com/p/skia/source/detail?r=13729 R=bsalomon@google.com, robertphillips@google.com, jvanverth@google.com TBR=bsalomon@google.com, jvanverth@google.com, robertphillips@google.com NOTREECHECKS=true NOTRY=true BUG=skia:2173 Author: halcanary@google.com Review URL: https://codereview.chromium.org/190753015 git-svn-id: http://skia.googlecode.com/svn/trunk@13732 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add new module for distance field generation.Gravatar commit-bot@chromium.org2014-03-10
This improves the speed over the previous method by 10x+, and makes using distance fields practical. BUG=skia:2173 R=bsalomon@google.com, robertphillips@google.com Author: jvanverth@google.com Review URL: https://codereview.chromium.org/178543007 git-svn-id: http://skia.googlecode.com/svn/trunk@13729 2bbb7eff-a529-9590-31e7-b0007b416f81