diff options
author | Brian Salomon <bsalomon@google.com> | 2016-12-09 20:02:08 +0000 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2016-12-09 20:02:22 +0000 |
commit | 073285c0595d46205d1482cc19af2d7d891bfeae (patch) | |
tree | f127dd2c03ef707cd47396be0bf1cbf911403849 /gm/windowrectangles.cpp | |
parent | 3944484020d98ff8f386378296106c321279482b (diff) |
Revert "Reland "Remove antialiasing control from GrPaint.""
This reverts commit 3944484020d98ff8f386378296106c321279482b.
Reason for revert: Merges badly with a recent change. Will rebase and reland.
Original change's description:
> Reland "Remove antialiasing control from GrPaint."
>
> This contains fixes for GLPrograms test and mixed samples rendering.
>
> This reverts commit 419d81eed4a010e6080db199795117cbedf9e6e4.
>
> BUG=skia:
>
> Change-Id: If8f002fbfaaaab6d1607403f2b15ccc7f1e17e87
> Reviewed-on: https://skia-review.googlesource.com/5763
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
>
TBR=bsalomon@google.com,robertphillips@google.com,reviews@skia.org
BUG=skia:
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: Iff9657041e28604a845bc5a9acec7c9b248c53bd
Reviewed-on: https://skia-review.googlesource.com/5772
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'gm/windowrectangles.cpp')
-rw-r--r-- | gm/windowrectangles.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gm/windowrectangles.cpp b/gm/windowrectangles.cpp index e16392b423..e277db626c 100644 --- a/gm/windowrectangles.cpp +++ b/gm/windowrectangles.cpp @@ -141,7 +141,7 @@ private: class MaskOnlyClipBase : public GrClip { private: bool quickContains(const SkRect&) const final { return false; } - bool isRRect(const SkRect& rtBounds, SkRRect* rr, GrAA*) const final { return false; } + bool isRRect(const SkRect& rtBounds, SkRRect* rr, bool* aa) const final { return false; } void getConservativeBounds(int width, int height, SkIRect* rect, bool* iior) const final { rect->set(0, 0, width, height); if (iior) { @@ -190,6 +190,7 @@ void WindowRectanglesMaskGM::onCoverClipStack(const SkClipStack& stack, SkCanvas const GrReducedClip reducedClip(stack, SkRect::Make(kCoverRect), kNumWindows); GrPaint paint; + paint.setAntiAlias(true); if (!rtc->isStencilBufferMultisampled()) { paint.setColor4f(GrColor4f(0, 0.25f, 1, 1)); this->visualizeAlphaMask(ctx, rtc, reducedClip, paint); @@ -216,7 +217,7 @@ void WindowRectanglesMaskGM::visualizeAlphaMask(GrContext* ctx, GrRenderTargetCo this->stencilCheckerboard(maskRTC.get(), true); maskRTC->clear(nullptr, GrColorPackA4(0xff), true); maskRTC->priv().drawAndStencilRect(StencilOnlyClip(), &GrUserStencilSettings::kUnused, - SkRegion::kDifference_Op, false, GrAA::kNo, SkMatrix::I(), + SkRegion::kDifference_Op, false, false, SkMatrix::I(), SkRect::MakeIWH(maskRTC->width(), maskRTC->height())); reducedClip.drawAlphaClipMask(maskRTC.get()); sk_sp<GrTexture> mask(maskRTC->asTexture()); @@ -228,7 +229,7 @@ void WindowRectanglesMaskGM::visualizeAlphaMask(GrContext* ctx, GrRenderTargetCo // inside window rectangles or outside the scissor should still have the initial checkerboard // intact. (This verifies we didn't spend any time modifying those pixels in the mask.) AlphaOnlyClip clip(mask.get(), x, y); - rtc->drawRect(clip, paint, GrAA::kYes, SkMatrix::I(), + rtc->drawRect(clip, paint, SkMatrix::I(), SkRect::Make(SkIRect::MakeXYWH(x, y, mask->width(), mask->height()))); } @@ -267,7 +268,7 @@ void WindowRectanglesMaskGM::stencilCheckerboard(GrRenderTargetContext* rtc, boo for (int x = (y & 1) == flip ? 0 : kMaskCheckerSize; x < kLayerRect.width(); x += 2 * kMaskCheckerSize) { SkIRect checker = SkIRect::MakeXYWH(x, y, kMaskCheckerSize, kMaskCheckerSize); - rtc->priv().stencilRect(GrNoClip(), &kSetClip, GrAAType::kNone, SkMatrix::I(), + rtc->priv().stencilRect(GrNoClip(), &kSetClip, false, SkMatrix::I(), SkRect::Make(checker)); } } |