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

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

Issue 2041113004: sk_sp for gpu. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Reserve correctly. Created 4 years, 6 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
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 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 SkTwoPointConicalGradient_DEFINED 8 #ifndef SkTwoPointConicalGradient_DEFINED
9 #define SkTwoPointConicalGradient_DEFINED 9 #define SkTwoPointConicalGradient_DEFINED
10 10
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 ~TwoPointConicalGradientContext() {} 50 ~TwoPointConicalGradientContext() {}
51 51
52 void shadeSpan(int x, int y, SkPMColor dstC[], int count) override; 52 void shadeSpan(int x, int y, SkPMColor dstC[], int count) override;
53 53
54 private: 54 private:
55 typedef SkGradientShaderBase::GradientShaderBaseContext INHERITED; 55 typedef SkGradientShaderBase::GradientShaderBaseContext INHERITED;
56 }; 56 };
57 57
58 SkShader::GradientType asAGradient(GradientInfo* info) const override; 58 SkShader::GradientType asAGradient(GradientInfo* info) const override;
59 #if SK_SUPPORT_GPU 59 #if SK_SUPPORT_GPU
60 const GrFragmentProcessor* asFragmentProcessor(GrContext*, 60 sk_sp<GrFragmentProcessor> asFragmentProcessor(GrContext*,
61 const SkMatrix&, 61 const SkMatrix&,
62 const SkMatrix*, 62 const SkMatrix*,
63 SkFilterQuality, 63 SkFilterQuality,
64 SkSourceGammaTreatment) const override; 64 SkSourceGammaTreatment) const override;
65 #endif 65 #endif
66 bool isOpaque() const override; 66 bool isOpaque() const override;
67 67
68 SkScalar getCenterX1() const { return SkPoint::Distance(fCenter1, fCenter2); } 68 SkScalar getCenterX1() const { return SkPoint::Distance(fCenter1, fCenter2); }
69 SkScalar getStartRadius() const { return fRadius1; } 69 SkScalar getStartRadius() const { return fRadius1; }
70 SkScalar getDiffRadius() const { return fRadius2 - fRadius1; } 70 SkScalar getDiffRadius() const { return fRadius2 - fRadius1; }
(...skipping 16 matching lines...) Expand all
87 SkPoint fCenter2; 87 SkPoint fCenter2;
88 SkScalar fRadius1; 88 SkScalar fRadius1;
89 SkScalar fRadius2; 89 SkScalar fRadius2;
90 bool fFlippedGrad; 90 bool fFlippedGrad;
91 91
92 friend class SkGradientShader; 92 friend class SkGradientShader;
93 typedef SkGradientShaderBase INHERITED; 93 typedef SkGradientShaderBase INHERITED;
94 }; 94 };
95 95
96 #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