aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/textblobrandomfont.cpp
Commit message (Collapse)AuthorAge
* Remove SK_SUPPORT_GPU checks in tool-only codeGravatar Brian Osman2018-05-31
| | | | | | | | | | | | | | | | Most of this is (obviously) not necessary to do, but once I started, I figured I'd just get it all. Tools (nanobench, DM, skiaserve), all GMs, benches, and unit tests, plus support code (command line parsing and config stuff). This is almost entirely mechanical. Bug: skia: Change-Id: I209500f8df8c5bd43f8298ff26440d1c4d7425fb Reviewed-on: https://skia-review.googlesource.com/131153 Reviewed-by: Mike Klein <mtklein@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
* Clean up textblobrandomfont.Gravatar Jim Van Verth2018-05-24
| | | | | | | | | | | | | | | The middle set of text is generated by rendering into a surface and then blitting that to the canvas to generate a certain kind of text generation. However, we are rendering with a -0.05 rotation and using nearest-neighbor sampling, which produces nasty artifacts unrelated to text. Changed the sample to render into the surface with the rotation, and blit back with no rotation. Bug: skia:7115 Change-Id: Iac1338f556cacc6c617ca14a625c649a6e7b9a48 Reviewed-on: https://skia-review.googlesource.com/130027 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Update SkRandomScalerContext to handle mask filters.Gravatar Ben Wagner2018-05-03
| | | | | | | | | | | | | | | | SkRandomScalarContext would apply all path and mask filters twice, once on the proxy and once to itself. This also changes the SkScalerContext mask generation in anticipation of removing the mask format overrides. This also changes the textblobrandomfont test to fix the line spacing and emoji handling. Change-Id: Ib2a633d49ccb801a1849dd982185f44c1d2ea85f Reviewed-on: https://skia-review.googlesource.com/124644 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com>
* use tool_utils to encapsulate checking for recording canvas and makeSurfaceGravatar Mike Reed2018-01-02
| | | | | | | | Bug: skia: Change-Id: Ia93ee09dd213b8d6ad5c18e887add5ff3448c824 Reviewed-on: https://skia-review.googlesource.com/90243 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* add platform_font_manager()Gravatar Mike Klein2017-11-13
| | | | | | | | | | | | | This string replaces {major_}platform_os_name() and platform_extra_config() for the font-focused GMs using them. The GDI bots will report "GDI", the NativeFont bots their OS, and other bots "". Change-Id: I8f7bb1ffea3cc91601c98b4ccff7a3a234ac77d3 Reviewed-on: https://skia-review.googlesource.com/70500 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* move Sk{Test,Random}ScalerContext to toolsGravatar Mike Klein2017-11-10
| | | | | | | | | There's no need for Skia users to link this test code. Change-Id: I9d6ef2a053d0cf5cb916aa254389ca819c48bae1 Reviewed-on: https://skia-review.googlesource.com/69922 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Remove internal use of SkTypeface::Style.Gravatar Ben Wagner2017-07-27
| | | | | | | Change-Id: I71cf04b12be95a54b7fb47d048ba1f8672ed9a8f Reviewed-on: https://skia-review.googlesource.com/27760 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
* Fix recipes/tests for new Debian botsGravatar Eric Boren2017-06-28
| | | | | | | | Bug: skia:6612 Change-Id: I2920bb7b1aa3ebb021223ed6345f13f1f9c8bc24 Reviewed-on: https://skia-review.googlesource.com/21141 Reviewed-by: Ben Wagner <benjaminwagner@google.com> Commit-Queue: Eric Boren <borenet@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>
* refFoo variant for getters that naturally have a sk_spGravatar Mike Reed2017-01-12
| | | | | | | | | | BUG=skia: Change-Id: I13afa1b81e8a72d93e45fb4d37228be196b0f388 Reviewed-on: https://skia-review.googlesource.com/6923 Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Fix textblobrandomfont GM in F16 configsGravatar Brian Osman2016-12-02
| | | | | | | | | | | | We were trying to mix the canvas' color space (linear gamma) with N32 color type, which isn't allowed. Propagate the original color type, too. BUG=skia: Change-Id: I606b25e690486abe042d6a4b6dda606ac85b546b Reviewed-on: https://skia-review.googlesource.com/5509 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Use sk_sp text blob APIsGravatar fmalita2016-09-13
| | | | | | | | | | | SkTextBlobBuilder::build() -> make() SkAutoTUnref<const SkTextBlob> -> sk_sp<SkTextBlob> drawTextBlob(const SkTextBlob*) -> drawTextBlob(const sk_sp<SkTextBlob>&) BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2335493005 Review-Url: https://codereview.chromium.org/2335493005
* 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
* Remove SkSurfaceProps gamma-correctness flag entirely.Gravatar brianosman2016-07-26
| | | | | | | | | | | | | This is no longer required - gamma-correctness is now just based on the presence or absence of a color space. Public API change is just removal of (unused) flag. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2188463002 TBR=bsalomon@google.com Review-Url: https://codereview.chromium.org/2188463002
* More removal of SkColorProfileType...Gravatar brianosman2016-06-20
| | | | | | | | | | | Scrub GMs. Remove the gDefaultProfile thing (it's unused now), along with the command line flag that was setting it in DM and nanobench. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2071393002 Committed: https://skia.googlesource.com/skia/+/944876f2745a62a839e49275daf93a0329372e67 Review-Url: https://codereview.chromium.org/2071393002
* Revert of More removal of SkColorProfileType... (patchset #2 id:20001 of ↵Gravatar egdaniel2016-06-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/2071393002/ ) Reason for revert: This was still used in chrome Original issue's description: > More removal of SkColorProfileType... > > Scrub GMs. Remove the gDefaultProfile thing (it's unused now), along with > the command line flag that was setting it in DM and nanobench. > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2071393002 > > Committed: https://skia.googlesource.com/skia/+/944876f2745a62a839e49275daf93a0329372e67 TBR=msarett@google.com,reed@google.com,bsalomon@google.com,brianosman@google.com # 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/2074103004
* More removal of SkColorProfileType...Gravatar brianosman2016-06-17
| | | | | | | | | | Scrub GMs. Remove the gDefaultProfile thing (it's unused now), along with the command line flag that was setting it in DM and nanobench. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2071393002 Review-Url: https://codereview.chromium.org/2071393002
* SkTypeface::MakeFromName to take SkFontStyle.Gravatar mboc2016-05-31
| | | | | | | | | | | | | SkTypeface::MakeFromName currently takes SkTypeface::Style, which is quite limited. This starts the transition to this function taking SkFontStyle instead. GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1818043002 TBR=reed He said it sounded like a good idea. Review-Url: https://codereview.chromium.org/1818043002
* Move SkTypeface to sk_sp.Gravatar bungeman2016-05-12
| | | | | | | Committed: https://skia.googlesource.com/skia/+/6296da736fbf40aae881650c239420f64e576c3f GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1933393002 Review-Url: https://codereview.chromium.org/1933393002
* Revert of Move SkTypeface to sk_sp. (patchset #5 id:80001 of ↵Gravatar scroggo2016-05-12
| | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1933393002/ ) Reason for revert: fontmgr_iterAndroid failing to draw emoji. E.g. https://gold.skia.org/search2?blame=6296da736fbf40aae881650c239420f64e576c3f&unt=true&head=true&query=source_type%3Dgm Original issue's description: > Move SkTypeface to sk_sp. > > Committed: https://skia.googlesource.com/skia/+/6296da736fbf40aae881650c239420f64e576c3f TBR=reed@google.com,fmalita@chromium.org,tomhudson@google.com,bungeman@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review-Url: https://codereview.chromium.org/1974783002
* Move SkTypeface to sk_sp.Gravatar bungeman2016-05-11
| | | | Review-Url: https://codereview.chromium.org/1933393002
* Rename lots of things from 'sRGB' to 'GammaCorrect', where appropriateGravatar brianosman2016-04-13
| | | | | | | | | | | Trying to be much more explicit about where we really mean sRGB as a format, and where we mean gamma-correct, as in: "not legacy behavior". Most of the changes to rendering behavior are dependent on the latter, so let's be precise. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1884873006 Review URL: https://codereview.chromium.org/1884873006
* SkSurfaceProps now has a gamma-correct ("AllowSRGBInputs") flag. That's ↵Gravatar brianosman2016-04-06
| | | | | | | | | | | | propagated in a few places so that the backend can do the right thing for L32 vs S32 mode. Also added SkSurfaceProps to SkSpecialImage, so that Image -> Surface conversion can preserve the desired behavior during filtering. Many small changes, including a bunch of comments about places where we may be losing information right now. My approach was to ensure that if anything fails, it will always fall back to "legacy" mode - gamma-correctness is opt-in, so I'll just have to feed things through as missing cases are exposed. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1838953007 Review URL: https://codereview.chromium.org/1845283003
* switch surface to sk_spGravatar reed2016-03-23
| | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1817383002 CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot Review URL: https://codereview.chromium.org/1817383002
* 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
* Style Change: SkNEW->new; SkDELETE->deleteGravatar halcanary2015-08-26
| | | | | | DOCS_PREVIEW= https://skia.org/?cl=1316123003 Review URL: https://codereview.chromium.org/1316123003
* Add BW masks to random scaler contextGravatar joshualitt2015-08-01
| | | | | | | | | TBR=bsalomon@google.com BUG=skia: Committed: https://skia.googlesource.com/skia/+/a4a530614e9ba856aac3f16c29683e6a2a9153d9 Review URL: https://codereview.chromium.org/1270793003
* Revert of Add BW masks to random scaler context (patchset #1 id:1 of ↵Gravatar joshualitt2015-08-01
| | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1270793003/) Reason for revert: breaks mac Original issue's description: > Add BW masks to random scaler context > > TBR=bsalomon@google.com > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/a4a530614e9ba856aac3f16c29683e6a2a9153d9 TBR=joshualitt@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1264843003
* Add BW masks to random scaler contextGravatar joshualitt2015-08-01
| | | | | | | TBR=bsalomon@google.com BUG=skia: Review URL: https://codereview.chromium.org/1270793003
* adding gm to use random scaler contextGravatar joshualitt2015-08-01
| | | | | | | | BUG=skia: Committed: https://skia.googlesource.com/skia/+/853336c532504b3436d7dcbf252419f00c79066d Review URL: https://codereview.chromium.org/1268853008
* Revert of adding gm to use random scaler context (patchset #4 id:60001 of ↵Gravatar joshualitt2015-07-31
| | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1268853008/) Reason for revert: breaking bots Original issue's description: > adding gm to use random scaler context > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/853336c532504b3436d7dcbf252419f00c79066d TBR=bsalomon@google.com,joshualitt@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1259033004
* adding gm to use random scaler contextGravatar joshualitt2015-07-31
BUG=skia: Review URL: https://codereview.chromium.org/1268853008