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

Unified Diff: src/core/SkSRGB.h

Issue 2471133002: Set analytic AA as default. (Closed)
Patch Set: Turn some asserts off due to srgb issues Created 4 years, 1 month 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 | « no previous file | src/core/SkScan.cpp » ('j') | src/core/SkXfermode.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkSRGB.h
diff --git a/src/core/SkSRGB.h b/src/core/SkSRGB.h
index a12ce9615db8da5631e723b503e3968a8e614c4c..b2ed03f0f1a0fc49066eaccead612ace282b253f 100644
--- a/src/core/SkSRGB.h
+++ b/src/core/SkSRGB.h
@@ -61,7 +61,8 @@ template <int N>
static inline SkNx<N,int> sk_linear_to_srgb_noclamp(const SkNx<N,float>& x) {
auto f = sk_linear_to_srgb_needs_trunc(x);
for (int i = 0; i < 4; i++) {
- SkASSERTF(0.0f <= f[i] && f[i] < 256.0f, "f[%d] was %g, outside [0,256)\n", i, f[i]);
+ // Turn this assert off for now because srgb conversions may end up in rgb > a
+ // SkASSERTF(0.0f <= f[i] && f[i] < 256.0f, "f[%d] was %g, outside [0,256)\n", i, f[i]);
mtklein_C 2016/11/02 18:48:19 There's a slightly better solution, which is to de
liyuqian 2016/11/02 19:33:11 Thank you! I saw your follow up CL. Feel free to l
}
return SkNx_cast<int>(f);
}
« no previous file with comments | « no previous file | src/core/SkScan.cpp » ('j') | src/core/SkXfermode.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698