aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkClipStack.cpp
Commit message (Collapse)AuthorAge
...
* Fix GPU clipped-AA vs. non-AA drawRect discrepancyGravatar robertphillips2015-01-12
| | | | | | | | In the clip stack we were manually rounding out non-AA clip rects but leaving the hardening of non-AA drawRects up to the GPU. In some border cases the GPU can truncate rather than round out resulting in visual discrepancies. BUG=423834 Review URL: https://codereview.chromium.org/839883003
* Remove SkPath::asRectGravatar robertphillips2015-01-05
| | | | | | | | | | AFAICT the asRect entry point is not needed. Greg: GPU Reed: API Cary: Path Review URL: https://codereview.chromium.org/833193002
* Add some more volatile paths.Gravatar jvanverth2014-10-24
| | | | | | | | | Some clip paths were not marked as volatile, and ending up in the distance field path renderer when they shouldn't. BUG=skia:3066 Review URL: https://codereview.chromium.org/680543002
* add dumpHex() option to SkPathGravatar caryclark2014-09-15
| | | | | | | | | | | | | This provides exact precision to help debugging when the float representation of a SkScalar may introduce error. R=reed@google.com Author: caryclark@google.com Review URL: https://codereview.chromium.org/571973003
* "NULL !=" = NULLGravatar bsalomon2014-09-05
| | | | | | | | R=reed@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/544233002
* add path dump testGravatar caryclark2014-06-24
| | | | | | | | | | | | | Add a unit test for SkPath::dump(). The unit test exposed a minor bug (inconsistent CRs) and an unused parameter (title). R=bsalomon@google.com TBR=bsalomon BUG=skia:1836 Author: caryclark@google.com Review URL: https://codereview.chromium.org/351833003
* 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
* SkClipStack::Element tweaks.Gravatar fmalita2014-06-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | ( This is intended to facilitate efficient kMatrix_SaveFlags emulation on restore(): * collect all clip stack elements for the current save count into a side clip stack * canvas.restore(everything) * replay the collected clip ops to restore the initial clip state => we restored the matrix but the clip state is unchanged ) Two main changes: * expose the save count for SkClipStack::Element * expose a replay method for the same (logic relocated from SkCanvas::replayClips) The SkCanvas::ClipVisitor shuffling is to enable forward decl in SkClipStack.h (cannot fwdecl a nested class). R=reed@google.com, robertphillips@google.com TBR=reed@google.com Author: fmalita@chromium.org Review URL: https://codereview.chromium.org/269693003
* Use SkTLazy to hold path in SkClipStack::ElementGravatar commit-bot@chromium.org2014-02-27
| | | | | | | | | | R=reed@google.com, robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/178583002 git-svn-id: http://skia.googlecode.com/svn/trunk@13610 2bbb7eff-a529-9590-31e7-b0007b416f81
* Use SkRRect to store rects in SkClipStack::ElementGravatar commit-bot@chromium.org2014-02-21
| | | | | | | | | | | BUG=skia:2181 R=robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/163483003 git-svn-id: http://skia.googlecode.com/svn/trunk@13544 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix calling undef inline func build errorGravatar commit-bot@chromium.org2014-02-16
| | | | | | | | | | | | | Fixes error introduced in https://code.google.com/p/skia/source/detail?r=13465 R=robertphillips@google.com TBR=robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/168893002 git-svn-id: http://skia.googlecode.com/svn/trunk@13466 2bbb7eff-a529-9590-31e7-b0007b416f81
* Store SkRRects in SkClipStackGravatar commit-bot@chromium.org2014-02-16
| | | | | | | | | | | BUG=skia:2181 R=robertphillips@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/163683002 git-svn-id: http://skia.googlecode.com/svn/trunk@13465 2bbb7eff-a529-9590-31e7-b0007b416f81
* Avoid some work on SkClipStack equality when the topmost genids matchGravatar commit-bot@chromium.org2014-01-06
| | | | | | | | | | | | Two clip stacks are defined being equal if the topmost genids match. R=bsalomon@google.com Author: kkinnunen@nvidia.com Review URL: https://codereview.chromium.org/115573005 git-svn-id: http://skia.googlecode.com/svn/trunk@12909 2bbb7eff-a529-9590-31e7-b0007b416f81
* deprecate SkScalarRound (and its ilk), use SkScalarRound[ToInt,ToScalar]. ↵Gravatar reed@google.com2013-12-17
| | | | | | | | | | | #define SK_SUPPORT_DEPRECATED_SCALARROUND for legacy clients BUG= R=robertphillips@google.com Review URL: https://codereview.chromium.org/111353003 git-svn-id: http://skia.googlecode.com/svn/trunk@12719 2bbb7eff-a529-9590-31e7-b0007b416f81
* Avoid re-rendering stencil clip for every draw with reducable clip stackGravatar commit-bot@chromium.org2013-11-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes the cases where clip stack reduction would cause clip to be re-rendered to stencil for each draw call. This causes unneeded slowdown. Stencil cache would not be used because the clip stack generation id communicated by the clip stack element list would be invalid. This happended due to a) clip stack reduction creating new elements in the element list. b) purging logic removing the generation id, but reduction logic selecting already purged element, and thus the generation id, as the representative state of the clip. Cases of a) where reduction would flatten the stack to a single new element were fixed by assigning the generation id of the top-most element of the clip stack as the generation id of the new element. This is not strictly minimal, but enables more caching than using invalid id. Cases of a) where reduction would substitute a stack element with a new element the generation id of the substituted element is used. The b) part was fixed by removing the purging logic. It was not exactly correct, as the previously purged states were actually used. The purging was not used for anything. Changes SkClipStack API to highlight that invalid generation id is never returned by SkClipStack. Empty stacks are wide open. Changes the clients to reflect this. Fixes a crash when not passing anti-alias out parameter to GrReducedClip::ReduceClipStack. The crash is not exercised in the current code. Committed: http://code.google.com/p/skia/source/detail?r=12084 R=bsalomon@google.com, robertphillips@google.com Author: kkinnunen@nvidia.com Review URL: https://codereview.chromium.org/48593003 git-svn-id: http://skia.googlecode.com/svn/trunk@12127 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "Avoid re-rendering stencil clip for every draw with reducable clip ↵Gravatar reed@google.com2013-11-01
| | | | | | | | | | | | | | | | stack" This reverts commit 92a7d4bf6a371f1f864154be902e8d86938e560b. Revert "fix mac 10.6 build" This reverts commit 114cd1a9f2734aaed6914718814364811b78bd7f. BUG= Review URL: https://codereview.chromium.org/54543008 git-svn-id: http://skia.googlecode.com/svn/trunk@12087 2bbb7eff-a529-9590-31e7-b0007b416f81
* Avoid re-rendering stencil clip for every draw with reducable clip stackGravatar commit-bot@chromium.org2013-11-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes the cases where clip stack reduction would cause clip to be re-rendered to stencil for each draw call. This causes unneeded slowdown. Stencil cache would not be used because the clip stack generation id communicated by the clip stack element list would be invalid. This happended due to a) clip stack reduction creating new elements in the element list. b) purging logic removing the generation id, but reduction logic selecting already purged element, and thus the generation id, as the representative state of the clip. Cases of a) where reduction would flatten the stack to a single new element were fixed by assigning the generation id of the top-most element of the clip stack as the generation id of the new element. This is not strictly minimal, but enables more caching than using invalid id. Cases of a) where reduction would substitute a stack element with a new element the generation id of the substituted element is used. The b) part was fixed by removing the purging logic. It was not exactly correct, as the previously purged states were actually used. The purging was not used for anything. Changes SkClipStack API to highlight that invalid generation id is never returned by SkClipStack. Empty stacks are wide open. Changes the clients to reflect this. Fixes a crash when not passing anti-alias out parameter to GrReducedClip::ReduceClipStack. The crash is not exercised in the current code. R=bsalomon@google.com, robertphillips@google.com Author: kkinnunen@nvidia.com Review URL: https://codereview.chromium.org/48593003 git-svn-id: http://skia.googlecode.com/svn/trunk@12084 2bbb7eff-a529-9590-31e7-b0007b416f81
* Compact the clipstack for kReplace_Op'd geometryGravatar commit-bot@chromium.org2013-06-11
| | | | | | | | | | | | | | | | | | When adding a clip rect or clip path to the stack with the kReplace_Op operation, remove all previous elements within the same save frame (elements with fSaveCount equal to the current fSaveCount of the stack). This prevents unbounded growth of the clipstack for long-lived instances that gets reused. Addresses https://code.google.com/p/skia/issues/detail?id=748 R=robertphillips@google.com Author: fs@opera.com Review URL: https://chromiumcodereview.appspot.com/16160020 git-svn-id: http://skia.googlecode.com/svn/trunk@9502 2bbb7eff-a529-9590-31e7-b0007b416f81
* Adding quickContains API method to SkClipStackGravatar junov@chromium.org2012-12-12
| | | | | | | | BUG=http://code.google.com/p/chromium/issues/detail?id=164580 TEST=unit test ClipStack/quickContains Review URL: https://codereview.appspot.com/6919044 git-svn-id: http://skia.googlecode.com/svn/trunk@6760 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fixing SkClipStack::clipDevPath so that it will not convert rectangular ↵Gravatar junov@chromium.org2012-12-10
| | | | | | | | | | paths to rectangle clips if inverse fill. BUG=http://code.google.com/p/chromium/issues/detail?id=164580 TEST=unit test ClipStackTest/test_rect_inverse_fill Review URL: https://codereview.appspot.com/6880044 git-svn-id: http://skia.googlecode.com/svn/trunk@6731 2bbb7eff-a529-9590-31e7-b0007b416f81
* Improve handling of inverse clip paths in GrClipMaskManager.Gravatar bsalomon@google.com2012-12-07
| | | | | | | | | Will require rebaselining of complexclip_aa and complexclip_aa_layer on GPU. R=robertphillips@google.com Review URL: https://codereview.appspot.com/6907052 git-svn-id: http://skia.googlecode.com/svn/trunk@6712 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make SkClipStack::Iter use SkClipStack::Element.Gravatar bsalomon@google.com2012-12-04
| | | | | | | R=robertphillips@google.com Review URL: https://codereview.appspot.com/6871051 git-svn-id: http://skia.googlecode.com/svn/trunk@6661 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove SkClipStack::Iter::combinedNext.Gravatar bsalomon@google.com2012-11-29
| | | | | | Review URL: https://codereview.appspot.com/6844114 git-svn-id: http://skia.googlecode.com/svn/trunk@6619 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make SkClipStack::Element public.Gravatar bsalomon@google.com2012-11-29
| | | | | | | R=robertphillips@google.com Review URL: https://codereview.appspot.com/6858096 git-svn-id: http://skia.googlecode.com/svn/trunk@6617 2bbb7eff-a529-9590-31e7-b0007b416f81
* Change SkClipStack::Element::State to SkClipStack::Type, rename Comine* ↵Gravatar bsalomon@google.com2012-11-29
| | | | | | | | | members to combine* R=robertphillips@google.com Review URL: https://codereview.appspot.com/6844113 git-svn-id: http://skia.googlecode.com/svn/trunk@6607 2bbb7eff-a529-9590-31e7-b0007b416f81
* Rename SkClipStack::Rec to SkClipStack::ElementGravatar bsalomon@google.com2012-11-29
| | | | | | | R=robertphillips@google.com Review URL: https://codereview.appspot.com/6854115 git-svn-id: http://skia.googlecode.com/svn/trunk@6605 2bbb7eff-a529-9590-31e7-b0007b416f81
* Set empty/wide-open genID on clip stack in more places and fix a bug in ↵Gravatar bsalomon@google.com2012-11-28
| | | | | | | | | GrReduceClipStack. R=robertphillips@google.com Review URL: https://codereview.appspot.com/6847116 git-svn-id: http://skia.googlecode.com/svn/trunk@6579 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add a function that computes a reduced representation of the clip stack.Gravatar bsalomon@google.com2012-11-26
| | | | | | | Also adds a unit test. The function is not yet used other than in the test. Review URL: https://codereview.appspot.com/6855098 git-svn-id: http://skia.googlecode.com/svn/trunk@6553 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert 6351 due to bugs.Gravatar bsalomon@google.com2012-11-12
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@6377 2bbb7eff-a529-9590-31e7-b0007b416f81
* Apply intersect rects to earlier clip elements and skip rects when possible.Gravatar bsalomon@google.com2012-11-08
| | | | | | | R=robertphillips@google.com Review URL: https://codereview.appspot.com/6814105 git-svn-id: http://skia.googlecode.com/svn/trunk@6351 2bbb7eff-a529-9590-31e7-b0007b416f81
* Combine multiple intersecting rects in SkClipStack::Iter.Gravatar bsalomon@google.com2012-11-07
| | | | | | | R=robertphillips@google.com Review URL: https://codereview.appspot.com/6816104 git-svn-id: http://skia.googlecode.com/svn/trunk@6339 2bbb7eff-a529-9590-31e7-b0007b416f81
* Some improvements to reduce the number of pixels touched in generating alpha ↵Gravatar bsalomon@google.com2012-11-07
| | | | | | | | clip masks Review URL: https://codereview.appspot.com/6828043 git-svn-id: http://skia.googlecode.com/svn/trunk@6329 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2012-10-12
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@5908 2bbb7eff-a529-9590-31e7-b0007b416f81
* Minimize use of SkDraw's matrix in SkGpuDevice.Gravatar bsalomon@google.com2012-10-11
| | | | | | | R=robertphillips@google.com Review URL: https://codereview.appspot.com/6604068 git-svn-id: http://skia.googlecode.com/svn/trunk@5906 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
* Decrease SkClipStack memory allocations & deallocationsGravatar robertphillips@google.com2012-08-17
| | | | | | | | http://codereview.appspot.com/6443138 git-svn-id: http://skia.googlecode.com/svn/trunk@5151 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make SkDeque::back faster & inlineGravatar robertphillips@google.com2012-08-17
| | | | | | | | http://codereview.appspot.com/6462073/ git-svn-id: http://skia.googlecode.com/svn/trunk@5149 2bbb7eff-a529-9590-31e7-b0007b416f81
* add SkClipStack::clipEmpty() as an optimized way to say clipDevRect(empty, ↵Gravatar reed@google.com2012-08-16
| | | | | | | | | intersect) if the caller knows up-front that it wants the clipstact to become empty. Review URL: https://codereview.appspot.com/6443132 git-svn-id: http://skia.googlecode.com/svn/trunk@5127 2bbb7eff-a529-9590-31e7-b0007b416f81
* Added method of getting top genID from SkClipStackGravatar robertphillips@google.com2012-08-09
| | | | | | | | http://codereview.appspot.com/6446108/ git-svn-id: http://skia.googlecode.com/svn/trunk@5034 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix for r4978 unit test failure. TBR by BrianGravatar robertphillips@google.com2012-08-07
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@4983 2bbb7eff-a529-9590-31e7-b0007b416f81
* Added SkClipStack portion of new clip mask caching systemGravatar robertphillips@google.com2012-08-07
| | | | | | | | http://codereview.appspot.com/6449089/ git-svn-id: http://skia.googlecode.com/svn/trunk@4978 2bbb7eff-a529-9590-31e7-b0007b416f81
* Added check for aa/bw rect mergingGravatar robertphillips@google.com2012-08-02
| | | | | | | | http://codereview.appspot.com/6449079/ git-svn-id: http://skia.googlecode.com/svn/trunk@4907 2bbb7eff-a529-9590-31e7-b0007b416f81
* Replace GrClip with SkClipStackGravatar robertphillips@google.com2012-07-31
| | | | | | | | http://codereview.appspot.com/6449070/ git-svn-id: http://skia.googlecode.com/svn/trunk@4865 2bbb7eff-a529-9590-31e7-b0007b416f81
* Added dev- & canv- prefixes to Ganesh bounding boxes to indicate coordinate ↵Gravatar robertphillips@google.com2012-07-31
| | | | | | | | | | space http://codereview.appspot.com/6457061/ git-svn-id: http://skia.googlecode.com/svn/trunk@4856 2bbb7eff-a529-9590-31e7-b0007b416f81
* Added ctor to SkClipStack and isEmpty methodGravatar robertphillips@google.com2012-07-26
| | | | | | | | http://codereview.appspot.com/6444048/ git-svn-id: http://skia.googlecode.com/svn/trunk@4787 2bbb7eff-a529-9590-31e7-b0007b416f81
* Added isIntersectionOfRects to SkClipStackGravatar robertphillips@google.com2012-07-24
| | | | | | | | http://codereview.appspot.com/6434050/ git-svn-id: http://skia.googlecode.com/svn/trunk@4745 2bbb7eff-a529-9590-31e7-b0007b416f81
* Added bound computation to SkClipStackGravatar robertphillips@google.com2012-07-24
| | | | | | | | | | http://codereview.appspot.com/6419048/ This will require re-baselining of complexclip* and filltypespersp git-svn-id: http://skia.googlecode.com/svn/trunk@4730 2bbb7eff-a529-9590-31e7-b0007b416f81
* Gave GrClip an SkClipStack-style iteratorGravatar robertphillips@google.com2012-07-23
| | | | | | | | http://codereview.appspot.com/6434046/ git-svn-id: http://skia.googlecode.com/svn/trunk@4723 2bbb7eff-a529-9590-31e7-b0007b416f81
* Made clarifying renamings to SkClipStack's iterators (and added to unit test)Gravatar robertphillips@google.com2012-07-20
| | | | | | | | http://codereview.appspot.com/6423051/ git-svn-id: http://skia.googlecode.com/svn/trunk@4692 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add skipToLast method to SkClipStackGravatar robertphillips@google.com2012-07-18
| | | | | | | | http://codereview.appspot.com/6411043/ git-svn-id: http://skia.googlecode.com/svn/trunk@4644 2bbb7eff-a529-9590-31e7-b0007b416f81