| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2008 The Android Open Source Project | 2 * Copyright 2008 The Android Open Source Project |
| 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 | 8 |
| 9 #ifndef SkBlurDrawLooper_DEFINED | 9 #ifndef SkBlurDrawLooper_DEFINED |
| 10 #define SkBlurDrawLooper_DEFINED | 10 #define SkBlurDrawLooper_DEFINED |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 SK_TO_STRING_OVERRIDE() | 54 SK_TO_STRING_OVERRIDE() |
| 55 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkBlurDrawLooper) | 55 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkBlurDrawLooper) |
| 56 | 56 |
| 57 protected: | 57 protected: |
| 58 SkBlurDrawLooper(SkColor color, SkScalar sigma, SkScalar dx, SkScalar dy, | 58 SkBlurDrawLooper(SkColor color, SkScalar sigma, SkScalar dx, SkScalar dy, |
| 59 uint32_t flags); | 59 uint32_t flags); |
| 60 | 60 |
| 61 SkBlurDrawLooper(SkReadBuffer&); | 61 SkBlurDrawLooper(SkReadBuffer&); |
| 62 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; | 62 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; |
| 63 | 63 |
| 64 virtual bool asABlurShadow(BlurShadowRec*) const SK_OVERRIDE; |
| 65 |
| 64 private: | 66 private: |
| 65 SkMaskFilter* fBlur; | 67 SkMaskFilter* fBlur; |
| 66 SkColorFilter* fColorFilter; | 68 SkColorFilter* fColorFilter; |
| 67 SkScalar fDx, fDy; | 69 SkScalar fDx, fDy, fSigma; |
| 68 SkColor fBlurColor; | 70 SkColor fBlurColor; |
| 69 uint32_t fBlurFlags; | 71 uint32_t fBlurFlags; |
| 70 | 72 |
| 71 enum State { | 73 enum State { |
| 72 kBeforeEdge, | 74 kBeforeEdge, |
| 73 kAfterEdge, | 75 kAfterEdge, |
| 74 kDone | 76 kDone |
| 75 }; | 77 }; |
| 76 | 78 |
| 77 class BlurDrawLooperContext : public SkDrawLooper::Context { | 79 class BlurDrawLooperContext : public SkDrawLooper::Context { |
| 78 public: | 80 public: |
| 79 explicit BlurDrawLooperContext(const SkBlurDrawLooper* looper); | 81 explicit BlurDrawLooperContext(const SkBlurDrawLooper* looper); |
| 80 | 82 |
| 81 virtual bool next(SkCanvas* canvas, SkPaint* paint) SK_OVERRIDE; | 83 virtual bool next(SkCanvas* canvas, SkPaint* paint) SK_OVERRIDE; |
| 82 | 84 |
| 83 private: | 85 private: |
| 84 const SkBlurDrawLooper* fLooper; | 86 const SkBlurDrawLooper* fLooper; |
| 85 State fState; | 87 State fState; |
| 86 }; | 88 }; |
| 87 | 89 |
| 88 void init(SkScalar sigma, SkScalar dx, SkScalar dy, SkColor color, uint32_t
flags); | 90 void init(SkScalar sigma, SkScalar dx, SkScalar dy, SkColor color, uint32_t
flags); |
| 89 | 91 |
| 90 typedef SkDrawLooper INHERITED; | 92 typedef SkDrawLooper INHERITED; |
| 91 }; | 93 }; |
| 92 | 94 |
| 93 #endif | 95 #endif |
| OLD | NEW |