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

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

Issue 1764183002: Relocate the specialized linear gradient interval builder (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 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 24 matching lines...) Expand all
35 bool isZeroRamp() const { return fZeroRamp; } 35 bool isZeroRamp() const { return fZeroRamp; }
36 36
37 // true when fx is in [p0,p1) 37 // true when fx is in [p0,p1)
38 bool contains(SkScalar fx) const; 38 bool contains(SkScalar fx) const;
39 39
40 SkPM4f fC0, fDc; 40 SkPM4f fC0, fDc;
41 SkScalar fP0, fP1; 41 SkScalar fP0, fP1;
42 bool fZeroRamp; 42 bool fZeroRamp;
43 }; 43 };
44 44
45 const Interval* findInterval(SkScalar fx) const;
46
47 SkSTArray<8, Interval, true> fIntervals; 45 SkSTArray<8, Interval, true> fIntervals;
48 SkMatrix fDstToPos; 46 SkMatrix fDstToPos;
49 SkMatrix::MapXYProc fDstToPosProc; 47 SkMatrix::MapXYProc fDstToPosProc;
50 uint8_t fDstToPosClass; 48 uint8_t fDstToPosClass;
51 uint8_t fFlags; 49 uint8_t fFlags;
52 bool fDither; 50 bool fDither;
53 bool fColorsArePremul; 51 bool fColorsArePremul;
54 52
55 private: 53 private:
56 using INHERITED = SkShader::Context; 54 using INHERITED = SkShader::Context;
57
58 void addMirrorIntervals(const SkGradientShaderBase&, const Sk4f& componentSc ale,
59 bool dx_is_pos);
60
61 mutable const Interval* fCachedInterval;
62 }; 55 };
63 56
64 #endif // Sk4fGradientBase_DEFINED 57 #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