aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-12-05 10:35:15 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-12-05 15:56:01 +0000
commit1447177005fcbac83acd501766a46c751a49ae73 (patch)
treeed20f7b0984a3a0f01e0d46465c4fda98bb49802 /gm
parentbb4b20a265a78b561c005aaf80920d4bc9c2e7d0 (diff)
Avoid GrEllipseEffect for small radii on devices without 32 bit float.
Also limit small radius bail in GrCircleEffect to clip out cases. Change-Id: I14ce736969b05203219d68f30283c36c84f78f3a Reviewed-on: https://skia-review.googlesource.com/80621 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'gm')
-rw-r--r--gm/bigrrectaaeffect.cpp3
-rw-r--r--gm/rrects.cpp3
-rw-r--r--gm/windowrectangles.cpp3
3 files changed, 6 insertions, 3 deletions
diff --git a/gm/bigrrectaaeffect.cpp b/gm/bigrrectaaeffect.cpp
index 62c9da8b30..a5d77fc248 100644
--- a/gm/bigrrectaaeffect.cpp
+++ b/gm/bigrrectaaeffect.cpp
@@ -77,7 +77,8 @@ protected:
SkRRect rrect = fRRect;
rrect.offset(SkIntToScalar(x + kGap), SkIntToScalar(y + kGap));
- std::unique_ptr<GrFragmentProcessor> fp(GrRRectEffect::Make(edgeType, rrect));
+ const auto& caps = *renderTargetContext->caps()->shaderCaps();
+ auto fp = GrRRectEffect::Make(edgeType, rrect, caps);
SkASSERT(fp);
if (fp) {
GrPaint grPaint;
diff --git a/gm/rrects.cpp b/gm/rrects.cpp
index 217e528e2b..dfeebf3dd8 100644
--- a/gm/rrects.cpp
+++ b/gm/rrects.cpp
@@ -106,7 +106,8 @@ protected:
SkRRect rrect = fRRects[curRRect];
rrect.offset(SkIntToScalar(x), SkIntToScalar(y));
GrClipEdgeType edgeType = (GrClipEdgeType) et;
- auto fp = GrRRectEffect::Make(edgeType, rrect);
+ const auto& caps = *renderTargetContext->caps()->shaderCaps();
+ auto fp = GrRRectEffect::Make(edgeType, rrect, caps);
if (fp) {
GrPaint grPaint;
grPaint.setXPFactory(GrPorterDuffXPFactory::Get(SkBlendMode::kSrc));
diff --git a/gm/windowrectangles.cpp b/gm/windowrectangles.cpp
index 6a3f2a1eb0..a2c8f0bc10 100644
--- a/gm/windowrectangles.cpp
+++ b/gm/windowrectangles.cpp
@@ -181,7 +181,8 @@ void WindowRectanglesMaskGM::onCoverClipStack(const SkClipStack& stack, SkCanvas
return;
}
- const GrReducedClip reducedClip(stack, SkRect::Make(kCoverRect), kNumWindows);
+ const GrReducedClip reducedClip(stack, SkRect::Make(kCoverRect), rtc->caps()->shaderCaps(),
+ kNumWindows);
GrPaint paint;
if (GrFSAAType::kNone == rtc->fsaaType()) {