aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkRasterClip.cpp
Commit message (Collapse)AuthorAge
* rename overloaded methods as speculative fix/diagnosticGravatar Mike Reed2017-11-15
| | | | | | | | Bug:783136 Change-Id: I95df299bd9e1c6263b8e79b23fbe90340bd950e9 Reviewed-on: https://skia-review.googlesource.com/72240 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* Replace SkFAIL with SK_ABORT.Gravatar Ben Wagner2017-08-16
| | | | | | | | | | | | SkFAIL is a legacy macro which is just SK_ABORT. This CL mechanically changes uses of SkFAIL to SK_ABORT in preparation for its removal. The related sk_throw macro will be changed independently, due to needing to actually clean up its users. Change-Id: Id70b5c111a02d2458dc60c8933f444df27d9cebb Reviewed-on: https://skia-review.googlesource.com/35284 Reviewed-by: Derek Sollenberger <djsollen@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* add test and fix for canvas::isClipEmptyGravatar Mike Reed2017-03-23
| | | | | | | | | BUG=skia: Change-Id: I4e57e0da7111e861fbae1b88574bc1803442243c Reviewed-on: https://skia-review.googlesource.com/10046 Reviewed-by: Derek Sollenberger <djsollen@google.com> Commit-Queue: Derek Sollenberger <djsollen@google.com>
* test (and fix) clip_restriction in canvasGravatar Mike Reed2017-03-22
| | | | | | | | | BUG=skia: Change-Id: I86d25d0fd82be35d01471fba59f77b360be5373c Reviewed-on: https://skia-review.googlesource.com/9995 Reviewed-by: Derek Sollenberger <djsollen@google.com> Commit-Queue: Derek Sollenberger <djsollen@google.com>
* optimize intersect, use getType to utilize fast-case in preTranslateGravatar Mike Reed2017-03-07
| | | | | | | | | | | | | | | 10-15% speed up in clip_record_overhead bench Comparing the raw fType field was missing the (maybe deprecatable) IsRectToRect bit (0x10), which is set for identity and translate matrices, so we were never taking the fast case. BUG=skia: Change-Id: I1c73f4bae42f2311454c7568ef8891239c3cae83 Reviewed-on: https://skia-review.googlesource.com/9388 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Herb Derby <herb@google.com>
* Revert[6] "Remove SkDraw from device-draw methods, and enable device-centric ↵Gravatar Mike Reed2017-03-07
| | | | | | | | | | | | | | | | | clipping."""""" Previous failure was failure to detect that the clip wasn't wide-open when optimizing for retain-vs-discard in copy-on-write. gm:copy_on_write_retain detected this. Now fixed by adding new method to SkBaseDevice.h This reverts commit 27d07f0acb85eea4062075dfbe9148ce12d92c66. BUG=skia:6214 Change-Id: I532d16ec075a4525c2a550b1157bcec695dd8efd Reviewed-on: https://skia-review.googlesource.com/9341 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* Revert "Revert "Revert "Revert[2] "Remove SkDraw from device-draw methods, ↵Gravatar Mike Reed2017-03-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and enable device-centric clipping.""""" This reverts commit 025e2444c1f5a0c3cdc0bf60d1fa59941a0b5db4. Reason for revert: layouttest failures -- need to rebase these (tiny diffs in gradients) https://storage.googleapis.com/chromium-layout-test-archives/linux_trusty_blink_rel/6018/layout-test-results/results.html Original change's description: > Revert "Revert "Revert[2] "Remove SkDraw from device-draw methods, and enable device-centric clipping."""" > > This reverts commit baf06bc89a0ee2ac4033281e7310f6c727faab79. > > Reason for revert: reland to diagnose possible g3 failure > > Original change's description: > > Revert "Revert[2] "Remove SkDraw from device-draw methods, and enable device-centric clipping.""" > > > > This reverts commit cfaa63237b152ae216f1351207bce3ea9808814c. > > > > Reason for revert: speculative revert to fix Google3 > > > > Original change's description: > > > Revert[2] "Remove SkDraw from device-draw methods, and enable device-centric clipping."" > > > > > > passes new (augmented) CanvasClipType unittest > > > fixed rasterclipstack::setnewsize > > > > > > This reverts commit ea5e676a7b75600edcde3912886486004ccd7626. > > > > > > BUG=skia: > > > > > > Change-Id: I004653e0f4d01454662f8516fccab0046486f273 > > > Reviewed-on: https://skia-review.googlesource.com/9185 > > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > > Commit-Queue: Mike Reed <reed@google.com> > > > > > > > TBR=bsalomon@google.com,reed@google.com,reviews@skia.org > > NOPRESUBMIT=true > > NOTREECHECKS=true > > NOTRY=true > > BUG=skia: > > > > Change-Id: Ibd7ee6383999f008eb6ee59c1c3f1c06a86044ea > > Reviewed-on: https://skia-review.googlesource.com/9230 > > Reviewed-by: Cary Clark <caryclark@google.com> > > Commit-Queue: Cary Clark <caryclark@google.com> > > > > TBR=bsalomon@google.com,reviews@skia.org,caryclark@google.com,reed@google.com,mtklein@chromium.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=skia: > > Change-Id: I093fa8788056be39af01191bbf3a9e5de9f73954 > Reviewed-on: https://skia-review.googlesource.com/9244 > Reviewed-by: Mike Reed <reed@google.com> > Commit-Queue: Mike Reed <reed@google.com> > TBR=mtklein@chromium.org,bsalomon@google.com,reviews@skia.org,caryclark@google.com,reed@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Change-Id: I58f810a8ff241dbaf3133e2fe844548fcd0fa67a Reviewed-on: https://skia-review.googlesource.com/9245 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "Revert "Revert[2] "Remove SkDraw from device-draw methods, and ↵Gravatar Mike Reed2017-03-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | enable device-centric clipping."""" This reverts commit baf06bc89a0ee2ac4033281e7310f6c727faab79. Reason for revert: reland to diagnose possible g3 failure Original change's description: > Revert "Revert[2] "Remove SkDraw from device-draw methods, and enable device-centric clipping.""" > > This reverts commit cfaa63237b152ae216f1351207bce3ea9808814c. > > Reason for revert: speculative revert to fix Google3 > > Original change's description: > > Revert[2] "Remove SkDraw from device-draw methods, and enable device-centric clipping."" > > > > passes new (augmented) CanvasClipType unittest > > fixed rasterclipstack::setnewsize > > > > This reverts commit ea5e676a7b75600edcde3912886486004ccd7626. > > > > BUG=skia: > > > > Change-Id: I004653e0f4d01454662f8516fccab0046486f273 > > Reviewed-on: https://skia-review.googlesource.com/9185 > > Reviewed-by: Brian Salomon <bsalomon@google.com> > > Commit-Queue: Mike Reed <reed@google.com> > > > > TBR=bsalomon@google.com,reed@google.com,reviews@skia.org > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=skia: > > Change-Id: Ibd7ee6383999f008eb6ee59c1c3f1c06a86044ea > Reviewed-on: https://skia-review.googlesource.com/9230 > Reviewed-by: Cary Clark <caryclark@google.com> > Commit-Queue: Cary Clark <caryclark@google.com> > TBR=bsalomon@google.com,reviews@skia.org,caryclark@google.com,reed@google.com,mtklein@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Change-Id: I093fa8788056be39af01191bbf3a9e5de9f73954 Reviewed-on: https://skia-review.googlesource.com/9244 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "Revert[2] "Remove SkDraw from device-draw methods, and enable ↵Gravatar Cary Clark2017-03-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | device-centric clipping.""" This reverts commit cfaa63237b152ae216f1351207bce3ea9808814c. Reason for revert: speculative revert to fix Google3 Original change's description: > Revert[2] "Remove SkDraw from device-draw methods, and enable device-centric clipping."" > > passes new (augmented) CanvasClipType unittest > fixed rasterclipstack::setnewsize > > This reverts commit ea5e676a7b75600edcde3912886486004ccd7626. > > BUG=skia: > > Change-Id: I004653e0f4d01454662f8516fccab0046486f273 > Reviewed-on: https://skia-review.googlesource.com/9185 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Mike Reed <reed@google.com> > TBR=bsalomon@google.com,reed@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Change-Id: Ibd7ee6383999f008eb6ee59c1c3f1c06a86044ea Reviewed-on: https://skia-review.googlesource.com/9230 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Cary Clark <caryclark@google.com>
* Revert[2] "Remove SkDraw from device-draw methods, and enable device-centric ↵Gravatar Mike Reed2017-03-03
| | | | | | | | | | | | | | | | clipping."" passes new (augmented) CanvasClipType unittest fixed rasterclipstack::setnewsize This reverts commit ea5e676a7b75600edcde3912886486004ccd7626. BUG=skia: Change-Id: I004653e0f4d01454662f8516fccab0046486f273 Reviewed-on: https://skia-review.googlesource.com/9185 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Revert "Remove SkDraw from device-draw methods, and enable device-centric ↵Gravatar Mike Reed2017-03-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | clipping." This reverts commit c77e33f73d3e86cfabf925d6f2e1166f81022575. Reason for revert: breaks isClipRect - this CL inspected the conservative clip for this, which is (by definition) a rect - probably need to query the device for this info Original change's description: > Remove SkDraw from device-draw methods, and enable device-centric clipping. > > BUG=skia:6214 > > Change-Id: I593900724310d09133ae4791ef68d38c43762fc2 > Reviewed-on: https://skia-review.googlesource.com/8806 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Mike Reed <reed@google.com> > TBR=bsalomon@google.com,halcanary@google.com,msarett@google.com,robertphillips@google.com,fmalita@chromium.org,reed@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia:6214 Change-Id: I9090cbbb9f45b2dd204d9fdc187de2ff714b93f6 Reviewed-on: https://skia-review.googlesource.com/9172 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Remove SkDraw from device-draw methods, and enable device-centric clipping.Gravatar Mike Reed2017-03-02
| | | | | | | | | BUG=skia:6214 Change-Id: I593900724310d09133ae4791ef68d38c43762fc2 Reviewed-on: https://skia-review.googlesource.com/8806 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Mike Reed <reed@google.com>
* Add a method in SkCanvas to set "hard" clip bounds.Gravatar Stan Iliev2016-12-12
| | | | | | | | | | | | | Add SkCanvas::setBoundRect, which sets the max clip rectangle, which can be replaced by clipRect, clipRRect and clipPath. BUG=skia: Change-Id: Ie39eb1715214971576e7a1dda760c6997a7e0208 Reviewed-on: https://skia-review.googlesource.com/5359 Commit-Queue: Stan Iliev <stani@google.com> Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Derek Sollenberger <djsollen@google.com>
* Move clip CTM application to SkRasterClip and SkClipStackGravatar Brian Salomon2016-10-03
| | | | | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2866 Change-Id: I914a57d6ba128acc457e12586c99ba6766eb940c Reviewed-on: https://skia-review.googlesource.com/2866 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Florin Malita <fmalita@chromium.org>
* remove 'deprecated' region from SkDrawGravatar reed2016-04-27
| | | | | | | | | | | | | | | Most call-sites that used it just took its bounds, so it was trivial to convert them to get the bounds of the RasterClip. Two clients wanted the actual region: 1. layeriter for android 2. pdf Android already only has BW clips, so should be safe. PDF now overrides its clip methods to ensure that all clips are BW. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1925693002 Review URL: https://codereview.chromium.org/1925693002
* 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
* Fix for rounded-rect clips with filters.Gravatar senorblanco2016-02-02
| | | | | | | | | | | | Don't use the base canvas size to limit raster of complex clips, since the top canvas size may actually be larger (e.g., a blur filter which expands the clip bounds to accommodate filter margins). Use the top canvas bounds instead. BUG=skia:4879,471212 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1657333002 Review URL: https://codereview.chromium.org/1657333002
* Avoid devolving to a path when conservative clipping with RRectsGravatar robertphillips2015-11-23
| | | | Review URL: https://codereview.chromium.org/1461923004
* Style Change: NULL->nullptrGravatar halcanary2015-08-27
| | | | | | DOCS_PREVIEW= https://skia.org/?cl=1316233002 Review URL: https://codereview.chromium.org/1316233002
* add roundOut that returns its resultGravatar reed2014-11-19
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/742663002
* Revert of Revert of allow canvas to force conservative clips (for speed) ↵Gravatar reed2014-09-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (patchset #1 id:1 of https://codereview.chromium.org/554033003/) Reason for revert: May just rebaseline, plus want to see the results of the chrome tests, so re-trying this CL. Original issue's description: > Revert of allow canvas to force conservative clips (for speed) (patchset #7 id:120001 of https://codereview.chromium.org/541593005/) > > Reason for revert: > multipicturedraw failed on nvprmsaa -- don't know why yet > > Original issue's description: > > Allow SkCanvas to be initialized to force conservative rasterclips. This has the following effects: > > > > 1. Queries to the current clip will be conservatively large. This can mean the quickReject may return false more often. > > > > 2. The conservative clips mean less work is done. > > > > 3. Enabled by default for Gpu, Record, and NoSaveLayer canvases. > > > > 4. API is private for now. > > > > Committed: https://skia.googlesource.com/skia/+/27a5e656c3d6ef22f9cb34de18e1b960da3aa241 > > TBR=robertphillips@google.com,bsalomon@google.com,mtklein@google.com,junov@google.com > NOTREECHECKS=true > NOTRY=true > > Committed: https://skia.googlesource.com/skia/+/6f09709519b79a1159f3826645f1c5fbc101ee11 R=robertphillips@google.com, bsalomon@google.com, mtklein@google.com, junov@google.com, reed@google.com TBR=bsalomon@google.com, junov@google.com, mtklein@google.com, reed@google.com, robertphillips@google.com NOTREECHECKS=true NOTRY=true Author: reed@chromium.org Review URL: https://codereview.chromium.org/560713002
* Revert of allow canvas to force conservative clips (for speed) (patchset #7 ↵Gravatar reed2014-09-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | id:120001 of https://codereview.chromium.org/541593005/) Reason for revert: multipicturedraw failed on nvprmsaa -- don't know why yet Original issue's description: > Allow SkCanvas to be initialized to force conservative rasterclips. This has the following effects: > > 1. Queries to the current clip will be conservatively large. This can mean the quickReject may return false more often. > > 2. The conservative clips mean less work is done. > > 3. Enabled by default for Gpu, Record, and NoSaveLayer canvases. > > 4. API is private for now. > > Committed: https://skia.googlesource.com/skia/+/27a5e656c3d6ef22f9cb34de18e1b960da3aa241 R=robertphillips@google.com, bsalomon@google.com, mtklein@google.com, junov@google.com TBR=bsalomon@google.com, junov@google.com, mtklein@google.com, robertphillips@google.com NOTREECHECKS=true NOTRY=true Author: reed@google.com Review URL: https://codereview.chromium.org/554033003
* Allow SkCanvas to be initialized to force conservative rasterclips. This has ↵Gravatar reed2014-09-09
| | | | | | | | | | | | | | | | | | the following effects: 1. Queries to the current clip will be conservatively large. This can mean the quickReject may return false more often. 2. The conservative clips mean less work is done. 3. Enabled by default for Gpu, Record, and NoSaveLayer canvases. 4. API is private for now. R=robertphillips@google.com, bsalomon@google.com, mtklein@google.com, junov@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/541593005
* move rasterclip_ helper into rasterclipGravatar reed2014-09-05
| | | | | | | | R=robertphillips@google.com, reed@chromium.org Author: reed@google.com Review URL: https://codereview.chromium.org/546113002
* add isRect() check to AAClip, to detect if a soft-clip is really just an irectGravatar reed2014-08-07
| | | | | | | | | | | | | | | taken from (https://codereview.chromium.org/445233006/) fix: don't assume that the first yoffset is 0, since we may have performed a translate and not re-alloced our data. This reverts commit 0aeea6d344f12e35e29a79f4bbc48af88f913204. TBR= Author: reed@google.com Review URL: https://codereview.chromium.org/443353004
* Revert of add isRect() check to AAClip, to detect if a soft-clip is really ↵Gravatar reed2014-08-07
| | | | | | | | | | | | | | | | | | | | | | | | just an irect (https://codereview.chromium.org/445233006/) Reason for revert: new code asserts on some pictures Original issue's description: > add isRect() check to AAClip, to detect if a soft-clip is really just an irect > > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/592cb8d552556b1e922887d506d00b64bc5d0547 R=bsalomon@google.com, humper@google.com TBR=bsalomon@google.com, humper@google.com NOTREECHECKS=true NOTRY=true BUG=skia: Author: reed@google.com Review URL: https://codereview.chromium.org/452533002
* add isRect() check to AAClip, to detect if a soft-clip is really just an irectGravatar reed2014-08-07
| | | | | | | | | BUG=skia: R=bsalomon@google.com, humper@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/445233006
* Remove SkRasterClip::setPath(const SkPath&, const SkRasterClip&, bool).Gravatar commit-bot@chromium.org2013-07-10
| | | | | | | | | | | | | | The method is only used in SkCanvas::clipPathHelper() and only called when isRect() is true (which effectively disables the !isBW branch). Thus, we can promote the isBW branch to the caller and drop the rest of the method. R=reed@google.com Author: fmalita@chromium.org Review URL: https://chromiumcodereview.appspot.com/18552004 git-svn-id: http://skia.googlecode.com/svn/trunk@9974 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2013-01-26
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@7406 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 I of IV (I broke down the 1280 files into 4 CLs). Review URL: https://codereview.appspot.com/6485054 git-svn-id: http://skia.googlecode.com/svn/trunk@5262 2bbb7eff-a529-9590-31e7-b0007b416f81
* update the nearly_integral calculation to be (a) faster, and (b) to correctlyGravatar reed@google.com2012-05-11
| | | | | | | | identify that the AA granularity is 1/4 of a pixel, not 1/16 (along an axis). git-svn-id: http://skia.googlecode.com/svn/trunk@3919 2bbb7eff-a529-9590-31e7-b0007b416f81
* only check for nearly-integral if we're a BW clipGravatar reed@google.com2012-05-11
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3915 2bbb7eff-a529-9590-31e7-b0007b416f81
* inline isEmpty and isRect (faster)Gravatar reed@google.com2012-05-11
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3907 2bbb7eff-a529-9590-31e7-b0007b416f81
* add a todoGravatar reed@google.com2012-02-16
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3208 2bbb7eff-a529-9590-31e7-b0007b416f81
* enable soft clipping (yikes)Gravatar reed@google.com2011-10-24
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@2515 2bbb7eff-a529-9590-31e7-b0007b416f81
* checkpoint -- more support changes for soft clippingGravatar reed@google.com2011-10-13
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@2475 2bbb7eff-a529-9590-31e7-b0007b416f81
* forgot explicit return statementsGravatar reed@google.com2011-10-12
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@2465 2bbb7eff-a529-9590-31e7-b0007b416f81
* use SkRasterClip inside canvas (check-point for soft clipping)Gravatar reed@google.com2011-10-12
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@2462 2bbb7eff-a529-9590-31e7-b0007b416f81
* add op(rgn, op)Gravatar reed@google.com2011-10-11
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@2454 2bbb7eff-a529-9590-31e7-b0007b416f81
* add experimental wrapper for region+aaclipGravatar reed@google.com2011-10-10
git-svn-id: http://skia.googlecode.com/svn/trunk@2451 2bbb7eff-a529-9590-31e7-b0007b416f81