From 22c8bb8ebddcf695035b7f9c7f47405ae160b485 Mon Sep 17 00:00:00 2001 From: "junov@google.com" Date: Thu, 30 Jun 2011 22:16:06 +0000 Subject: Fixing several issues with rendering blurred bitmaps with Ganesh BUG=http://code.google.com/p/skia/issues/detail?id=305 REVIEW=http://codereview.appspot.com/4630073/ git-svn-id: http://skia.googlecode.com/svn/trunk@1775 2bbb7eff-a529-9590-31e7-b0007b416f81 --- samplecode/SampleTextureDomain.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'samplecode/SampleTextureDomain.cpp') diff --git a/samplecode/SampleTextureDomain.cpp b/samplecode/SampleTextureDomain.cpp index 1f895e5d91..939dbcd1c6 100755 --- a/samplecode/SampleTextureDomain.cpp +++ b/samplecode/SampleTextureDomain.cpp @@ -77,15 +77,21 @@ protected: SkMaskFilter* mf = SkBlurMaskFilter::Create( 5, SkBlurMaskFilter::kNormal_BlurStyle, - SkBlurMaskFilter::kHighQuality_BlurFlag); + SkBlurMaskFilter::kHighQuality_BlurFlag | + SkBlurMaskFilter::kIgnoreTransform_BlurFlag ); paint.setMaskFilter(mf)->unref(); canvas->drawBitmapRect(deviceBitmap, &srcRect, dstRect, &paint); - // Blur and a rotation + NULL src rect + // Blur and a rotation + NULL src rect + transform applies to filter // This should not trigger the texture domain code // but it will test a code path in SkGpuDevice::drawBitmap // that handles blurs with rects transformed to non- // orthogonal rects. It also tests the NULL src rect handling + mf = SkBlurMaskFilter::Create( + 3, + SkBlurMaskFilter::kNormal_BlurStyle, + SkBlurMaskFilter::kHighQuality_BlurFlag); + paint.setMaskFilter(mf)->unref(); dstRect.setXYWH(-150.0f, -150.0f, 300.0f, 300.0f); canvas->translate(550, 550); canvas->rotate(45); -- cgit v1.2.3