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

Side by Side Diff: src/effects/gradients/Sk4fGradientBase.h

Issue 2416233002: Faster 4f gradient premul path (Closed)
Patch Set: Created 4 years, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/effects/gradients/Sk4fGradientBase.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2016 Google Inc. 2 * Copyright 2016 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef Sk4fGradientBase_DEFINED 8 #ifndef Sk4fGradientBase_DEFINED
9 #define Sk4fGradientBase_DEFINED 9 #define Sk4fGradientBase_DEFINED
10 10
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 uint8_t fFlags; 53 uint8_t fFlags;
54 bool fDither; 54 bool fDither;
55 bool fColorsArePremul; 55 bool fColorsArePremul;
56 56
57 private: 57 private:
58 using INHERITED = SkShader::Context; 58 using INHERITED = SkShader::Context;
59 59
60 void addMirrorIntervals(const SkGradientShaderBase&, 60 void addMirrorIntervals(const SkGradientShaderBase&,
61 const Sk4f& componentScale, bool reverse); 61 const Sk4f& componentScale, bool reverse);
62 62
63 template<DstType, SkShader::TileMode tileMode> 63 template<DstType, ApplyPremul, SkShader::TileMode tileMode>
64 class TSampler; 64 class TSampler;
65 65
66 template <DstType dstType, ApplyPremul premul> 66 template <DstType dstType, ApplyPremul premul>
67 void shadePremulSpan(int x, int y, typename DstTraits<dstType, premul>::Type [], 67 void shadePremulSpan(int x, int y, typename DstTraits<dstType, premul>::Type [],
68 int count) const; 68 int count) const;
69 69
70 template <DstType dstType, ApplyPremul premul, SkShader::TileMode tileMode> 70 template <DstType dstType, ApplyPremul premul, SkShader::TileMode tileMode>
71 void shadeSpanInternal(int x, int y, typename DstTraits<dstType, premul>::Ty pe[], 71 void shadeSpanInternal(int x, int y, typename DstTraits<dstType, premul>::Ty pe[],
72 int count) const; 72 int count) const;
73 }; 73 };
74 74
75 #endif // Sk4fGradientBase_DEFINED 75 #endif // Sk4fGradientBase_DEFINED
OLDNEW
« 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