| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "gm.h" | 8 #include "gm.h" |
| 9 #include "SkBlurMask.h" | 9 #include "SkBlurMask.h" |
| 10 #include "SkBlurMaskFilter.h" | 10 #include "SkBlurMaskFilter.h" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 | 49 |
| 50 virtual SkISize onISize() SK_OVERRIDE { | 50 virtual SkISize onISize() SK_OVERRIDE { |
| 51 return SkISize::Make(SkScalarCeilToInt(fRRect.rect().width()), | 51 return SkISize::Make(SkScalarCeilToInt(fRRect.rect().width()), |
| 52 SkScalarCeilToInt(fRRect.rect().height())); | 52 SkScalarCeilToInt(fRRect.rect().height())); |
| 53 } | 53 } |
| 54 | 54 |
| 55 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { | 55 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { |
| 56 SkLayerDrawLooper* looper = new SkLayerDrawLooper; | 56 SkLayerDrawLooper* looper = new SkLayerDrawLooper; |
| 57 { | 57 { |
| 58 SkLayerDrawLooper::LayerInfo info; | 58 SkLayerDrawLooper::LayerInfo info; |
| 59 info.fFlagsMask = 0; | |
| 60 info.fPaintBits = SkLayerDrawLooper::kMaskFilter_Bit | 59 info.fPaintBits = SkLayerDrawLooper::kMaskFilter_Bit |
| 61 | SkLayerDrawLooper::kColorFilter_Bit; | 60 | SkLayerDrawLooper::kColorFilter_Bit; |
| 62 info.fColorMode = SkXfermode::kSrc_Mode; | 61 info.fColorMode = SkXfermode::kSrc_Mode; |
| 63 info.fOffset = SkPoint::Make(SkIntToScalar(-1), SkIntToScalar(0)); | 62 info.fOffset = SkPoint::Make(SkIntToScalar(-1), SkIntToScalar(0)); |
| 64 info.fPostTranslate = false; | 63 info.fPostTranslate = false; |
| 65 SkPaint* paint = looper->addLayerOnTop(info); | 64 SkPaint* paint = looper->addLayerOnTop(info); |
| 66 SkMaskFilter* maskFilter = SkBlurMaskFilter::Create( | 65 SkMaskFilter* maskFilter = SkBlurMaskFilter::Create( |
| 67 SkBlurMaskFilter::kNormal_BlurStyle, | 66 SkBlurMaskFilter::kNormal_BlurStyle, |
| 68 SkBlurMask::ConvertRadiusToSigma(SK_ScalarHalf), | 67 SkBlurMask::ConvertRadiusToSigma(SK_ScalarHalf), |
| 69 SkBlurMaskFilter::kHighQuality_BlurFlag); | 68 SkBlurMaskFilter::kHighQuality_BlurFlag); |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 // TODO(scroggo): Disabled in an attempt to rememdy | 144 // TODO(scroggo): Disabled in an attempt to rememdy |
| 146 // https://code.google.com/p/skia/issues/detail?id=1801 ('Win7 Test bots all fai
ling GenerateGMs: | 145 // https://code.google.com/p/skia/issues/detail?id=1801 ('Win7 Test bots all fai
ling GenerateGMs: |
| 147 // ran wrong number of tests') | 146 // ran wrong number of tests') |
| 148 //DEF_GM(return new BlurRoundRectGM(600, 5514, 6);) | 147 //DEF_GM(return new BlurRoundRectGM(600, 5514, 6);) |
| 149 | 148 |
| 150 // Rounded rect with two opposite corners with large radii, the other two | 149 // Rounded rect with two opposite corners with large radii, the other two |
| 151 // small. | 150 // small. |
| 152 DEF_GM(return new BlurRoundRectGM(100, 100);) | 151 DEF_GM(return new BlurRoundRectGM(100, 100);) |
| 153 | 152 |
| 154 DEF_GM(return new SimpleBlurRoundRectGM();) | 153 DEF_GM(return new SimpleBlurRoundRectGM();) |
| OLD | NEW |