aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/glyph_pos.cpp
Commit message (Collapse)AuthorAge
* Cleanup of large text rendering, take 2.Gravatar Jim Van Verth2018-02-08
| | | | | | | | | | | | | | | | | * Switch all path glyphs to be rendered as part of the fBigGlyphs (now fPathGlyphs) system * Use one flush command for both cached and throwaway blobs * Store and render path glyphs per run rather than one list for the entire blob (fixes a layering bug) * Fix bug with scaled fallback glyphs, where fallback glyphs were trying to use more than one descriptor * Set paint flags correctly for paths Bug: skia:7562 Change-Id: I9455eda2867860a713fbdbbda79c74109e95f9f2 Reviewed-on: https://skia-review.googlesource.com/105020 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Revert "Cleanup of large text rendering."Gravatar Jim Van Verth2018-02-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 2fb7c8aef57e4b94d5215e618d8c3b4cccd35edf. Reason for revert: Causing flakes and incorrect GMs on ChromeOS. Original change's description: > Cleanup of large text rendering. > > * Switch all path glyphs to be rendered as part of the fBigGlyphs > (now fPathGlyphs) system > * Use one flush command for both cached and throwaway blobs > * Store and render path glyphs per run rather than one list for the > entire blob (fixes a layering bug) > * Fix bug with scaled fallback glyphs, where fallback glyphs were > trying to use more than one descriptor > > Bug: skia:7562 > Change-Id: Ic3d01887e2203a844102a04afe8674a16149b4bb > Reviewed-on: https://skia-review.googlesource.com/102400 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Jim Van Verth <jvanverth@google.com> TBR=jvanverth@google.com,bsalomon@google.com,robertphillips@google.com Change-Id: I103a7419df96db9859e0f6f4d0a8e5aea4ba8ddc No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:7562 Reviewed-on: https://skia-review.googlesource.com/104640 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Cleanup of large text rendering.Gravatar Jim Van Verth2018-02-06
| | | | | | | | | | | | | | | | * Switch all path glyphs to be rendered as part of the fBigGlyphs (now fPathGlyphs) system * Use one flush command for both cached and throwaway blobs * Store and render path glyphs per run rather than one list for the entire blob (fixes a layering bug) * Fix bug with scaled fallback glyphs, where fallback glyphs were trying to use more than one descriptor Bug: skia:7562 Change-Id: Ic3d01887e2203a844102a04afe8674a16149b4bb Reviewed-on: https://skia-review.googlesource.com/102400 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* GM: some header cleanupGravatar Mike Klein2017-03-22
| | | | | | | | | | | | | | gm.h includes sk_tool_utils.h but does not use it. The bulk of this CL makes each gm that uses sk_tool_utils include it. sk_tool_utils.h also provided SkRandom and SkTDArray, so a couple GMs add those headers too. Change-Id: Ieb2a7c542f0ca89c3223f744fc11b0ff37af36c1 Reviewed-on: https://skia-review.googlesource.com/10014 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Herb Derby <herb@google.com>
* hide trivial helpers on canvasGravatar Mike Reed2017-02-22
| | | | | | | | | BUG=skia: Change-Id: I42d4ca92897bde5bd8e0575a0104b12b83134cef Reviewed-on: https://skia-review.googlesource.com/8852 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Replace a lot of 'static const' with 'constexpr' or 'const'.Gravatar mtklein2016-09-01
| | | | | | | | | | | | | | | | | | | | | | | 'static const' means, there must be at most one of these, and initialize it at compile time if possible or runtime if necessary. This leads to unexpected code execution, and TSAN* will complain about races on the guard variables. Generally 'constexpr' or 'const' are better choices. Neither can cause races: they're either intialized at compile time (constexpr) or intialized each time independently (const). This CL prefers constexpr where possible, and uses const where not. It even prefers constexpr over const where they don't make a difference... I want to have lots of examples of constexpr for people to see and mimic. The scoped-to-class static has nothing to do with any of this, and is not changed. * Not yet on the bots, which use an older TSAN. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2300623005 Review-Url: https://codereview.chromium.org/2300623005
* GM: replace boilerplate with macrosGravatar halcanary2015-09-09
| | | | | | | | | | | I have verified locally that nothing draws differently. Motivation: * SK_SIMPLE_GM makes it easier to write a GM. * Reducing 1100 lines of code makes maintenance easier. * Simple GMs are easy to convert to Fiddles. Review URL: https://codereview.chromium.org/1333553002
* Style Change: NULL->nullptrGravatar halcanary2015-08-27
| | | | | | DOCS_PREVIEW= https://skia.org/?cl=1316233002 Review URL: https://codereview.chromium.org/1316233002
* rename portable_typeface_always to portable_typefaceGravatar caryclark2015-07-24
| | | | | | TBR=reed@google.com Review URL: https://codereview.chromium.org/1257773002
* make glyph_pos imageblur* largeglyphblur portableGravatar caryclark2015-07-16
| | | | | | R=reed@google.com,bungeman@google.com Review URL: https://codereview.chromium.org/1243493003
* Revert of Revert of stop calling SkScalarDiv (patchset #1 id:1 of ↵Gravatar reed2015-05-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1138263002/) Reason for revert: android patched, blink has rolled Original issue's description: > Revert of stop calling SkScalarDiv (patchset #4 id:60001 of https://codereview.chromium.org/1135053002/) > > Reason for revert: > need to wait for Blink roll (and patch android) > > Original issue's description: > > stop calling SkScalarDiv > > > > BUG=skia: > > TBR= > > > > Committed: https://skia.googlesource.com/skia/+/67d71c898249a7af3523b16c6a69895a63bfae0a > > TBR= > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/2629697933b5cc975e45d2a45c48f803fc6cbcec TBR= NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1135693003
* Revert of stop calling SkScalarDiv (patchset #4 id:60001 of ↵Gravatar reed2015-05-12
| | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1135053002/) Reason for revert: need to wait for Blink roll (and patch android) Original issue's description: > stop calling SkScalarDiv > > BUG=skia: > TBR= > > Committed: https://skia.googlesource.com/skia/+/67d71c898249a7af3523b16c6a69895a63bfae0a TBR= NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1138263002
* stop calling SkScalarDivGravatar reed2015-05-12
| | | | | | | BUG=skia: TBR= Review URL: https://codereview.chromium.org/1135053002
* C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla}Gravatar mtklein2015-03-25
| | | | | | | | | NOPRESUBMIT=true BUG=skia: DOCS_PREVIEW= https://skia.org/?cl=1037793002 Review URL: https://codereview.chromium.org/1037793002
* remove unused GM flagsGravatar mtklein2015-01-23
| | | | | | | | | | Depends on https://codereview.chromium.org/873753002/ Thumbs up to CLion for refactoring this for me. BUG=skia: Review URL: https://codereview.chromium.org/867963004
* Fix up all the easy virtual ... SK_OVERRIDE cases.Gravatar mtklein2015-01-09
| | | | | | | | | | | | This fixes every case where virtual and SK_OVERRIDE were on the same line, which should be the bulk of cases. We'll have to manually clean up the rest over time unless I level up in regexes. for f in (find . -type f); perl -p -i -e 's/virtual (.*)SK_OVERRIDE/\1SK_OVERRIDE/g' $f; end BUG=skia: Review URL: https://codereview.chromium.org/806653007
* Cleanup: More override fixes - another round.Gravatar tfarina2015-01-05
| | | | | | | | BUG=skia:3075 TEST=ninja -C out/Debug TBR=reed@google.com Review URL: https://codereview.chromium.org/831113002
* Add standard fonts to all GMs.Gravatar Cary Clark2014-07-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow GM results to be compared across machines and platforms by standardizing the fonts used by all tests. This adds runtime flags to DM to use either the system font context (the default), the fonts in the resources directory ( --resourceFonts ) or a set of canonical paths generated from the fonts ( --portableFonts ). This CL should leave the current DM results unchanged by default. If the portable font data or resource font is missing when DM is run, it falls back to using the system font context. The create_test_font tool generates the paths and metrics read by DM with the --portableFonts flag set, and generates the font substitution tables read by DM with the --resourceFonts flag set. If DM is run in SkDebug mode with the --reportUsedChars flag set, it generates the corresponding data compiled into the create_test_font tool. All GM tests set their typeface information by calling either sk_tool_utils::set_portable_typeface or sk_tool_utils::portable_typeface . (The former takes the paint, the latter returns a SkTypeface.) These calls can be removed in the future when the Font Manager can be superceded. BUG=skia:2687 R=mtklein@google.com Review URL: https://codereview.chromium.org/407183003
* Revert of Revert of Fix SkPaint::measureText for stroked hairline text ↵Gravatar rmistry2014-06-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/354433002/) Reason for revert: Rebaseline CL is ready to be submitted Original issue's description: > Revert of Fix SkPaint::measureText for stroked hairline text (https://codereview.chromium.org/335603003/) > > Reason for revert: > Caused many shadertext GM failures > > Original issue's description: > > Fix SkPaint::measureText for stroked hairline text > > > > SkPaint::measureText and text drawing used different criteria for > > determining whether text should be drawn as paths or not. > > > > Adds tests glyph_pos_(h/n)_(s/f/b) to test the text rendering and the glyph > > positioning in the rendering. Mainly added in order to define what is the > > expected text rendering when hairline stroke is used with various transform > > options. > > > > The testcase also tries to note or highlight the fact that SkPaint::measureText > > is not expected to produce intuitively matching results when compared to a > > rendering, if the rendering is done so that the device ends up having a device > > transform. > > > > This fixes the glyph_pos_h_s (hairline, stroked) test-case. > > > > Ignore shadertext2_pdf-poppler.png gm on > > Test-Ubuntu13.10-ShuttleA-NoGPU-x86_64-Debug temporarily, as that fails. > > > > Committed: https://skia.googlesource.com/skia/+/196af738027c5e18c3eb792dbcaf90ef27821793 > > TBR=jvanverth@google.com,reed@google.com,kkinnunen@nvidia.com > NOTREECHECKS=true > NOTRY=true > > Committed: https://skia.googlesource.com/skia/+/abc9bb55ddfeb4b1a7acc335a34841fddcd22d27 R=jvanverth@google.com, reed@google.com, kkinnunen@nvidia.com TBR=jvanverth@google.com, kkinnunen@nvidia.com, reed@google.com NOTREECHECKS=true NOTRY=true Author: rmistry@google.com Review URL: https://codereview.chromium.org/349153005
* Revert of Fix SkPaint::measureText for stroked hairline text ↵Gravatar rmistry2014-06-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/335603003/) Reason for revert: Caused many shadertext GM failures Original issue's description: > Fix SkPaint::measureText for stroked hairline text > > SkPaint::measureText and text drawing used different criteria for > determining whether text should be drawn as paths or not. > > Adds tests glyph_pos_(h/n)_(s/f/b) to test the text rendering and the glyph > positioning in the rendering. Mainly added in order to define what is the > expected text rendering when hairline stroke is used with various transform > options. > > The testcase also tries to note or highlight the fact that SkPaint::measureText > is not expected to produce intuitively matching results when compared to a > rendering, if the rendering is done so that the device ends up having a device > transform. > > This fixes the glyph_pos_h_s (hairline, stroked) test-case. > > Ignore shadertext2_pdf-poppler.png gm on > Test-Ubuntu13.10-ShuttleA-NoGPU-x86_64-Debug temporarily, as that fails. > > Committed: https://skia.googlesource.com/skia/+/196af738027c5e18c3eb792dbcaf90ef27821793 R=jvanverth@google.com, reed@google.com, kkinnunen@nvidia.com TBR=jvanverth@google.com, kkinnunen@nvidia.com, reed@google.com NOTREECHECKS=true NOTRY=true Author: rmistry@google.com Review URL: https://codereview.chromium.org/354433002
* Fix SkPaint::measureText for stroked hairline textGravatar kkinnunen2014-06-22
SkPaint::measureText and text drawing used different criteria for determining whether text should be drawn as paths or not. Adds tests glyph_pos_(h/n)_(s/f/b) to test the text rendering and the glyph positioning in the rendering. Mainly added in order to define what is the expected text rendering when hairline stroke is used with various transform options. The testcase also tries to note or highlight the fact that SkPaint::measureText is not expected to produce intuitively matching results when compared to a rendering, if the rendering is done so that the device ends up having a device transform. This fixes the glyph_pos_h_s (hairline, stroked) test-case. Ignore shadertext2_pdf-poppler.png gm on Test-Ubuntu13.10-ShuttleA-NoGPU-x86_64-Debug temporarily, as that fails. R=jvanverth@google.com, reed@google.com Author: kkinnunen@nvidia.com Review URL: https://codereview.chromium.org/335603003