aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrStencil.cpp
Commit message (Collapse)AuthorAge
* Separate user and raw stencil settingsGravatar cdalton2016-05-11
| | | | | | | | | | | | | | | | | | | | | | | | Adds a new GrUserStencilSettings class that describes in abstract terms how a draw will use the stencil (e.g. kAlwaysIfInClip, kSetClipBit, etc.). GrPipelineBuilder now only defines the GrUserStencilSettings. When the GrPipeline is finalized, the user stencil settings are then translated into concrete GrStencilSettings. At this point, GrClipMaskManager only needs to tell the GrAppliedClip whether or not there is a stencil clip. It does not need to modify stencil settings and GrPipelineBuilder does not need AutoRestoreStencil. This is one step of the stencil overhaul. In the future it will also allow us to clean up the special case handling for nvpr and the stateful fClipMode member of GrClipMaskManager. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1962243002 Committed: https://skia.googlesource.com/skia/+/12dbb3947e1aaf205b4fcf13b40e54e50650eb37 Review-Url: https://codereview.chromium.org/1962243002
* Revert of Separate user and raw stencil settings (patchset #8 id:140001 of ↵Gravatar robertphillips2016-05-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1962243002/ ) Reason for revert: This seems to be breaking nanobench on the Windows bots with: Caught exception 3221225477 EXCEPTION_ACCESS_VIOLATION GrDrawTarget::stencilPath +c7 GrStencilAndCoverPathRenderer::onDrawPath +fd GrDrawContext::internalDrawPath +509 GrDrawContext::drawPath +223 GrBlurUtils::drawPathWithMaskFilter +250 SkGpuDevice::drawPath +2ea SkCanvas::onDrawPath +2e3 SkRecordDraw +2e6 SkBigPicture::playback +e5 SkCanvas::onDrawPicture +12c SkCanvas::drawPicture +145 SkRecordDraw +2e6 SkBigPicture::playback +e5 SkCanvas::onDrawPicture +12c SkCanvas::drawPicture +145 SkRecordDraw +261 SkBigPicture::playback +e5 SkCanvas::onDrawPicture +12c SkCanvas::drawPicture +145 SkMultiPictureDraw::draw +bf SKPBench::drawMPDPicture +1e0 SKPBench::onDraw +34 Benchmark::draw +32 time +92 setup_gpu_bench +6e nanobench_main +77b Original issue's description: > Separate user and raw stencil settings > > Adds a new GrUserStencilSettings class that describes in abstract terms > how a draw will use the stencil (e.g. kAlwaysIfInClip, kSetClipBit, > etc.). GrPipelineBuilder now only defines the GrUserStencilSettings. > When the GrPipeline is finalized, the user stencil settings are then > translated into concrete GrStencilSettings. > > At this point, GrClipMaskManager only needs to tell the GrAppliedClip > whether or not there is a stencil clip. It does not need to modify > stencil settings and GrPipelineBuilder does not need > AutoRestoreStencil. > > This is one step of the stencil overhaul. In the future it will also > allow us to clean up the special case handling for nvpr and the > stateful fClipMode member of GrClipMaskManager. > > BUG=skia: > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1962243002 > > Committed: https://skia.googlesource.com/skia/+/12dbb3947e1aaf205b4fcf13b40e54e50650eb37 TBR=bsalomon@google.com,cdalton@nvidia.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/1969693003
* Separate user and raw stencil settingsGravatar cdalton2016-05-10
| | | | | | | | | | | | | | | | | | | | | | Adds a new GrUserStencilSettings class that describes in abstract terms how a draw will use the stencil (e.g. kAlwaysIfInClip, kSetClipBit, etc.). GrPipelineBuilder now only defines the GrUserStencilSettings. When the GrPipeline is finalized, the user stencil settings are then translated into concrete GrStencilSettings. At this point, GrClipMaskManager only needs to tell the GrAppliedClip whether or not there is a stencil clip. It does not need to modify stencil settings and GrPipelineBuilder does not need AutoRestoreStencil. This is one step of the stencil overhaul. In the future it will also allow us to clean up the special case handling for nvpr and the stateful fClipMode member of GrClipMaskManager. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1962243002 Review-Url: https://codereview.chromium.org/1962243002
* Use constexpr constructors of GrStencilSettings rather than hacky macro system.Gravatar bsalomon2016-04-29
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1933053002 Review-Url: https://codereview.chromium.org/1933053002
* 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
* Set up cache in vulkan to reuse GrVkPrograms (aka VkPipelines)Gravatar egdaniel2016-03-23
| | | | | | | BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1816153002 Review URL: https://codereview.chromium.org/1816153002
* Convert GrCrash->SkFAIL GrDebugCrash->SkDEBUGFAILGravatar commit-bot@chromium.org2014-04-30
| | | | | | | | | | R=robertphillips@google.com, reed@google.com, mtklein@google.com Author: bsalomon@google.com Review URL: https://codereview.chromium.org/257393004 git-svn-id: http://skia.googlecode.com/svn/trunk@14460 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
* Removed GrClip & related classesGravatar robertphillips@google.com2012-08-01
| | | | | | | | http://codereview.appspot.com/6450071/ git-svn-id: http://skia.googlecode.com/svn/trunk@4899 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix the stencil rules to perfom an rdiff with an inverse pathGravatar bsalomon@google.com2012-06-25
| | | | | | | Review URL: http://codereview.appspot.com/6336056/ git-svn-id: http://skia.googlecode.com/svn/trunk@4328 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make GrClipMaskManager configure the stencil and scissor on GrGpuGravatar bsalomon@google.com2012-06-21
| | | | | | | | Review URL: http://codereview.appspot.com/6308096/ git-svn-id: http://skia.googlecode.com/svn/trunk@4288 2bbb7eff-a529-9590-31e7-b0007b416f81
* Minor refactoring to remove duplicate enum from Ganesh (_SetOp -> SkRegion::Op)Gravatar robertphillips@google.com2012-04-25
| | | | | | | | http://codereview.appspot.com/6116047/ git-svn-id: http://skia.googlecode.com/svn/trunk@3763 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make GrStencilState a class to enable future optimizationsGravatar bsalomon@google.com2011-12-15
| | | | | | | Review URL: http://codereview.appspot.com/5492047/ git-svn-id: http://skia.googlecode.com/svn/trunk@2881 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix inverse union complex clip stencil rules, skip screen filling rectanglesGravatar bsalomon@google.com2011-12-09
| | | | | | | | Review URL: http://codereview.appspot.com/5480054/ git-svn-id: http://skia.googlecode.com/svn/trunk@2848 2bbb7eff-a529-9590-31e7-b0007b416f81
* Speed up GrDrawState handling.Gravatar tomhudson@google.com2011-11-09
| | | | | | | | | | | | | | | | Compact GrDrawState and nested structs; dynamically only copy and compare the fields actually active on the structs in question. Yields 10-20% speedup of text benchmarks in GPU configuration. Could probably get additional marginal speedup by ignoring unused kernel fields. Has some fragile constructs: pointer math on members to compute sizes of portions of structs. Removes fields necessary for GrTesselatedPathRenderer. git-svn-id: http://skia.googlecode.com/svn/trunk@2644 2bbb7eff-a529-9590-31e7-b0007b416f81
* Move gpu/include/* to include/gpu and gpu/src/* to src/gpuGravatar bsalomon@google.com2011-10-12
Review URL: http://codereview.appspot.com/5250070/ git-svn-id: http://skia.googlecode.com/svn/trunk@2471 2bbb7eff-a529-9590-31e7-b0007b416f81