Index: tests/BlurTest.cpp |
diff --git a/tests/BlurTest.cpp b/tests/BlurTest.cpp |
index 556930e6e936c1af0145e011e4274d09e7779f8e..9806611cfbeb9d52f9ededc1651844f70868a739 100644 |
--- a/tests/BlurTest.cpp |
+++ b/tests/BlurTest.cpp |
@@ -558,4 +558,25 @@ DEF_TEST(BlurAsABlur, reporter) { |
} |
} |
+#if SK_SUPPORT_GPU |
+ |
+// This exercises the problem discovered in crbug.com/570232. The return value from |
+// SkBlurMask::BoxBlur wasn't being checked in SkBlurMaskFilter.cpp::GrRRectBlurEffect::Create |
+DEF_GPUTEST_FOR_RENDERING_CONTEXTS(SmallBoxBlurBug, reporter, ctx) { |
+ |
+ SkImageInfo info = SkImageInfo::MakeN32Premul(128, 128); |
+ SkAutoTUnref<SkSurface> surface(SkSurface::NewRenderTarget(ctx, SkSurface::kNo_Budgeted, info)); |
+ SkCanvas* canvas = surface->getCanvas(); |
+ |
+ SkRect r = SkRect::MakeXYWH(10, 10, 100, 100); |
+ SkRRect rr = SkRRect::MakeRectXY(r, 10, 10); |
+ |
+ SkPaint p; |
+ p.setMaskFilter(SkBlurMaskFilter::Create(kNormal_SkBlurStyle, 0.01f))->unref(); |
+ |
+ canvas->drawRRect(rr, p); |
+} |
+ |
+#endif |
+ |
/////////////////////////////////////////////////////////////////////////////////////////// |