aboutsummaryrefslogtreecommitdiffhomepage
path: root/samplecode/SampleTextureDomain.cpp
diff options
context:
space:
mode:
authorGravatar junov@google.com <junov@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-06-30 22:16:06 +0000
committerGravatar junov@google.com <junov@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-06-30 22:16:06 +0000
commit22c8bb8ebddcf695035b7f9c7f47405ae160b485 (patch)
tree7c31425a504294ec1e2a646f0ac3ae5789120772 /samplecode/SampleTextureDomain.cpp
parent3582bf9e3d94feac5d4cc64fdb646dd68a3e4b18 (diff)
Fixing several issues with rendering blurred bitmaps with Ganesh
Diffstat (limited to 'samplecode/SampleTextureDomain.cpp')
-rwxr-xr-xsamplecode/SampleTextureDomain.cpp10
1 files changed, 8 insertions, 2 deletions
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);