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

Unified Diff: Source/platform/graphics/skia/SkiaUtils.h

Issue 1008173003: Move SkPaint mangement for 2D canvas into CanvasRenderingContext2DState (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: applied review comments Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/platform/graphics/ImageBufferSurface.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/skia/SkiaUtils.h
diff --git a/Source/platform/graphics/skia/SkiaUtils.h b/Source/platform/graphics/skia/SkiaUtils.h
index 91a916dc997069c3950de45d6c7402901e0428bc..1aa4f1929a7cd7bdafbffb9b7a68d4756eb952ec 100644
--- a/Source/platform/graphics/skia/SkiaUtils.h
+++ b/Source/platform/graphics/skia/SkiaUtils.h
@@ -129,6 +129,13 @@ InterpolationQuality computeInterpolationQuality(
bool shouldDrawAntiAliased(const GraphicsContext*, const SkRect& destRect);
+// This replicates the old skia behavior when it used to take radius for blur. Now it takes sigma.
+inline SkScalar skBlurRadiusToSigma(SkScalar radius)
+{
+ SkASSERT(radius > 0);
+ return 0.288675f * radius + 0.5f;
+}
+
} // namespace blink
#endif // SkiaUtils_h
« no previous file with comments | « Source/platform/graphics/ImageBufferSurface.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698