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

Unified Diff: src/effects/gradients/Sk4fGradientBase.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 | « no previous file | src/effects/gradients/Sk4fGradientBase.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/gradients/Sk4fGradientBase.h
diff --git a/src/effects/gradients/Sk4fGradientBase.h b/src/effects/gradients/Sk4fGradientBase.h
index 03f7e6ef2606b610f914cf1ee2eacd840503eea7..ddd0b2bc466dc2bce365a54f335f2ec1fb22dea8 100644
--- a/src/effects/gradients/Sk4fGradientBase.h
+++ b/src/effects/gradients/Sk4fGradientBase.h
@@ -59,14 +59,16 @@ private:
void addMirrorIntervals(const SkGradientShaderBase&,
const Sk4f& componentScale, bool reverse);
- template<typename DstType, SkShader::TileMode tileMode>
+ template<DstType, SkShader::TileMode tileMode>
class TSampler;
- template <typename DstType, 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, 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;
};
#endif // Sk4fGradientBase_DEFINED
« no previous file with comments | « no previous file | src/effects/gradients/Sk4fGradientBase.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698