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

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

Issue 1770153002: Fix 4f gradient swizzle post http://crrev.com/1774523002 (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: float mult 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 11 matching lines...) Expand all
22 GradientShaderBase4fContext(const SkGradientShaderBase&, 22 GradientShaderBase4fContext(const SkGradientShaderBase&,
23 const ContextRec&); 23 const ContextRec&);
24 24
25 uint32_t getFlags() const override { return fFlags; } 25 uint32_t getFlags() const override { return fFlags; }
26 26
27 protected: 27 protected:
28 struct Interval { 28 struct Interval {
29 Interval(SkPMColor c0, SkScalar p0, 29 Interval(SkPMColor c0, SkScalar p0,
30 SkPMColor c1, SkScalar p1, 30 SkPMColor c1, SkScalar p1,
31 const Sk4f& componentScale); 31 const Sk4f& componentScale);
32 Interval(const Sk4f& c0, const Sk4f& dc,
33 SkScalar p0, SkScalar p1);
34 32
35 bool isZeroRamp() const { return fZeroRamp; } 33 bool isZeroRamp() const { return fZeroRamp; }
36 34
37 // true when fx is in [p0,p1) 35 // true when fx is in [p0,p1)
38 bool contains(SkScalar fx) const; 36 bool contains(SkScalar fx) const;
39 37
40 SkPM4f fC0, fDc; 38 SkPM4f fC0, fDc;
41 SkScalar fP0, fP1; 39 SkScalar fP0, fP1;
42 bool fZeroRamp; 40 bool fZeroRamp;
43 }; 41 };
44 42
45 SkSTArray<8, Interval, true> fIntervals; 43 SkSTArray<8, Interval, true> fIntervals;
46 SkMatrix fDstToPos; 44 SkMatrix fDstToPos;
47 SkMatrix::MapXYProc fDstToPosProc; 45 SkMatrix::MapXYProc fDstToPosProc;
48 uint8_t fDstToPosClass; 46 uint8_t fDstToPosClass;
49 uint8_t fFlags; 47 uint8_t fFlags;
50 bool fDither; 48 bool fDither;
51 bool fColorsArePremul; 49 bool fColorsArePremul;
52 50
53 private: 51 private:
54 using INHERITED = SkShader::Context; 52 using INHERITED = SkShader::Context;
55 }; 53 };
56 54
57 #endif // Sk4fGradientBase_DEFINED 55 #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