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

Unified Diff: src/effects/gradients/Sk4fLinearGradient.h

Issue 1816883002: Refactor 4f gradients using trait templates (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Created 4 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 | « src/effects/gradients/Sk4fGradientPriv.h ('k') | src/effects/gradients/Sk4fLinearGradient.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/gradients/Sk4fLinearGradient.h
diff --git a/src/effects/gradients/Sk4fLinearGradient.h b/src/effects/gradients/Sk4fLinearGradient.h
index 30292c361f0c24cc31e0aacae5170daf5de0481b..dc7a1795834e7a6128d6cd775656f4208b82f9a5 100644
--- a/src/effects/gradients/Sk4fLinearGradient.h
+++ b/src/effects/gradients/Sk4fLinearGradient.h
@@ -27,14 +27,16 @@ protected:
private:
using INHERITED = GradientShaderBase4fContext;
- template<typename DstType, SkColorProfileType, TileMode>
+ template<DstType, TileMode>
class LinearIntervalProcessor;
- template <typename DstType, SkColorProfileType, ApplyPremul>
- void shadePremulSpan(int x, int y, DstType[], int count) const;
+ template <DstType dstType, ApplyPremul premul>
+ void shadePremulSpan(int x, int y, typename DstTraits<dstType, premul>::Type[],
+ int count) const;
- template <typename DstType, SkColorProfileType, ApplyPremul, SkShader::TileMode tileMode>
- void shadeSpanInternal(int x, int y, DstType[], int count) const;
+ template <DstType dstType, ApplyPremul premul, SkShader::TileMode tileMode>
+ void shadeSpanInternal(int x, int y, typename DstTraits<dstType, premul>::Type[],
+ int count) const;
const Interval* findInterval(SkScalar fx) const;
« no previous file with comments | « src/effects/gradients/Sk4fGradientPriv.h ('k') | src/effects/gradients/Sk4fLinearGradient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698