aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkRect.h
Commit message (Collapse)AuthorAge
* helper to SkRect to create from SkISizeGravatar reed2016-09-12
| | | | | | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2332733002 TBR= NOTREECHECKS=True NOTRY=True Review-Url: https://codereview.chromium.org/2332733002
* In GrShape detect that stroked axis-aligned lines are rrects.Gravatar bsalomon2016-07-18
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2151313002 Review-Url: https://codereview.chromium.org/2151313002
* Revert of try to speed-up maprect + round2i + contains (patchset #8 ↵Gravatar msarett2016-07-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | id:140001 of https://codereview.chromium.org/2133413002/ ) Reason for revert: Breaking the roll... https://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/253294/steps/compile%20%28with%20patch%29/logs/stdio Original issue's description: > try to speed-up maprect + round2i + contains > > We call roundOut in a few places. If we can get SkNx::Ceil we could efficiently implement that as well. > > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2133413002 > CQ_INCLUDE_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot > > Committed: https://skia.googlesource.com/skia/+/b42b785d1cbc98bd34aceae338060831b974f9c5 TBR=mtklein@google.com,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/2136343002
* try to speed-up maprect + round2i + containsGravatar reed2016-07-11
| | | | | | | | | | We call roundOut in a few places. If we can get SkNx::Ceil we could efficiently implement that as well. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2133413002 CQ_INCLUDE_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Review-Url: https://codereview.chromium.org/2133413002
* Add bounds to GrShapeGravatar bsalomon2016-05-13
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1970003003 Review-Url: https://codereview.chromium.org/1970003003
* Cleanups related to SkFixed.Gravatar benjaminwagner2016-02-25
| | | | | | | | | | | | | | | | | | | | | This CL relands https://codereview.chromium.org/1683743005/ with two fixes: - Removing the test for vertical text. Vertical text doesn't work on Windows and breakText isn't supported for non-trivial text. - Omit PaintBreakTextTest in Google3 because we don't have the correct font setup yet. Remove SK_FixedNaN. It does not seem to be supported or used anywhere in Skia, Chromium, Android, or Google3, (except accidentally by TwoPtRadial::kDontDrawT). I think supporting it would erase any benefit of SkFixed over float. Remove SkBitmapFilter::lookup. It does not appear to be used anywhere in Skia, Chromium, Android, or Google3. Fix a bug in SkPaint::breakText that limited it to ~5kB of text. Now it can handle more than 1GB. BUG=skia:4632 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1683743005 Committed: https://skia.googlesource.com/skia/+/7ea5cb18389db11a94175de95c9db2b44972630c patch from issue 1683743005 at patchset 120001 (http://crrev.com/1683743005#ps120001) Review URL: https://codereview.chromium.org/1739453002
* Revert of Simple cleanups related to SkFixed. (patchset #4 id:120001 of ↵Gravatar benjaminwagner2016-02-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1683743005/ ) Reason for revert: New test is failing on Windows. Original issue's description: > Cleanups related to SkFixed. > > Remove SK_FixedNaN. It does not seem to be supported or used anywhere in Skia, Chromium, Android, or Google3, (except accidentally by TwoPtRadial::kDontDrawT). I think supporting it would erase any benefit of SkFixed over float. > > Remove SkBitmapFilter::lookup. It does not appear to be used anywhere in Skia, Chromium, Android, or Google3. > > Fix a bug in SkPaint::breakText that limited it to ~5kB of text. Now it can handle more than 1GB. > > BUG=skia:4632 > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1683743005 > > Committed: https://skia.googlesource.com/skia/+/7ea5cb18389db11a94175de95c9db2b44972630c TBR=mtklein@google.com,reed@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:4632 Review URL: https://codereview.chromium.org/1724283003
* Cleanups related to SkFixed.Gravatar benjaminwagner2016-02-24
| | | | | | | | | | | | | Remove SK_FixedNaN. It does not seem to be supported or used anywhere in Skia, Chromium, Android, or Google3, (except accidentally by TwoPtRadial::kDontDrawT). I think supporting it would erase any benefit of SkFixed over float. Remove SkBitmapFilter::lookup. It does not appear to be used anywhere in Skia, Chromium, Android, or Google3. Fix a bug in SkPaint::breakText that limited it to ~5kB of text. Now it can handle more than 1GB. BUG=skia:4632 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1683743005 Review URL: https://codereview.chromium.org/1683743005
* handle halfway case in scan converterGravatar caryclark2016-01-04
| | | | | | | | | | | | | | | | | Scan edges that start at exactly -0.5 aren't trimmed by clipping or by rounding, triggering a debug assert. One way to fix this is to round the top and left down instead of up. Also, move the path initialization of gm/composeshader.cpp to make debugging other path problems easier. R=reed@google.com BUG=skia:2715 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1544873002 Review URL: https://codereview.chromium.org/1544873002
* Simple CL to add a joinWithPossiblyEmptyArg to SkRectGravatar joshualitt2015-05-01
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1118293002
* Remove useless SkASSERT in SkRect.h and SkRegion.hGravatar dongseong.hwang2015-04-28
| | | | | | | | | The pointer of reference is always not-null. It causes >50k lines of warnning when chromium is compiled by clang. Warning looks like ../../third_party/skia/include/core/SkRect.h:284:19: warning: reference cannot be bound to dereferenced null pointer in well-defined C++ code; pointer may be assumed to always convert to true [-Wundefined-bool-conversion] do { if (&r) break; SkNO_RETURN_HINT(); SkDebugf_FileLine("../../third_party/skia/include/core/SkRect.h", 284, false, "%s:%d: failed assertion \"%s\"\n", "../../third_party/skia/include/core/SkRect.h", 284, "&r"); SkDebugf_FileLine("../../third_party/skia/include/core/SkRect.h", 284, true, "SK_CRASH"); } while (false); Review URL: https://codereview.chromium.org/1111013002
* some utils for rect and matrixGravatar reed2015-03-13
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1003813003
* I'd really like to land this before the branch so speedy reviews are ↵Gravatar joshualitt2015-02-25
| | | | | | | | | | appreciated. BUG=skia: Committed: https://skia.googlesource.com/skia/+/586d5d640b19860dfbbd903a5188da1bbbe87336 Review URL: https://codereview.chromium.org/936943002
* Revert of Pass clip to context (patchset #8 id:180001 of ↵Gravatar joshualitt2015-02-25
| | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/936943002/) Reason for revert: Strange blur problems on nexus 5 Original issue's description: > I'd really like to land this before the branch so speedy reviews are appreciated. > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/586d5d640b19860dfbbd903a5188da1bbbe87336 TBR=jvanverth@google.com,senorblanco@google.com,bsalomon@google.com,senorblanco@chromium.org,joshualitt@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/956083002
* I'd really like to land this before the branch so speedy reviews are ↵Gravatar joshualitt2015-02-25
| | | | | | | | appreciated. BUG=skia: Review URL: https://codereview.chromium.org/936943002
* Move clip off of draw targetGravatar joshualitt2015-02-23
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/947443003
* It is dangerous to ignore SkRect::intersect's return valueGravatar robertphillips2015-01-07
| | | | | | Committed: https://skia.googlesource.com/skia/+/152f524fd325b7776b01f84afbfe2fa071648a05 Review URL: https://codereview.chromium.org/833943002
* Revert of It is dangerous to ignore SkRect::intersect's return value ↵Gravatar robertphillips2015-01-07
| | | | | | | | | | | | | | | | | | (patchset #6 id:100001 of https://codereview.chromium.org/833943002/) Reason for revert: Still more Chromium clean up to do Original issue's description: > It is dangerous to ignore SkRect::intersect's return value > > Committed: https://skia.googlesource.com/skia/+/152f524fd325b7776b01f84afbfe2fa071648a05 TBR=reed@google.com NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/825983005
* It is dangerous to ignore SkRect::intersect's return valueGravatar robertphillips2015-01-07
| | | | Review URL: https://codereview.chromium.org/833943002
* add sample for arcToGravatar reed2014-12-16
| | | | | | | BUG=skia: TBR= Review URL: https://codereview.chromium.org/808793002
* pass dst-rect through from drawBitmapRect for better precisionGravatar reed2014-12-15
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/797963002
* Rewrite NaN checks in terms of SkScalarIsNaN()Gravatar ehsan.akhgari2014-12-15
| | | | | | | | | | We are trying to replace Skia's NaN checker with our own in Mozilla, so it would be nice to have to patch a single place by making sure these NaN checks used SkScalarIsNaN(). BUG=skia: Review URL: https://codereview.chromium.org/809443002
* add dumpHex option to rect and rrect, to match pathGravatar reed2014-12-15
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/801383002
* add roundOut that returns its resultGravatar reed2014-11-19
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/742663002
* change roundOut() to take a dst, so we can use that signature to return IRectGravatar reed2014-11-18
| | | | | | | BUG=skia: TBR=robertphilips Review URL: https://codereview.chromium.org/731373003
* Optimize SkRect::sort()Gravatar qiankun.miao2014-11-03
| | | | | | | | | This optimization can reduce comparison and assignments. For geo_rect_sort benchmark, performance improved to 1.63us from 3.28us. BUG=skia: Review URL: https://codereview.chromium.org/695443005
* add tests for large cordinates bounds when building aaclipGravatar reed2014-10-15
| | | | | | | BUG=skia: TBR= Review URL: https://codereview.chromium.org/658753002
* faster SkRect::sortGravatar reed2014-10-10
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/646863002
* cleanup and optimize rect intersect routinesGravatar reed2014-10-09
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/640723004
* add SkRect::joinNonEmptyArg for faster unioningGravatar reed2014-10-01
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/619853005
* update to accommodate latest clang in chrome toolchainGravatar caryclark2014-09-18
| | | | | | | | | | | remove asserts for null pointers to references change var args signature to pointer instead of array R=mtklein@google.com, reed@android.com, reed@google.com, mtklein, reed Author: caryclark@google.com Review URL: https://codereview.chromium.org/577243002
* 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 makeOffset and makeInset to SkRectGravatar reed2014-06-02
| | | | | | | | | | TBR=bsalomon precursor for https://codereview.chromium.org/306013010 Author: reed@google.com Review URL: https://codereview.chromium.org/306893012
* add rounding-using-doubles methods on SkScalar and SkRectGravatar commit-bot@chromium.org2014-05-05
| | | | | | | | | | | | | | | Inspired by the excellent repro case for https://crbug.com/364224 patch from issue 265933010 BUG=skia: R=bungeman@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/267003002 git-svn-id: http://skia.googlecode.com/svn/trunk@14566 2bbb7eff-a529-9590-31e7-b0007b416f81
* speedup SkRect::intersectGravatar mike@reedtribe.org2014-01-01
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@12851 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
* Revert "Revert "speed up A8 by creating a new entry-point in SkDraw that ↵Gravatar reed@google.com2013-11-07
| | | | | | | | | | | | blits the path's coverage directly into an A8 target, regardless of the previous pixel values."" This reverts commit 3c77887b3eb2d32ab668ab4e5f2f9e79103956e8. BUG= Review URL: https://codereview.chromium.org/50673005 git-svn-id: http://skia.googlecode.com/svn/trunk@12167 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "speed up A8 by creating a new entry-point in SkDraw that blits the ↵Gravatar reed@google.com2013-11-04
| | | | | | | | | | | | | | | | path's coverage directly into an A8 target, regardless of the previous pixel values." This reverts commit d615e839b71f75df895de6850b774a9e1c28ad2a. Revert "must initialize SkDraw.fClip" This reverts commit 108e46d29b5f57927fc8b8c403bb52019d8cb16d. BUG= Review URL: https://codereview.chromium.org/57883006 git-svn-id: http://skia.googlecode.com/svn/trunk@12122 2bbb7eff-a529-9590-31e7-b0007b416f81
* speed up A8 by creating a new entry-point in SkDraw that blits the path's ↵Gravatar reed@google.com2013-11-04
| | | | | | | | | | coverage directly into an A8 target, regardless of the previous pixel values. R=bsalomon@google.com, mtklein@google.com Review URL: https://codereview.chromium.org/56453002 git-svn-id: http://skia.googlecode.com/svn/trunk@12118 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "Revert "add SK_ATTR_DEPRECATED -- will need to disable for chrome, ↵Gravatar reed@google.com2013-10-31
| | | | | | | | | | | | since it triggers a warning"" This reverts commit 1e787c38fa71f2a21fd728f1b1d620b9b09b0d3d. BUG= Review URL: https://codereview.chromium.org/54603004 git-svn-id: http://skia.googlecode.com/svn/trunk@12057 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "add SK_ATTR_DEPRECATED -- will need to disable for chrome, since it ↵Gravatar reed@google.com2013-10-31
| | | | | | | | triggers a warning" This reverts commit 1d22c4aaf9d8f053f25194a1ed74b137bfb19497. git-svn-id: http://skia.googlecode.com/svn/trunk@12056 2bbb7eff-a529-9590-31e7-b0007b416f81
* add SK_ATTR_DEPRECATED -- will need to disable for chrome, since it triggers ↵Gravatar reed@google.com2013-10-31
| | | | | | | | | | | a warning BUG= R=robertphillips@google.com, senorblanco@chromium.org, vandebo@chromium.org Review URL: https://codereview.chromium.org/51033004 git-svn-id: http://skia.googlecode.com/svn/trunk@12055 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
* Change SkImageFilter's cropRect from SkIRect to a CropRect struct, ↵Gravatar senorblanco@chromium.org2013-10-10
| | | | | | | | | | | | | | containing an SkRect and flags indicating which parameters are set. NOTE: this will require SK_CROP_RECT_IS_INT=1 to be set in Chrome until Blink has been updated to use SkImageFilter::CropRect. Include https://codereview.chromium.org/26528002/ with the Skia roll. Note also that SK_CROP_RECT_IS_INT is a temporary measure until all call sites in Blink have been updated to use SkRect. R=reed@google.com Review URL: https://codereview.chromium.org/26371002 git-svn-id: http://skia.googlecode.com/svn/trunk@11692 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert 11247, 11250, 11251, 11257, and 11279 to unblock DEPS roll ↵Gravatar robertphillips@google.com2013-09-16
| | | | | | | | | | | | | | (https://codereview.chromium.org/24159002/) 11279 Sanitizing source files in Housekeeper-Nightly - https://code.google.com/p/skia/source/detail?r=11279 11257 Canary build fix - https://codereview.chromium.org/23532068 11251 More warnings as errors fixes - https://code.google.com/p/skia/source/detail?r=11251 11250 Warnings as errors fix - https://code.google.com/p/skia/source/detail?r=11250 11247 Initial error handling code - https://chromiumcodereview.appspot.com/23021015 git-svn-id: http://skia.googlecode.com/svn/trunk@11288 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert the revert of 11247, 11250, 11251 and 11279 (Chrome already relies on ↵Gravatar robertphillips@google.com2013-09-16
| | | | | | changes in r11247) git-svn-id: http://skia.googlecode.com/svn/trunk@11287 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert 11247, 11250, 11251 and 11279 to unblock DEPS roll ↵Gravatar robertphillips@google.com2013-09-16
| | | | | | | | | | | | | (https://codereview.chromium.org/24159002/) 11279 Sanitizing source files in Housekeeper-Nightly - https://code.google.com/p/skia/source/detail?r=11279 11251 More warnings as errors fixes - https://code.google.com/p/skia/source/detail?r=11251 11250 Warnings as errors fix - https://code.google.com/p/skia/source/detail?r=11250 11247 Initial error handling code - https://chromiumcodereview.appspot.com/23021015 git-svn-id: http://skia.googlecode.com/svn/trunk@11285 2bbb7eff-a529-9590-31e7-b0007b416f81
* Initial error handling codeGravatar commit-bot@chromium.org2013-09-13
| | | | | | | | | | | | | I made it as simple as possible. The impact seems minimal and it should do what's necessary to make this code secure. BUG= R=reed@google.com, scroggo@google.com, djsollen@google.com, sugoi@google.com, bsalomon@google.com, mtklein@google.com, senorblanco@google.com, senorblanco@chromium.org Author: sugoi@chromium.org Review URL: https://chromiumcodereview.appspot.com/23021015 git-svn-id: http://skia.googlecode.com/svn/trunk@11247 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix bounds computation in GrAAHairlineRendererGravatar commit-bot@chromium.org2013-09-03
| | | | | | | | | | R=robertphillips@google.com, jvanverth@google.com Author: bsalomon@google.com Review URL: https://chromiumcodereview.appspot.com/23684008 git-svn-id: http://skia.googlecode.com/svn/trunk@11054 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add blend optimization helpers and use to convert rect draws to clears.Gravatar commit-bot@chromium.org2013-08-14
| | | | | | | | | | R=robertphillips@google.com, jvanverth@google.com Author: bsalomon@google.com Review URL: https://chromiumcodereview.appspot.com/22558003 git-svn-id: http://skia.googlecode.com/svn/trunk@10723 2bbb7eff-a529-9590-31e7-b0007b416f81