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

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

Issue 1808963005: 4f linear gradient shader blitters (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: rename trunc_from_255 to quiet confused msvc 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 unified diff | Download patch
« no previous file with comments | « src/core/SkXfermodeU64.cpp ('k') | 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
11 #include "Sk4fGradientPriv.h"
11 #include "SkColor.h" 12 #include "SkColor.h"
12 #include "SkGradientShaderPriv.h" 13 #include "SkGradientShaderPriv.h"
13 #include "SkMatrix.h" 14 #include "SkMatrix.h"
14 #include "SkNx.h" 15 #include "SkNx.h"
15 #include "SkPM4f.h" 16 #include "SkPM4f.h"
16 #include "SkShader.h" 17 #include "SkShader.h"
17 #include "SkTArray.h" 18 #include "SkTArray.h"
18 19
19 class SkGradientShaderBase:: 20 class SkGradientShaderBase::
20 GradientShaderBase4fContext : public SkShader::Context { 21 GradientShaderBase4fContext : public SkShader::Context {
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 55
55 private: 56 private:
56 using INHERITED = SkShader::Context; 57 using INHERITED = SkShader::Context;
57 58
58 void addMirrorIntervals(const SkGradientShaderBase&, 59 void addMirrorIntervals(const SkGradientShaderBase&,
59 const Sk4f& componentScale, bool reverse); 60 const Sk4f& componentScale, bool reverse);
60 61
61 template<typename DstType, SkShader::TileMode tileMode> 62 template<typename DstType, SkShader::TileMode tileMode>
62 class TSampler; 63 class TSampler;
63 64
64 template <typename DstType, bool do_premul> 65 template <typename DstType, ApplyPremul>
65 void shadePremulSpan(int x, int y, DstType[], int count) const; 66 void shadePremulSpan(int x, int y, DstType[], int count) const;
66 67
67 template <typename DstType, bool do_premul, SkShader::TileMode tileMode> 68 template <typename DstType, ApplyPremul, SkShader::TileMode tileMode>
68 void shadeSpanInternal(int x, int y, DstType[], int count) const; 69 void shadeSpanInternal(int x, int y, DstType[], int count) const;
69 }; 70 };
70 71
71 #endif // Sk4fGradientBase_DEFINED 72 #endif // Sk4fGradientBase_DEFINED
OLDNEW
« no previous file with comments | « src/core/SkXfermodeU64.cpp ('k') | src/effects/gradients/Sk4fGradientBase.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698