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

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

Issue 793763003: Gradient shaders: make fPtsToUnit const, pre-cache getType(). (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years 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
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #ifndef SkTwoPointConicalGradient_DEFINED 9 #ifndef SkTwoPointConicalGradient_DEFINED
10 #define SkTwoPointConicalGradient_DEFINED 10 #define SkTwoPointConicalGradient_DEFINED
(...skipping 21 matching lines...) Expand all
32 bool flipped); 32 bool flipped);
33 33
34 static bool DontDrawT(SkFixed t) { 34 static bool DontDrawT(SkFixed t) {
35 return kDontDrawT == (uint32_t)t; 35 return kDontDrawT == (uint32_t)t;
36 } 36 }
37 }; 37 };
38 38
39 39
40 class SkTwoPointConicalGradient : public SkGradientShaderBase { 40 class SkTwoPointConicalGradient : public SkGradientShaderBase {
41 TwoPtRadial fRec; 41 TwoPtRadial fRec;
42 void init();
43
44 public: 42 public:
45 SkTwoPointConicalGradient(const SkPoint& start, SkScalar startRadius, 43 SkTwoPointConicalGradient(const SkPoint& start, SkScalar startRadius,
46 const SkPoint& end, SkScalar endRadius, 44 const SkPoint& end, SkScalar endRadius,
47 bool flippedGrad, const Descriptor&); 45 bool flippedGrad, const Descriptor&);
48 46
49 47
50 virtual size_t contextSize() const SK_OVERRIDE; 48 virtual size_t contextSize() const SK_OVERRIDE;
51 49
52 class TwoPointConicalGradientContext : public SkGradientShaderBase::Gradient ShaderBaseContext { 50 class TwoPointConicalGradientContext : public SkGradientShaderBase::Gradient ShaderBaseContext {
53 public: 51 public:
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 SkPoint fCenter2; 87 SkPoint fCenter2;
90 SkScalar fRadius1; 88 SkScalar fRadius1;
91 SkScalar fRadius2; 89 SkScalar fRadius2;
92 bool fFlippedGrad; 90 bool fFlippedGrad;
93 91
94 friend class SkGradientShader; 92 friend class SkGradientShader;
95 typedef SkGradientShaderBase INHERITED; 93 typedef SkGradientShaderBase INHERITED;
96 }; 94 };
97 95
98 #endif 96 #endif
OLDNEW
« no previous file with comments | « src/effects/gradients/SkSweepGradient.cpp ('k') | src/effects/gradients/SkTwoPointConicalGradient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698