aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkRRect.h
Commit message (Collapse)AuthorAge
* 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>
* 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>
* abort SkRRect::transform() before dst->scaleRadii() assertsGravatar Mike Klein2017-10-12
| | | | | | | | | | | | | | | | If we've got a crazy matrix, we can make dst arbitrarily crazy. This should fix several of Kevin's fuzzes, e.g. Bug: skia:7090 I don't see any uses of SkRRect::transform() that care about the output rrect in case of failure, so I've just removed the guarantee that we don't modify it when failing. Change-Id: I4c81af59a093a984f0a02a0d3dc4bbbb1fb935f2 Reviewed-on: https://skia-review.googlesource.com/58620 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Serialize rrect/oval paths as rrects rather than points and verbs.Gravatar Brian Salomon2017-09-21
| | | | | | | | | This is a step towards not trusting deserialized isoval/isrrect for general paths without losing the performance advantages of knowing that a path is a rrect/oval. Change-Id: I1a8c0608c0f29f4bf7a118dfa1d475e2ab5802ea Reviewed-on: https://skia-review.googlesource.com/49761 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@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>
* Validate rrect type in SkRRect::isValidGravatar Adrienne Walker2017-08-23
| | | | | | | | Bug: chromium: 758161 Change-Id: I2472ff59af2fab05d94d88d5effb44828e8a5132 Reviewed-on: https://skia-review.googlesource.com/37800 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
* Circular shadow fixes for Flutter.Gravatar Jim Van Verth2017-04-21
| | | | | | | | | | | | | | * Fix spot shadow placement for SkSpotShadowMaskFilter. * Make sure we don't try to render an oval as a plain RRect due to floating point error. * Use fast path for uncached circles. * Make sure ShadowMaskFilters can handle near-circles. Change-Id: Ia9967a00a6e1c980a1c0a7ba8248f09fde61a3b7 Reviewed-on: https://skia-review.googlesource.com/13969 Reviewed-by: Jim Van Verth <jvanverth@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
* Add validation of RRects to SkValidatingReadBufferGravatar Robert Phillips2016-09-23
| | | | | | | | | | | This comes from the Skia fuzzer where it is inverting the RRect's rect which causes trouble down the line. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2591 Change-Id: I5c34105a47369492d2df99d39a4e29116060ad37 Reviewed-on: https://skia-review.googlesource.com/2591 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
* Attempt to throw away rrect clips of rrects.Gravatar bsalomon2016-08-15
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2241273003 Review-Url: https://codereview.chromium.org/2241273003
* Make GrShape track the winding direction and starting point for rrect types.Gravatar bsalomon2016-06-06
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2042813002 Review-Url: https://codereview.chromium.org/2042813002
* make transformed rrect radii fit rectangleGravatar caryclark2016-02-23
| | | | | | | | | one more case caught by 1M skps R=herb@google.com,reed@google.com BUG=skia:4413 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1722483003 Review URL: https://codereview.chromium.org/1722483003
* Split big rrect aa effect up into separate imagesGravatar bsalomon2015-12-09
| | | | | | | | Needed to enlarge radii to surface bugs without exceeding max texture size on low end devices. BUG=chromium:477684 Review URL: https://codereview.chromium.org/1508003008
* 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
* Add special case circle blur for GaneshGravatar robertphillips2015-09-15
| | | | | | | | This makes the blurcircles bench go from ~33us to ~8us on Windows desktop. It will require layout test suppressions Review URL: https://codereview.chromium.org/1311583005
* api helpers inspired by blink use-casesGravatar reed2015-08-09
| | | | | | | BUG=skia: TBR= Review URL: https://codereview.chromium.org/1278323002
* Fill SkRRect::fType proactively.Gravatar mtklein2014-12-18
| | | | | | | | | | | I found no external mentions of SkRRect::kUnknown_Type. Motivating race found by TSAN: http://build.chromium.org/p/client.skia/builders/Test-Ubuntu13.10-GCE-NoGPU-x86_64-Release-TSAN-Trybot/builds/48/steps/dm/logs/stdio BUG=skia: Review URL: https://codereview.chromium.org/801693003
* add dumpHex option to rect and rrect, to match pathGravatar reed2014-12-15
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/801383002
* explicitly size fType in SkRRect, to ensure the are no uninitialized bytesGravatar reed2014-10-22
| | | | | | | | (so it can be used as a key in a cache) BUG=skia: Review URL: https://codereview.chromium.org/670183002
* Add dump() to SkClipStack to help with debugging.Gravatar bsalomon2014-06-09
| | | | | | | | R=robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/311263015
* 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
* Add effect-based clip for nine-patch SkRRects.Gravatar commit-bot@chromium.org2014-03-13
| | | | | | | | | | | BUG=skia:2181 R=jvanverth@google.com, robertphillips@google.com, rmistry@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/194703011 git-svn-id: http://skia.googlecode.com/svn/trunk@13794 2bbb7eff-a529-9590-31e7-b0007b416f81
* plumbing for GPU fast blurGravatar commit-bot@chromium.org2014-03-10
| | | | | | | | | | | BUG=skia:2281 R=bsalomon@google.com Author: humper@google.com Review URL: https://codereview.chromium.org/193193002 git-svn-id: http://skia.googlecode.com/svn/trunk@13735 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Housekeeper-NightlyGravatar skia.committer@gmail.com2014-03-05
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@13665 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add GM that directly tests GrRRectEffect and add inverse fill version of effect.Gravatar commit-bot@chromium.org2014-03-04
| | | | | | | | | | | BUG=skia: R=robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/176843016 git-svn-id: http://skia.googlecode.com/svn/trunk@13653 2bbb7eff-a529-9590-31e7-b0007b416f81
* Analytic rrect clip for cicular corners, radius >= 0.5Gravatar commit-bot@chromium.org2014-02-19
| | | | | | | | | | | BUG=skia:2181 R=robertphillips@google.com, jvanverth@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/171413004 git-svn-id: http://skia.googlecode.com/svn/trunk@13498 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make canvas pass rrects along to clip stackGravatar commit-bot@chromium.org2014-02-16
| | | | | | | | | | | BUG=skia:2181 R=robertphillips@google.com, reed@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/167283004 git-svn-id: http://skia.googlecode.com/svn/trunk@13470 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
* Checking structure sizes before reading them from memory to avoid ↵Gravatar commit-bot@chromium.org2013-11-05
| | | | | | | | | | | | | | | | | overflowing the buffer's stream. BUG= R=reed@google.com, mtklein@google.com, senorblanco@chromium.org Committed: https://code.google.com/p/skia/source/detail?r=12114 Committed: https://code.google.com/p/skia/source/detail?r=12119 Author: sugoi@chromium.org Review URL: https://codereview.chromium.org/41253002 git-svn-id: http://skia.googlecode.com/svn/trunk@12130 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "Checking structure sizes before reading them from memory to avoid ↵Gravatar reed@google.com2013-11-04
| | | | | | | | overflowing the buffer's stream." This reverts commit 6bc22e8ef1ea70a1b58409aa21254358c50f149a. git-svn-id: http://skia.googlecode.com/svn/trunk@12124 2bbb7eff-a529-9590-31e7-b0007b416f81
* Checking structure sizes before reading them from memory to avoid ↵Gravatar sugoi@google.com2013-11-04
| | | | | | | | | | | | | overflowing the buffer's stream. BUG= R=reed@google.com Committed: https://code.google.com/p/skia/source/detail?r=12114 Review URL: https://codereview.chromium.org/41253002 git-svn-id: http://skia.googlecode.com/svn/trunk@12119 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert r12114 due to https://code.google.com/p/skia/issues/detail?id=1794 ↵Gravatar epoger@google.com2013-11-04
| | | | | | ('Assertion failures on various buildbots as of r12114') git-svn-id: http://skia.googlecode.com/svn/trunk@12115 2bbb7eff-a529-9590-31e7-b0007b416f81
* Checking structure sizes before reading them from memory to avoid ↵Gravatar sugoi@google.com2013-11-04
| | | | | | | | | | | overflowing the buffer's stream. BUG= R=reed@google.com Review URL: https://codereview.chromium.org/41253002 git-svn-id: http://skia.googlecode.com/svn/trunk@12114 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
* Split SkDevice into SkBaseDevice and SkBitmapDeviceGravatar robertphillips@google.com2013-08-29
| | | | | | | | https://codereview.chromium.org/22978012/ git-svn-id: http://skia.googlecode.com/svn/trunk@10995 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert r10830 (Split SkDevice out of SkRasterDevice) until we can get ↵Gravatar robertphillips@google.com2013-08-20
| | | | | | Chromium ready. git-svn-id: http://skia.googlecode.com/svn/trunk@10835 2bbb7eff-a529-9590-31e7-b0007b416f81
* Split SkDevice out of SkBitmapDeviceGravatar robertphillips@google.com2013-08-20
| | | | | | | | https://codereview.chromium.org/22978012/ git-svn-id: http://skia.googlecode.com/svn/trunk@10830 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
* Upstream changes from Android.Gravatar djsollen@google.com2013-03-08
| | | | | | Review URL: https://codereview.chromium.org/12699002 git-svn-id: http://skia.googlecode.com/svn/trunk@8045 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
* move inset out of SkRRect.h for now, and add experimental versions to gmGravatar mike@reedtribe.org2012-12-17
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@6833 2bbb7eff-a529-9590-31e7-b0007b416f81
* add gm for rrect, and rrect.inset/outsetGravatar mike@reedtribe.org2012-12-17
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@6832 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2012-12-13
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@6774 2bbb7eff-a529-9590-31e7-b0007b416f81
* revert 6766, thereby re-landing 6762-6763 now that the bots are readyGravatar reed@google.com2012-12-12
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@6770 2bbb7eff-a529-9590-31e7-b0007b416f81
* revert 6762-6763, since those require new skps to be generated, and we can'tGravatar reed@google.com2012-12-12
| | | | | | | | do that immediately right now... will re-submit when we can. git-svn-id: http://skia.googlecode.com/svn/trunk@6766 2bbb7eff-a529-9590-31e7-b0007b416f81
* make RRect and Oval first-class drawing primitives in SkCanvas.Gravatar reed@google.com2012-12-12
| | | | | | | add RRect as a first-class clip primitive. Review URL: https://codereview.appspot.com/6923058 git-svn-id: http://skia.googlecode.com/svn/trunk@6762 2bbb7eff-a529-9590-31e7-b0007b416f81
* Tweak an enum declaration to make the clang compiler happy.Gravatar tomhudson@google.com2012-12-03
| | | | | | | | | | | This exposes our "unknown type" to users, which is a loss of encapsulation. TBR=robertphillips http://codereview.appspot.com/6865050/ git-svn-id: http://skia.googlecode.com/svn/trunk@6641 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
* Add newline at end of SkRRect.hGravatar robertphillips@google.com2012-11-29
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@6596 2bbb7eff-a529-9590-31e7-b0007b416f81