| 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 "SkBlurDrawLooper.h" | 8 #include "SkBlurDrawLooper.h" |
| 9 #include "SkBlurMask.h" // just for SkBlurMask::ConvertRadiusToSigma | 9 #include "SkBlurMask.h" // just for SkBlurMask::ConvertRadiusToSigma |
| 10 #include "SkBlurMaskFilter.h" | 10 #include "SkBlurMaskFilter.h" |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 case kAfterEdge: | 131 case kAfterEdge: |
| 132 canvas->restore(); | 132 canvas->restore(); |
| 133 fState = kDone; | 133 fState = kDone; |
| 134 return true; | 134 return true; |
| 135 default: | 135 default: |
| 136 SkASSERT(kDone == fState); | 136 SkASSERT(kDone == fState); |
| 137 return false; | 137 return false; |
| 138 } | 138 } |
| 139 } | 139 } |
| 140 | 140 |
| 141 #ifdef SK_DEVELOPER | 141 #ifndef SK_IGNORE_TO_STRING |
| 142 void SkBlurDrawLooper::toString(SkString* str) const { | 142 void SkBlurDrawLooper::toString(SkString* str) const { |
| 143 str->append("SkBlurDrawLooper: "); | 143 str->append("SkBlurDrawLooper: "); |
| 144 | 144 |
| 145 str->append("dx: "); | 145 str->append("dx: "); |
| 146 str->appendScalar(fDx); | 146 str->appendScalar(fDx); |
| 147 | 147 |
| 148 str->append(" dy: "); | 148 str->append(" dy: "); |
| 149 str->appendScalar(fDy); | 149 str->appendScalar(fDy); |
| 150 | 150 |
| 151 str->append(" color: "); | 151 str->append(" color: "); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 162 &needsSeparator); | 162 &needsSeparator); |
| 163 SkAddFlagToString(str, SkToBool(kHighQuality_BlurFlag & fBlurFlags), "Hi
ghQuality", | 163 SkAddFlagToString(str, SkToBool(kHighQuality_BlurFlag & fBlurFlags), "Hi
ghQuality", |
| 164 &needsSeparator); | 164 &needsSeparator); |
| 165 } | 165 } |
| 166 str->append(")"); | 166 str->append(")"); |
| 167 | 167 |
| 168 // TODO: add optional "fBlurFilter->toString(str);" when SkMaskFilter::toStr
ing is added | 168 // TODO: add optional "fBlurFilter->toString(str);" when SkMaskFilter::toStr
ing is added |
| 169 // alternatively we could cache the radius in SkBlurDrawLooper and just add
it here | 169 // alternatively we could cache the radius in SkBlurDrawLooper and just add
it here |
| 170 } | 170 } |
| 171 #endif | 171 #endif |
| OLD | NEW |