aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/dftext.cpp
Commit message (Collapse)AuthorAge
* Change scaling of antialiased perspective text in dftext to help glitches.Gravatar Jim Van Verth2018-06-15
| | | | | | | | Bug: skia: Change-Id: I499c04949ddd957404cda6b34ab0073b539f6dd3 Reviewed-on: https://skia-review.googlesource.com/133582 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* 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>
* 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>
* 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>
* Revert "Change persp dftext to only antialiased"Gravatar Jim Van Verth2018-06-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 8345aa6302c7ca25a4b9c2df913e83ef79220ab7. Reason for revert: Causing inexplicable test failures. Original change's description: > Change persp dftext to only antialiased > > Originally I had aliased text in here because I thought it would trigger > the bug, but it doesn't and it's a bad idea for perspective text. > Changed it to a reasonably large size just to get another test case. > > Bug: skia:8042 > Change-Id: Ia81161063c76431e04503349ad6b33afb7523605 > Reviewed-on: https://skia-review.googlesource.com/132833 > Reviewed-by: Robert Phillips <robertphillips@google.com> > Commit-Queue: Jim Van Verth <jvanverth@google.com> TBR=jvanverth@google.com,robertphillips@google.com Change-Id: Ieec8fad7733a6ea435b2b211d5718c65cc263cbb No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:8042 Reviewed-on: https://skia-review.googlesource.com/133040 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Change persp dftext to only antialiasedGravatar Jim Van Verth2018-06-07
| | | | | | | | | | | | Originally I had aliased text in here because I thought it would trigger the bug, but it doesn't and it's a bad idea for perspective text. Changed it to a reasonably large size just to get another test case. Bug: skia:8042 Change-Id: Ia81161063c76431e04503349ad6b33afb7523605 Reviewed-on: https://skia-review.googlesource.com/132833 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Add test of tiny text with perspective.Gravatar Jim Van Verth2018-06-07
| | | | | | | | | | | | There is an issue with rendering tiny text with SDFs, and it's unclear which platforms this occurs on. Adding this to the GM will make it clearer. Bug: skia:8042 Change-Id: I0596c8e17a3b3cc7d6b51bef33097cfaba3bc64e Reviewed-on: https://skia-review.googlesource.com/132823 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* 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>
* slice GMs by native font platform, not by emoji formatGravatar Mike Klein2017-11-15
| | | | | | | | | | | | | | | | | | Right now the native font platform implies what emoji formats are supported, and we hope to support more than one per platform. Let's get these formats out of the name. As with most other font-y things, only the NativeFont bots are going to get back anything interesting now. The others will see no emoji font and an empty emoji sample text string. I'm going to look at a pre-baked testing SkTypeface that serves as an emoji font for the non-NativeFont bots next. Change-Id: Ie1374fc0e988bfe20ae21208e2f7e0a66a68fcb1 Reviewed-on: https://skia-review.googlesource.com/71762 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* add drawString helper to canvasGravatar Cary Clark2017-04-28
| | | | | | | | | | | | | | | | | | Many tests and examples use drawText with a guess of how long the text is in bytes, or a call to strlen(). Add a helper to SkCanvas to simplify these examples. Add another helper for SkString. R=reed@google.com Change-Id: I0204a31e938f065606f08ee7cd9a6b36db791ee2 Reviewed-on: https://skia-review.googlesource.com/13642 Commit-Queue: Cary Clark <caryclark@google.com> Reviewed-by: Cary Clark <caryclark@google.com> Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Cary Clark <caryclark@skia.org>
* 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>
* 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
* Factor code to rotate a canvas about a point.Gravatar bungeman2016-07-12
| | | | | | | | | | | SkMatrix::scale and ::rotate take a point around which to scale or rotate. Canvas lacks these helpers, so the code to rotate a canvas around a point has been duplicated many times. Factor all of these implementations into SkCanvas::rotate. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2142033002 Review-Url: https://codereview.chromium.org/2142033002
* 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
* update callsites for Make image factoriesGravatar reed2016-03-17
| | | | | | | | | | | not forced yet, as we still have the build-guard. waiting on chrome CL BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1810813003 TBR= Review URL: https://codereview.chromium.org/1810813003
* Move Budgeted enum out of SkSurface, use in GrTextureProviderGravatar bsalomon2016-02-25
| | | | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1728093005 DOCS_PREVIEW= https://skia.org/?cl=1728093005 Committed: https://skia.googlesource.com/skia/+/57599fe6c0336feaeeeb9b1996e77b70219b483c 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/1728093005
* Revert of Move Budgeted enum out of SkSurface, use in GrTextureProvider ↵Gravatar bsalomon2016-02-25
| | | | | | | | | | | | | | | | | | | | | | | | | (patchset #6 id:100001 of https://codereview.chromium.org/1728093005/ ) Reason for revert: Need workaround for chrome to build Original issue's description: > Move Budgeted enum out of SkSurface, use in GrTextureProvider > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1728093005 > DOCS_PREVIEW= https://skia.org/?cl=1728093005 > > Committed: https://skia.googlesource.com/skia/+/57599fe6c0336feaeeeb9b1996e77b70219b483c TBR=reed@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/1734043002
* Move Budgeted enum out of SkSurface, use in GrTextureProviderGravatar bsalomon2016-02-25
| | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1728093005 DOCS_PREVIEW= https://skia.org/?cl=1728093005 Review URL: https://codereview.chromium.org/1728093005
* Rename flag from "distance field" to "device independent."Gravatar bsalomon2015-08-31
| | | | Review URL: https://codereview.chromium.org/1322433006
* 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
* rename portable_typeface_always to portable_typefaceGravatar caryclark2015-07-24
| | | | | | TBR=reed@google.com Review URL: https://codereview.chromium.org/1257773002
* make dftext gm not overlap itselfGravatar caryclark2015-07-23
| | | | | | TBR=jvanverth@google.com Review URL: https://codereview.chromium.org/1253643004
* make dftext the same on Linux and AndroidGravatar caryclark2015-07-23
| | | | | | | | | Use the same font sizes on both platforms so that the gm images are easier to compare one to the other. TBR=jvanverth@google.com Review URL: https://codereview.chromium.org/1253573006
* fix typeface leakGravatar caryclark2015-07-23
| | | | | | TBR=bungeman@google.com Review URL: https://codereview.chromium.org/1239303003
* make color emoji gm portableGravatar caryclark2015-07-21
| | | | | | R=bungeman@google.com Review URL: https://codereview.chromium.org/1248703004
* Remove distance field flag from SkPaintGravatar jvanverth2015-06-22
| | | | Review URL: https://codereview.chromium.org/1192413005
* Move resource fonts to common location.Gravatar bungeman2015-04-30
| | | | | | | | | Move resource fonts to resources/fonts, add a destortable font for testing, and clean up how the tests create fonts from resources. R=joshualitt@google.com Review URL: https://codereview.chromium.org/1120823002
* 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
* Fix up some issues introduced by https://codereview.chromium.org/1013773002/Gravatar jvanverth2015-03-16
| | | | | | | | | Need to check for zero-length gradients when using the new correction. Make sure we use the old text sizes for color emoji test in dftext GM. BUG=skia:3540 Review URL: https://codereview.chromium.org/1009973004
* Fix SDF gradient calculation for non-uniform xformsGravatar jvanverth2015-03-16
| | | | | | | | Also adds two non-uniform test cases to the dftext GM. BUG=skia:3540 Review URL: https://codereview.chromium.org/1013773002
* Add missing SK_OVERRIDEGravatar rmistry2015-02-02
| | | | | | | | | | Tested by running on clang head + ubuntu 14.04: GYP_DEFINES=”skia_gpu=0 skia_warnings_as_errors=1" tools/xsan_build thread dm BUILDTYPE=Release out/Release/dm -v BUG=skia:3386 Review URL: https://codereview.chromium.org/894833002
* 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
* Make SkStream *not* ref counted.Gravatar scroggo2015-01-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SkStream is a stateful object, so it does not make sense for it to have multiple owners. Make SkStream inherit directly from SkNoncopyable. Update methods which previously called SkStream::ref() (e.g. SkImageDecoder::buildTileIndex() and SkFrontBufferedStream::Create(), which required the existing owners to call SkStream::unref()) to take ownership of their SkStream parameters and delete when done (including on failure). Switch all SkAutoTUnref<SkStream>s to SkAutoTDelete<SkStream>s. In some cases this means heap allocating streams that were previously stack allocated. Respect ownership rules of SkTypeface::CreateFromStream() and SkImageDecoder::buildTileIndex(). Update the comments for exceptional methods which do not affect the ownership of their SkStream parameters (e.g. SkPicture::CreateFromStream() and SkTypeface::Deserialize()) to be explicit about ownership. Remove test_stream_life, which tested that buildTileIndex() behaved correctly when SkStream was a ref counted object. The test does not make sense now that it is not. In SkPDFStream, remove the SkMemoryStream member. Instead of using it, create a new SkMemoryStream to pass to fDataStream (which is now an SkAutoTDelete). Make other pdf rasterizers behave like SkPDFDocumentToBitmap. SkPDFDocumentToBitmap delete the SkStream, so do the same in the following pdf rasterizers: SkPopplerRasterizePDF SkNativeRasterizePDF SkNoRasterizePDF Requires a change to Android, which currently treats SkStreams as ref counted objects. Review URL: https://codereview.chromium.org/849103004
* Require budget decision when creating a RenderTarget SkSurface.Gravatar bsalomon2015-01-16
| | | | | | | | | Restructure SkGpuDevice creation: *SkSurfaceProps are optional. *Use SkSurfaceProps to communicate DF text rather than a flag. *Tell SkGpuDevice::Create whether RT comes from cache or not. Review URL: https://codereview.chromium.org/848903004
* 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
* DM warning-free on win64Gravatar bsalomon2014-12-12
| | | | Review URL: https://codereview.chromium.org/805543002
* Add color emoji fallback for distance field text.Gravatar jvanverth2014-10-20
| | | | | | BUG=skia:3033 Review URL: https://codereview.chromium.org/670533002
* fix android framework build errorsGravatar djsollen2014-10-08
| | | | Review URL: https://codereview.chromium.org/637953002
* Fix perspective version of dftext GMGravatar jvanverth2014-10-07
| | | | Review URL: https://codereview.chromium.org/634923002