diff options
author | 2015-10-14 08:31:34 -0700 | |
---|---|---|
committer | 2015-10-14 08:31:34 -0700 | |
commit | 0b5b6b2105cf6a60824a28e002abf0d322e4344a (patch) | |
tree | 99775aa9b15d4b4753d63b33ffaf6ef1651301c6 /src/gpu/GrClipMaskManager.h | |
parent | 0b01da7bca9dacdd58affe5d5433860cb3d59194 (diff) |
Fix clipping when all analytic FP creations can be skipped
BUG=skia:
Review URL: https://codereview.chromium.org/1400343004
Diffstat (limited to 'src/gpu/GrClipMaskManager.h')
-rw-r--r-- | src/gpu/GrClipMaskManager.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/gpu/GrClipMaskManager.h b/src/gpu/GrClipMaskManager.h index 005830c1a7..90352f4621 100644 --- a/src/gpu/GrClipMaskManager.h +++ b/src/gpu/GrClipMaskManager.h @@ -87,10 +87,13 @@ private: }; // Attempts to install a series of coverage effects to implement the clip. Return indicates - // whether the element list was successfully converted to effects. - const GrFragmentProcessor* getAnalyticClipProcessor(const GrReducedClip::ElementList&, - const SkVector& clipOffset, - const SkRect* devBounds); + // whether the element list was successfully converted to processors. *fp may be nullptr even + // when the function succeeds because all the elements were ignored. TODO: Make clip reduction + // bounds-aware and stop checking bounds in this function. + bool getAnalyticClipProcessor(const GrReducedClip::ElementList&, + SkVector& clipOffset, + const SkRect* devBounds, + const GrFragmentProcessor** fp); // Draws the clip into the stencil buffer bool createStencilClipMask(GrRenderTarget*, |