diff options
author | junov@google.com <junov@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-07-28 20:10:09 +0000 |
---|---|---|
committer | junov@google.com <junov@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2011-07-28 20:10:09 +0000 |
commit | 1d32978f7e927cb39da480c3bdce18363967313a (patch) | |
tree | ca74b13f20626e35bfe8d3f45da4caad3df18874 /samplecode/SampleTextureDomain.cpp | |
parent | 3eba9d31157d5d414f26dd9660ced79fbf50b4fd (diff) |
Fixing the ignore transform flag in Ganesh with mask filter and drawBitmap
TEST=SampleApp/Texture Domain
BUG=http://code.google.com/p/skia/issues/detail?id=335
REVIEW=http://codereview.appspot.com/4803052/
git-svn-id: http://skia.googlecode.com/svn/trunk@1987 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'samplecode/SampleTextureDomain.cpp')
-rwxr-xr-x | samplecode/SampleTextureDomain.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/samplecode/SampleTextureDomain.cpp b/samplecode/SampleTextureDomain.cpp index 3a2a252877..4291468fc3 100755 --- a/samplecode/SampleTextureDomain.cpp +++ b/samplecode/SampleTextureDomain.cpp @@ -39,7 +39,7 @@ protected: // overrides from SkEventSink virtual bool onQuery(SkEvent* evt) { if (SampleCode::TitleQ(*evt)) { - SampleCode::TitleR(evt, "Texture Domian"); + SampleCode::TitleR(evt, "Texture Domain"); return true; } return this->INHERITED::onQuery(evt); @@ -84,7 +84,8 @@ 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); @@ -93,6 +94,12 @@ protected: // 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( + 5, + 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); |