| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 #include "gm.h" | 8 #include "gm.h" |
| 9 #include "SkBlurMask.h" | 9 #include "SkBlurMask.h" |
| 10 #include "SkBlurDrawLooper.h" | 10 #include "SkBlurDrawLooper.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 protected: | 38 protected: |
| 39 virtual uint32_t onGetFlags() const SK_OVERRIDE { | 39 virtual uint32_t onGetFlags() const SK_OVERRIDE { |
| 40 return kSkipTiled_Flag; | 40 return kSkipTiled_Flag; |
| 41 } | 41 } |
| 42 | 42 |
| 43 virtual SkString onShortName() { | 43 virtual SkString onShortName() { |
| 44 return SkString("shadows"); | 44 return SkString("shadows"); |
| 45 } | 45 } |
| 46 | 46 |
| 47 virtual SkISize onISize() { | 47 virtual SkISize onISize() { |
| 48 return make_isize(200, 120); | 48 return SkISize::Make(200, 120); |
| 49 } | 49 } |
| 50 | 50 |
| 51 virtual void onDraw(SkCanvas* canvas) { | 51 virtual void onDraw(SkCanvas* canvas) { |
| 52 SkBlurDrawLooper* shadowLoopers[5]; | 52 SkBlurDrawLooper* shadowLoopers[5]; |
| 53 shadowLoopers[0] = | 53 shadowLoopers[0] = |
| 54 SkBlurDrawLooper::Create(SK_ColorBLUE, | 54 SkBlurDrawLooper::Create(SK_ColorBLUE, |
| 55 SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(
10)), | 55 SkBlurMask::ConvertRadiusToSigma(SkIntToScalar(
10)), |
| 56 SkIntToScalar(5), SkIntToScalar(10), | 56 SkIntToScalar(5), SkIntToScalar(10), |
| 57 SkBlurDrawLooper::kIgnoreTransform_BlurFlag | | 57 SkBlurDrawLooper::kIgnoreTransform_BlurFlag | |
| 58 SkBlurDrawLooper::kOverrideColor_BlurFlag | | 58 SkBlurDrawLooper::kOverrideColor_BlurFlag | |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 private: | 122 private: |
| 123 typedef GM INHERITED; | 123 typedef GM INHERITED; |
| 124 }; | 124 }; |
| 125 | 125 |
| 126 /////////////////////////////////////////////////////////////////////////////// | 126 /////////////////////////////////////////////////////////////////////////////// |
| 127 | 127 |
| 128 static GM* MyFactory(void*) { return new ShadowsGM; } | 128 static GM* MyFactory(void*) { return new ShadowsGM; } |
| 129 static GMRegistry reg(MyFactory); | 129 static GMRegistry reg(MyFactory); |
| 130 | 130 |
| 131 } | 131 } |
| OLD | NEW |