Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(126)

Side by Side Diff: include/effects/SkBlurDrawLooper.h

Issue 1825073002: Revert[2] of "switch colorfilters to sk_sp (patchset #11 id:200001 of https://codereview.chromium.o… (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove flag Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « include/core/SkShader.h ('k') | include/effects/SkColorCubeFilter.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 protected: 58 protected:
59 SkBlurDrawLooper(SkColor color, SkScalar sigma, SkScalar dx, SkScalar dy, 59 SkBlurDrawLooper(SkColor color, SkScalar sigma, SkScalar dx, SkScalar dy,
60 uint32_t flags); 60 uint32_t flags);
61 61
62 void flatten(SkWriteBuffer&) const override; 62 void flatten(SkWriteBuffer&) const override;
63 63
64 bool asABlurShadow(BlurShadowRec*) const override; 64 bool asABlurShadow(BlurShadowRec*) const override;
65 65
66 private: 66 private:
67 SkMaskFilter* fBlur; 67 SkMaskFilter* fBlur;
68 SkColorFilter* fColorFilter; 68 sk_sp<SkColorFilter> fColorFilter;
69 SkScalar fDx, fDy, fSigma; 69 SkScalar fDx, fDy, fSigma;
70 SkColor fBlurColor; 70 SkColor fBlurColor;
71 uint32_t fBlurFlags; 71 uint32_t fBlurFlags;
72 72
73 enum State { 73 enum State {
74 kBeforeEdge, 74 kBeforeEdge,
75 kAfterEdge, 75 kAfterEdge,
76 kDone 76 kDone
77 }; 77 };
78 78
79 class BlurDrawLooperContext : public SkDrawLooper::Context { 79 class BlurDrawLooperContext : public SkDrawLooper::Context {
80 public: 80 public:
81 explicit BlurDrawLooperContext(const SkBlurDrawLooper* looper); 81 explicit BlurDrawLooperContext(const SkBlurDrawLooper* looper);
82 82
83 bool next(SkCanvas* canvas, SkPaint* paint) override; 83 bool next(SkCanvas* canvas, SkPaint* paint) override;
84 84
85 private: 85 private:
86 const SkBlurDrawLooper* fLooper; 86 const SkBlurDrawLooper* fLooper;
87 State fState; 87 State fState;
88 }; 88 };
89 89
90 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);
91 void initEffects(); 91 void initEffects();
92 92
93 typedef SkDrawLooper INHERITED; 93 typedef SkDrawLooper INHERITED;
94 }; 94 };
95 95
96 #endif 96 #endif
OLDNEW
« no previous file with comments | « include/core/SkShader.h ('k') | include/effects/SkColorCubeFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698