aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/RoundRectTest.cpp
Commit message (Collapse)AuthorAge
* make rrect's more self-consistent, check drawable indexGravatar Mike Reed2018-01-19
| | | | | | | | Bug: skia:7403 Change-Id: Ifb8f9ffce2acb1c6f1ebc6c733ad3b6c0865409a Reviewed-on: https://skia-review.googlesource.com/91503 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Kevin Lubick <kjlubick@google.com>
* Don't canonicalize empty SkRRects. They stroke differently.Gravatar Brian Salomon2017-12-19
| | | | | | | | | | | | Make insetting greater than width or height collapse to a point/line. SkPath::addRRect() doesn't ignore an empty SkRRect. Change-Id: I933a3419a6d75be534f1d8328faa715772045f67 Reviewed-on: https://skia-review.googlesource.com/85680 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* Disallow negative radii in deserialized SkRRectsGravatar Brian Salomon2017-11-27
| | | | | | | | | bug= chromium:787124 Change-Id: I232ccd6bdfc2c176f97b97e24eabad6a9ce8e5e2 Reviewed-on: https://skia-review.googlesource.com/73901 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* move parts of SkPoint to SkPointPrivGravatar Cary Clark2017-11-08
| | | | | | | | | | | | Move specialized SkPoint methods to SkPointPriv. Use constexpr and inline initialization where possible. R=reed@google.com,bsalomon@google.com Bug: skia: 6898 Change-Id: I01ec5186f010f2dc80c068c70d9cc352f3221338 Reviewed-on: https://skia-review.googlesource.com/68700 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Ravi Mistry <rmistry@google.com>
* Extra safety for SkRRect.Gravatar Brian Salomon2017-09-20
| | | | | | | | | | | | | This moves closer to ensuring that all SkRRects are valid. It also checks for validity of deserialized SkRRects and sets the SkRRect to empty if the serialized data is invalid rather than asserting. It is still possible to use mutators to create invalid SkRRects (e.g. outset() by large number, translate() so that type changes due to fp precision). Bug: skia: Change-Id: Ice5f73a020e99739ef4b3ce362181d3dbb35701c Reviewed-on: https://skia-review.googlesource.com/49220 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
* stop using SkScalarMulGravatar Mike Reed2017-02-14
| | | | | | | | | BUG=skia: Change-Id: Ie41d8665a1c62ba8eddc93d8cfefaf64ddc52ff8 Reviewed-on: https://skia-review.googlesource.com/8411 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Style bikeshed - remove extraneous whitespaceGravatar halcanary2016-03-29
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1842753002 Review URL: https://codereview.chromium.org/1842753002
* Handle inverted rects in SkRRect creation methodsGravatar robertphillips2015-09-29
| | | | | | | | An alternative way of addressing this is to alter SkCanvas::drawRoundRect to just reject isEmpty (i.e., un-sorted or truly empty) input rects. BUG=skia:3786 Review URL: https://codereview.chromium.org/1373293002
* Fix bug with very large round rects with large radiiGravatar robertphillips2015-03-13
| | | | | | BUG=463920 Review URL: https://codereview.chromium.org/998903003
* Fix radii scaling bug in SkRRect::setNinePatchGravatar robertphillips2015-02-24
| | | | | | BUG=skia:3466 Review URL: https://codereview.chromium.org/951323004
* fix more tricky-float cases in SkRRect validateGravatar reed2015-02-13
| | | | | | BUG=458524,458522 Review URL: https://codereview.chromium.org/921163003
* remove dead SkPersp macrosGravatar reed2015-01-20
| | | | | | | BUG=skia: TBR= Review URL: https://codereview.chromium.org/864713002
* Fix RRect tranform bugGravatar robertphillips2014-06-27
| | | | | | | | | | | When a RRect is an oval transforming the rectangle and the radii separately can result in a non-oval result (i.e., due to numerical issues some tiny straight edges may creep in). This CL remedies the situation by computing the new radii directly from the transformed rect. BUG=skia:2696 R=caryclark@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/354913004
* Add nine patch type to SkRRect.Gravatar commit-bot@chromium.org2014-03-17
| | | | | | | | | | | | | | BUG=skia:2181 Committed: http://code.google.com/p/skia/source/detail?r=13833 R=robertphillips@google.com, reed@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/196343015 git-svn-id: http://skia.googlecode.com/svn/trunk@13839 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert of Add nine patch type to SkRRect. ↵Gravatar commit-bot@chromium.org2014-03-17
| | | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/196343015/) Reason for revert: causes tests to have infinite loop Original issue's description: > Add nine patch type to SkRRect. > > BUG=skia:2181 > > Committed: http://code.google.com/p/skia/source/detail?r=13833 R=robertphillips@google.com, reed@google.com TBR=reed@google.com, robertphillips@google.com NOTREECHECKS=true NOTRY=true BUG=skia:2181 Author: bsalomon@google.com Review URL: https://codereview.chromium.org/202163004 git-svn-id: http://skia.googlecode.com/svn/trunk@13837 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add nine patch type to SkRRect.Gravatar commit-bot@chromium.org2014-03-17
| | | | | | | | | | | BUG=skia:2181 R=robertphillips@google.com, reed@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/196343015 git-svn-id: http://skia.googlecode.com/svn/trunk@13833 2bbb7eff-a529-9590-31e7-b0007b416f81
* 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
* 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
* Add SkRRect::transform.Gravatar scroggo@google.com2013-11-05
| | | | | | | | | | | | | | | | | | Much like SkPath::transform, it transforms an SkRRect based on an SkMatrix. Unlike SkPath::transform, it will fail for matrices that contain perspective or skewing. Required by a future change (https://codereview.chromium.org/48623006) to speed up drawing large blurry rounded rectangles by using ninepatches. TODO: This could easily support 90 degree rotations, if desired. BUG=https://b.corp.google.com/issue?id=11174385 R=reed@google.com, robertphillips@google.com Review URL: https://codereview.chromium.org/52703003 git-svn-id: http://skia.googlecode.com/svn/trunk@12132 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove contains(x,y) for rects and rrects ... not well defined, and unusedGravatar reed@google.com2013-10-30
| | | | | | | | | BUG= R=robertphillips@google.com Review URL: https://codereview.chromium.org/51953003 git-svn-id: http://skia.googlecode.com/svn/trunk@12022 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2013-04-26
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@8873 2bbb7eff-a529-9590-31e7-b0007b416f81
* Added "SkRRect::contains(const SkRect&) const"Gravatar robertphillips@google.com2013-04-25
| | | | | | | | https://codereview.chromium.org/14200044/ git-svn-id: http://skia.googlecode.com/svn/trunk@8854 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix warings. add SkTAbs()Gravatar reed@google.com2013-01-08
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@7075 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2012-12-24
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@6936 2bbb7eff-a529-9590-31e7-b0007b416f81
* add SkRRect::inset(), which mimics strokingGravatar mike@reedtribe.org2012-12-23
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@6935 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fixed remaining clang compiler warningsGravatar robertphillips@google.com2012-12-03
| | | | | | | | https://codereview.appspot.com/6865053/ git-svn-id: http://skia.googlecode.com/svn/trunk@6646 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2012-11-30
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@6632 2bbb7eff-a529-9590-31e7-b0007b416f81
* SkRoundRect startGravatar robertphillips@google.com2012-11-29
https://codereview.appspot.com/6815058/ git-svn-id: http://skia.googlecode.com/svn/trunk@6595 2bbb7eff-a529-9590-31e7-b0007b416f81