aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/PathMeasureTest.cpp
Commit message (Collapse)AuthorAge
* Reland "fix nextContour bug"Gravatar Mike Reed2018-03-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 0a86820f2fe3b62f2a5ac2917a1ef342dbe53722. Reason for revert: fix has landed in CTS Original change's description: > Revert "fix nextContour bug" > > This reverts commit 473f69276f1854db80e094cc4af091f7f8a5b00b. > > Reason for revert: a CTS test PathMeasureTest.android.graphics.cts.PathMeasureTest.testNextContour is failing > > Original change's description: > > fix nextContour bug > > > > Calling nextContour() needs to ensure that we've already measured the "current" one. > > > > Bug: skia: > > Change-Id: I501c26d0b068028d67103888f06ec89125a5407a > > Reviewed-on: https://skia-review.googlesource.com/114692 > > Reviewed-by: Cary Clark <caryclark@google.com> > > Commit-Queue: Mike Reed <reed@google.com> > > TBR=caryclark@google.com,reed@google.com > > Change-Id: I7f1e08651dfe73c02158b209dc28af2b174e246f > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia: > Reviewed-on: https://skia-review.googlesource.com/114823 > Reviewed-by: Stan Iliev <stani@google.com> > Commit-Queue: Stan Iliev <stani@google.com> TBR=caryclark@google.com,reed@google.com,stani@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Bug: skia: Change-Id: I0fd61473ef0df62722cf6c6b86f1277f580e4ab1 Reviewed-on: https://skia-review.googlesource.com/115340 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "fix nextContour bug"Gravatar Stan Iliev2018-03-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 473f69276f1854db80e094cc4af091f7f8a5b00b. Reason for revert: a CTS test PathMeasureTest.android.graphics.cts.PathMeasureTest.testNextContour is failing Original change's description: > fix nextContour bug > > Calling nextContour() needs to ensure that we've already measured the "current" one. > > Bug: skia: > Change-Id: I501c26d0b068028d67103888f06ec89125a5407a > Reviewed-on: https://skia-review.googlesource.com/114692 > Reviewed-by: Cary Clark <caryclark@google.com> > Commit-Queue: Mike Reed <reed@google.com> TBR=caryclark@google.com,reed@google.com Change-Id: I7f1e08651dfe73c02158b209dc28af2b174e246f No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/114823 Reviewed-by: Stan Iliev <stani@google.com> Commit-Queue: Stan Iliev <stani@google.com>
* fix nextContour bugGravatar Mike Reed2018-03-16
| | | | | | | | | | Calling nextContour() needs to ensure that we've already measured the "current" one. Bug: skia: Change-Id: I501c26d0b068028d67103888f06ec89125a5407a Reviewed-on: https://skia-review.googlesource.com/114692 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Mike Reed <reed@google.com>
* fix circular dashingGravatar caryclark2016-01-19
| | | | | | | | | | | | | | | | | | | | | Path measure cannot use the same code approach for quadratics and cubics. Subdividing cubics repeatedly does not result in subdivided t values, e.g. a quarter circle cubic divided in half twice does not have a t value equivalent to 1/4. Instead, always compute the cubic segment from a pair of t values. When finding the length of the cubic through recursive measures, it is enough to carry the point at a given t to the next subdivision. (Chrome suppression has landed already.) R=reed@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1602153002 Review URL: https://codereview.chromium.org/1602153002
* Cleanup: Sanitize the order of includes under tests/Gravatar tfarina@chromium.org2014-01-24
| | | | | | | | | | | | | | | | Initially this was to make sure Test.h appeared after the Sk*.h includes. Patch generated by the following command line: $ ~/chromium/src/tools/sort-headers.py tests/*.cpp BUG=None TEST=tests R=robertphillips@google.com Review URL: https://codereview.chromium.org/145313004 git-svn-id: http://skia.googlecode.com/svn/trunk@13177 2bbb7eff-a529-9590-31e7-b0007b416f81
* Move macros from TestClassDef.h to Test.hGravatar commit-bot@chromium.org2014-01-14
| | | | | | | | | | | | | | Motivation: those macros don't make any sense without the definitions in Test.h. BUG= R=mtklein@google.com Author: halcanary@google.com Review URL: https://codereview.chromium.org/138563004 git-svn-id: http://skia.googlecode.com/svn/trunk@13074 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove SK_SCALAR_IS_[FLOAT,FIXED] and assume floatsGravatar reed@google.com2013-12-17
| | | | | | | | | | | | | To keep the CL (slightly) managable, this does not make any changes to existing macros (e.g. SkScalarMul). Just tackling #ifdef constructs this time around. BUG= R=bsalomon@google.com, caryclark@google.com Review URL: https://codereview.chromium.org/117053002 git-svn-id: http://skia.googlecode.com/svn/trunk@12712 2bbb7eff-a529-9590-31e7-b0007b416f81
* Use DEFINE_TESTCLASS_SHORT macro in tests.Gravatar tfarina@chromium.org2013-12-12
| | | | | | | | | | | | | The three version of DEFINE_TESTCLASS macro is deprecated and thus just use the simple, short one. BUG=None TEST=out/Debug/tests R=mtklein@google.com, bsalomon@google.com, robertphillips@google.com Review URL: https://codereview.chromium.org/100113004 git-svn-id: http://skia.googlecode.com/svn/trunk@12653 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove SkFloatToScalar macroGravatar commit-bot@chromium.org2013-11-25
| | | | | | | | | | | BUG= R=reed@google.com, djsollen@google.com Author: caryclark@google.com Review URL: https://codereview.chromium.org/85463005 git-svn-id: http://skia.googlecode.com/svn/trunk@12385 2bbb7eff-a529-9590-31e7-b0007b416f81
* Tests : Unused parameters cleanupGravatar sugoi@google.com2013-02-27
| | | | | | | I removed unused parameters in the tests wherever it was trivial to do so. I'm trying to get the easy ones out of the way before we get into more involved discussions around this. Review URL: https://codereview.appspot.com/7394055 git-svn-id: http://skia.googlecode.com/svn/trunk@7891 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix test_small_segments3 path measure test.Gravatar bsalomon@google.com2012-10-03
| | | | | | Review URL: https://codereview.appspot.com/6601050 git-svn-id: http://skia.googlecode.com/svn/trunk@5792 2bbb7eff-a529-9590-31e7-b0007b416f81
* Result of running tools/sanitize_source_files.py (which was added in ↵Gravatar rmistry@google.com2012-08-23
| | | | | | | | | https://codereview.appspot.com/6465078/) This CL is part II of IV (I broke down the 1280 files into 4 CLs). Review URL: https://codereview.appspot.com/6474054 git-svn-id: http://skia.googlecode.com/svn/trunk@5263 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fixed Windows compiler complaintsGravatar robertphillips@google.com2012-07-10
| | | | | | | | http://codereview.appspot.com/6392044 git-svn-id: http://skia.googlecode.com/svn/trunk@4511 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fixed some fixed point build Windows compiler complaintsGravatar robertphillips@google.com2012-05-08
| | | | | | | | http://codereview.appspot.com/6197063/ git-svn-id: http://skia.googlecode.com/svn/trunk@3867 2bbb7eff-a529-9590-31e7-b0007b416f81
* Apply fix from #3739 to quads and cubics as wellGravatar reed@google.com2012-04-27
| | | | | | | Fixes http://code.google.com/p/chromium/issues/detail?id=125249 Review URL: https://codereview.appspot.com/6137046 git-svn-id: http://skia.googlecode.com/svn/trunk@3786 2bbb7eff-a529-9590-31e7-b0007b416f81
* only add pathmeasure segment if the accumulated length was actually changed,Gravatar reed@google.com2012-04-20
| | | | | | | | | | | | | | | and not based on if the local length was > 0. This is necessary since assert(delta > 0); // true prevDistance = distance; distance += delta; assert(distance > prevDistance); // not always true Fixes https://bugs.webkit.org/show_bug.cgi?id=78979 git-svn-id: http://skia.googlecode.com/svn/trunk@3739 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix unused-return-result-warning for invert/getPosTanGravatar reed@google.com2012-04-19
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3733 2bbb7eff-a529-9590-31e7-b0007b416f81
* Addressed more Windows compiler complaint issuesGravatar robertphillips@google.com2012-04-16
| | | | | | | | http://codereview.appspot.com/6007056/ git-svn-id: http://skia.googlecode.com/svn/trunk@3689 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fixing the behavior of SkPathMeasure to reflect changes in SkPath::Iter.Gravatar schenney@chromium.org2012-01-18
| | | | | | | | | | | This implementation modifies SkPath::Iter extensively to avoid copying the points when used to measure path length. BUG=446 TEST=tests/PathMeasureTest.cpp Review URL: https://codereview.appspot.com/5533074 git-svn-id: http://skia.googlecode.com/svn/trunk@3062 2bbb7eff-a529-9590-31e7-b0007b416f81
* Adding new SkPathMeasure tests, defined out for now as they fail.Gravatar schenney@chromium.org2012-01-12
| | | | | | Review URL: http://codereview.appspot.com/5529078 git-svn-id: http://skia.googlecode.com/svn/trunk@3029 2bbb7eff-a529-9590-31e7-b0007b416f81
* Automatic update of all copyright notices to reflect new license terms.Gravatar epoger@google.com2011-07-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I have manually examined all of these diffs and restored a few files that seem to require manual adjustment. The following files still need to be modified manually, in a separate CL: android_sample/SampleApp/AndroidManifest.xml android_sample/SampleApp/res/layout/layout.xml android_sample/SampleApp/res/menu/sample.xml android_sample/SampleApp/res/values/strings.xml android_sample/SampleApp/src/com/skia/sampleapp/SampleApp.java android_sample/SampleApp/src/com/skia/sampleapp/SampleView.java experimental/CiCarbonSampleMain.c experimental/CocoaDebugger/main.m experimental/FileReaderApp/main.m experimental/SimpleCocoaApp/main.m experimental/iOSSampleApp/Shared/SkAlertPrompt.h experimental/iOSSampleApp/Shared/SkAlertPrompt.m experimental/iOSSampleApp/SkiOSSampleApp-Base.xcconfig experimental/iOSSampleApp/SkiOSSampleApp-Debug.xcconfig experimental/iOSSampleApp/SkiOSSampleApp-Release.xcconfig gpu/src/android/GrGLDefaultInterface_android.cpp gyp/common.gypi gyp_skia include/ports/SkHarfBuzzFont.h include/views/SkOSWindow_wxwidgets.h make.bat make.py src/opts/memset.arm.S src/opts/memset16_neon.S src/opts/memset32_neon.S src/opts/opts_check_arm.cpp src/ports/SkDebug_brew.cpp src/ports/SkMemory_brew.cpp src/ports/SkOSFile_brew.cpp src/ports/SkXMLParser_empty.cpp src/utils/ios/SkImageDecoder_iOS.mm src/utils/ios/SkOSFile_iOS.mm src/utils/ios/SkStream_NSData.mm tests/FillPathTest.cpp Review URL: http://codereview.appspot.com/4816058 git-svn-id: http://skia.googlecode.com/svn/trunk@1982 2bbb7eff-a529-9590-31e7-b0007b416f81
* migrate more legacy unittests into tests/Gravatar reed@android.com2009-03-07
SkParse yet to be cleaned up git-svn-id: http://skia.googlecode.com/svn/trunk@113 2bbb7eff-a529-9590-31e7-b0007b416f81