diff options
author | 2016-07-12 18:48:21 -0700 | |
---|---|---|
committer | 2016-07-12 18:48:21 -0700 | |
commit | ba3880fa6d47d467bfcf4db80c553f051336e406 (patch) | |
tree | 18e18ae8c72e79807aef9eb5cece8befd49ef770 /include/gpu/GrClip.h | |
parent | 634b43008025d039f3f2f1f6c01e8044ffbb901f (diff) |
Revert of Pre-crop filled rects to avoid scissor (patchset #6 id:100001 of https://codereview.chromium.org/2132073002/ )
Reason for revert:
I think this is still causing a test failure on Chrome windows bots.
https://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/243928/steps/cc_unittests%20%28with%20patch%29%20on%20Windows-7-SP1/logs/stdio
Original issue's description:
> Pre-crop filled rects to avoid scissor
>
> Updates GrDrawContext to crop filled rects to the clip bounds before
> creating batches for them. Also adds clipping logic to ignore scissor
> when the draw falls completely inside. These two changes combined
> reduce API traffic and improve batching.
>
> In the future this can and should be improved by switching to floating
> point clip boundaries, thus allowing us to throw out non pixel aligned
> rectangle clips as well.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2132073002
>
> Committed: https://skia.googlesource.com/skia/+/7969838702135b9f127bd738728da61bc49b050a
> Committed: https://skia.googlesource.com/skia/+/86de59f4a99b5f54be0483c60ff0335be55b2bdf
TBR=bsalomon@google.com,robertphillips@google.com,csmartdalton@google.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/2140253004
Diffstat (limited to 'include/gpu/GrClip.h')
-rw-r--r-- | include/gpu/GrClip.h | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/include/gpu/GrClip.h b/include/gpu/GrClip.h index b63f2130da..e58528114e 100644 --- a/include/gpu/GrClip.h +++ b/include/gpu/GrClip.h @@ -109,26 +109,6 @@ public: const SkRect* devBounds, GrAppliedClip*) const = 0; virtual ~GrClip() {} - -protected: - /** - * Returns true if a clip can safely disable its scissor test for a particular draw. - */ - static bool CanIgnoreScissor(const SkIRect& scissorRect, const SkRect& drawBounds) { - // This is the maximum distance that a draw may extend beyond a clip's scissor and still - // count as inside. We use a sloppy compare because the draw may have chosen its bounds in a - // different coord system. The rationale for 1e-3 is that in the coverage case (and barring - // unexpected rounding), as long as coverage stays below 0.5 * 1/256 we ought to be OK. - constexpr SkScalar fuzz = 1e-3f; - SkASSERT(!scissorRect.isEmpty()); - SkASSERT(!drawBounds.isEmpty()); - return scissorRect.fLeft <= drawBounds.fLeft + fuzz && - scissorRect.fTop <= drawBounds.fTop + fuzz && - scissorRect.fRight >= drawBounds.fRight - fuzz && - scissorRect.fBottom >= drawBounds.fBottom - fuzz; - } - - friend class GrClipMaskManager; }; /** |