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

Unified Diff: src/effects/gradients/SkLinearGradient.cpp

Issue 1489233005: Don't use the Sk4f gradient impl without SIMD (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: SKNX_IS_FAST Created 5 years 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/opts/SkNx_avx.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/gradients/SkLinearGradient.cpp
diff --git a/src/effects/gradients/SkLinearGradient.cpp b/src/effects/gradients/SkLinearGradient.cpp
index f47b6ab30e7fa81392abd02afe9a5a89f38d687c..22683033e81096f8e63f0eeb0a0d5319a1468416 100644
--- a/src/effects/gradients/SkLinearGradient.cpp
+++ b/src/effects/gradients/SkLinearGradient.cpp
@@ -282,7 +282,8 @@ void SkLinearGradient::LinearGradientContext::shadeSpan(int x, int y, SkPMColor*
SkASSERT(count > 0);
const SkLinearGradient& linearGradient = static_cast<const SkLinearGradient&>(fShader);
-#ifndef SK_SUPPORT_LEGACY_LINEAR_GRADIENT_TABLE
+// Only use the Sk4f impl when known to be fast.
+#if defined(SKNX_IS_FAST)
if (SkShader::kClamp_TileMode == linearGradient.fTileMode &&
kLinear_MatrixClass == fDstToIndexClass)
{
« no previous file with comments | « no previous file | src/opts/SkNx_avx.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698