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

Side by Side Diff: src/effects/SkBlurMaskFilter.cpp

Issue 308953002: remove SK_SUPPORT_LEGACY_BLURMASKFILTER_STYLE (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « include/effects/SkBlurMaskFilter.h ('k') | no next file » | 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 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
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 8
9 #include "SkBlurMaskFilter.h" 9 #include "SkBlurMaskFilter.h"
10 #include "SkBlurMask.h" 10 #include "SkBlurMask.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 } 118 }
119 if ((unsigned)style > (unsigned)kLastEnum_SkBlurStyle) { 119 if ((unsigned)style > (unsigned)kLastEnum_SkBlurStyle) {
120 return NULL; 120 return NULL;
121 } 121 }
122 if (flags > SkBlurMaskFilter::kAll_BlurFlag) { 122 if (flags > SkBlurMaskFilter::kAll_BlurFlag) {
123 return NULL; 123 return NULL;
124 } 124 }
125 return SkNEW_ARGS(SkBlurMaskFilterImpl, (sigma, style, flags)); 125 return SkNEW_ARGS(SkBlurMaskFilterImpl, (sigma, style, flags));
126 } 126 }
127 127
128 #ifdef SK_SUPPORT_LEGACY_BLURMASKFILTER_STYLE
129 SkMaskFilter* SkBlurMaskFilter::Create(SkScalar radius,
130 SkBlurMaskFilter::BlurStyle style,
131 uint32_t flags) {
132 SkScalar sigma = SkBlurMask::ConvertRadiusToSigma(radius);
133 return Create((SkBlurStyle)style, sigma, flags);
134 }
135
136 SkMaskFilter* SkBlurMaskFilter::Create(SkBlurMaskFilter::BlurStyle style,
137 SkScalar sigma,
138 uint32_t flags) {
139 return Create((SkBlurStyle)style, sigma, flags);
140 }
141 #endif
142
143 /////////////////////////////////////////////////////////////////////////////// 128 ///////////////////////////////////////////////////////////////////////////////
144 129
145 SkBlurMaskFilterImpl::SkBlurMaskFilterImpl(SkScalar sigma, SkBlurStyle style, ui nt32_t flags) 130 SkBlurMaskFilterImpl::SkBlurMaskFilterImpl(SkScalar sigma, SkBlurStyle style, ui nt32_t flags)
146 : fSigma(sigma) 131 : fSigma(sigma)
147 , fBlurStyle(style) 132 , fBlurStyle(style)
148 , fBlurFlags(flags) { 133 , fBlurFlags(flags) {
149 SkASSERT(fSigma > 0); 134 SkASSERT(fSigma > 0);
150 SkASSERT((unsigned)style <= kLastEnum_SkBlurStyle); 135 SkASSERT((unsigned)style <= kLastEnum_SkBlurStyle);
151 SkASSERT(flags <= SkBlurMaskFilter::kAll_BlurFlag); 136 SkASSERT(flags <= SkBlurMaskFilter::kAll_BlurFlag);
152 } 137 }
(...skipping 1071 matching lines...) Expand 10 before | Expand all | Expand 10 after
1224 } else { 1209 } else {
1225 str->append("None"); 1210 str->append("None");
1226 } 1211 }
1227 str->append("))"); 1212 str->append("))");
1228 } 1213 }
1229 #endif 1214 #endif
1230 1215
1231 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkBlurMaskFilter) 1216 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkBlurMaskFilter)
1232 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurMaskFilterImpl) 1217 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkBlurMaskFilterImpl)
1233 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END 1218 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END
OLDNEW
« no previous file with comments | « include/effects/SkBlurMaskFilter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698