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

Unified Diff: include/core/SkColorPriv.h

Issue 1311583005: Add special case circle blur for Ganesh (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix no-GPU build 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/SkColorPriv.h
diff --git a/include/core/SkColorPriv.h b/include/core/SkColorPriv.h
index 3dec49b73e06846f21d13e43cb2082af9e345244..6347660dbc99e554ce33be73db35e4258dfd50c9 100644
--- a/include/core/SkColorPriv.h
+++ b/include/core/SkColorPriv.h
@@ -218,6 +218,16 @@ static inline int SkAlphaBlend255(S16CPU src, S16CPU dst, U8CPU alpha) {
return dst + prod;
}
+static inline U8CPU SkUnitScalarClampToByte(SkScalar x) {
+ if (x < 0) {
+ return 0;
+ }
+ if (x >= SK_Scalar1) {
+ return 255;
+ }
+ return SkScalarToFixed(x) >> 8;
+}
+
#define SK_R16_BITS 5
#define SK_G16_BITS 6
#define SK_B16_BITS 5
« 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