| 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 // Determine if a given WebKit point is contained in a path | 111 // Determine if a given WebKit point is contained in a path |
| 112 bool SkPathContainsPoint(const SkPath&, const FloatPoint&, SkPath::FillType); | 112 bool SkPathContainsPoint(const SkPath&, const FloatPoint&, SkPath::FillType); |
| 113 | 113 |
| 114 SkMatrix PLATFORM_EXPORT affineTransformToSkMatrix(const AffineTransform&); | 114 SkMatrix PLATFORM_EXPORT affineTransformToSkMatrix(const AffineTransform&); |
| 115 | 115 |
| 116 bool nearlyIntegral(float value); | 116 bool nearlyIntegral(float value); |
| 117 | 117 |
| 118 InterpolationQuality limitInterpolationQuality(const GraphicsContext*, Interpola
tionQuality resampling); | 118 InterpolationQuality limitInterpolationQuality(const GraphicsContext*, Interpola
tionQuality resampling); |
| 119 | 119 |
| 120 InterpolationQuality computeInterpolationQuality( | 120 InterpolationQuality computeInterpolationQuality( |
| 121 const SkMatrix&, | |
| 122 float srcWidth, | 121 float srcWidth, |
| 123 float srcHeight, | 122 float srcHeight, |
| 124 float destWidth, | 123 float destWidth, |
| 125 float destHeight, | 124 float destHeight, |
| 126 bool isDataComplete = true); | 125 bool isDataComplete = true); |
| 127 | 126 |
| 128 // This replicates the old skia behavior when it used to take radius for blur. N
ow it takes sigma. | 127 // This replicates the old skia behavior when it used to take radius for blur. N
ow it takes sigma. |
| 129 inline SkScalar skBlurRadiusToSigma(SkScalar radius) | 128 inline SkScalar skBlurRadiusToSigma(SkScalar radius) |
| 130 { | 129 { |
| 131 SkASSERT(radius >= 0); | 130 SkASSERT(radius >= 0); |
| 132 return 0.288675f * radius + 0.5f; | 131 return 0.288675f * radius + 0.5f; |
| 133 } | 132 } |
| 134 | 133 |
| 135 template<typename PrimitiveType> | 134 template<typename PrimitiveType> |
| 136 void drawPlatformFocusRing(const PrimitiveType&, SkCanvas*, SkColor, int width); | 135 void drawPlatformFocusRing(const PrimitiveType&, SkCanvas*, SkColor, int width); |
| 137 | 136 |
| 138 } // namespace blink | 137 } // namespace blink |
| 139 | 138 |
| 140 #endif // SkiaUtils_h | 139 #endif // SkiaUtils_h |
| OLD | NEW |