OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2006,2007,2008, Google Inc. All rights reserved. | 2 * Copyright (c) 2006,2007,2008, Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 InterpolationQuality computeInterpolationQuality( | 122 InterpolationQuality computeInterpolationQuality( |
123 const SkMatrix&, | 123 const SkMatrix&, |
124 float srcWidth, | 124 float srcWidth, |
125 float srcHeight, | 125 float srcHeight, |
126 float destWidth, | 126 float destWidth, |
127 float destHeight, | 127 float destHeight, |
128 bool isDataComplete = true); | 128 bool isDataComplete = true); |
129 | 129 |
130 bool shouldDrawAntiAliased(const GraphicsContext*, const SkRect& destRect); | 130 bool shouldDrawAntiAliased(const GraphicsContext*, const SkRect& destRect); |
131 | 131 |
| 132 // This replicates the old skia behavior when it used to take radius for blur. N
ow it takes sigma. |
| 133 inline SkScalar skBlurRadiusToSigma(SkScalar radius) |
| 134 { |
| 135 SkASSERT(radius > 0); |
| 136 return 0.288675f * radius + 0.5f; |
| 137 } |
| 138 |
132 } // namespace blink | 139 } // namespace blink |
133 | 140 |
134 #endif // SkiaUtils_h | 141 #endif // SkiaUtils_h |
OLD | NEW |