aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkRasterClip.h
Commit message (Collapse)AuthorAge
* SkMacros split from SkTypes.hGravatar Hal Canary2018-06-12
| | | | | | | Change-Id: I383719ee181c6925ebf62ffc70e1c0f12ee7cf84 Reviewed-on: https://skia-review.googlesource.com/134326 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* 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>
* 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>
* don't use deprecated apiGravatar Mike Reed2016-12-13
| | | | | | | | | | BUG=skia: Change-Id: I25886b9cc8df9235b925582f15bea14fffe855db NOTRY=True Reviewed-on: https://skia-review.googlesource.com/5940 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: 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
* 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
* SkRasterClip::quickReject doesn't need to check for emptiness as ↵Gravatar george2014-09-09
| | | | | | | | | | | SkIRect::Intersect already does that for us R=reed@google.com, reed1 BUG=skia: Author: george@mozilla.com Review URL: https://codereview.chromium.org/554743007
* 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
* Guard against most unintentionally ephemeral SkAutoFoo instantiations.Gravatar commit-bot@chromium.org2013-11-18
| | | | | | | | | | | | | | | | | | | I think I applied the trick everywhere possible. Limitations: - can't be used with templated classes - all constructors and destructors must be defined inline A couple of the SkAutoFoo were unused in Skia, Chromium, and Android, so I deleted them. This change caught the same bugs Cary found in SkPath, plus one more in SampleApp. BUG= R=reed@google.com, caryclark@google.com Author: mtklein@google.com Review URL: https://codereview.chromium.org/72603005 git-svn-id: http://skia.googlecode.com/svn/trunk@12301 2bbb7eff-a529-9590-31e7-b0007b416f81
* 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
* Fix a few clang errors while trying to build tools target.Gravatar tfarina@chromium.org2013-03-26
| | | | | | | | | | | | | Most of the errors were like: ../../src/gpu/gl/GrGLEffectMatrix.cpp:74:9: error: variable 'varyingType' is used uninitialized whenever switch default is taken [-Werror,-Wsometimes-uninitialized] ../../src/gpu/gl/debug/GrDebugGL.h:125:21: error: private field 'fMaxTextureUnits' is not used [-Werror,-Wunused-private-field] ../../src/core/SkBitmapSampler.cpp:312:25: error: private field 'fProcTable' is not used [-Werror,-Wunused-private-field] R=bsalomon@google.com,scroggo@google.com Review URL: https://codereview.chromium.org/12915007 git-svn-id: http://skia.googlecode.com/svn/trunk@8403 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
* 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
* 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
* 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