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

Unified Diff: include/core/SkColor.h

Issue 1311583005: Add special case circle blur for Ganesh (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address code review comments Created 5 years, 3 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 | « gyp/effects.gypi ('k') | include/core/SkMaskFilter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkColor.h
diff --git a/include/core/SkColor.h b/include/core/SkColor.h
index 1ba1331c1a7261f3faaba32002dc113ac9ed0397..008c16243f7ce743b5c0a3e8997857cb093d30d6 100644
--- a/include/core/SkColor.h
+++ b/include/core/SkColor.h
@@ -139,6 +139,16 @@ static inline SkColor SkHSVToColor(const SkScalar hsv[3])
return SkHSVToColor(0xFF, hsv);
}
+static inline U8CPU SkUnitScalarClampToByte(SkScalar x) {
reed1 2015/09/11 18:49:50 Does this need to be public?
robertphillips 2015/09/15 16:35:06 Done. Moved to SkColorPriv.h.
+ if (x < 0) {
+ return 0;
+ }
+ if (x >= SK_Scalar1) {
+ return 255;
+ }
+ return SkScalarToFixed(x) >> 8;
+}
+
////////////////////////////////////////////////////////////////////////
/** 32 bit ARGB color value, premultiplied. The byte order for this value is
« no previous file with comments | « gyp/effects.gypi ('k') | include/core/SkMaskFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698