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

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

Issue 372053003: Revert of Make GrDrawState and GrPaint take GrEffect* instead of GrEffectRef*. (Closed) Base URL: https://skia.googlesource.com/skia.git@no_ref
Patch Set: Created 6 years, 5 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 /* 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 SkTwoPointRadialGradient_DEFINED 9 #ifndef SkTwoPointRadialGradient_DEFINED
10 #define SkTwoPointRadialGradient_DEFINED 10 #define SkTwoPointRadialGradient_DEFINED
11 11
12 #include "SkGradientShaderPriv.h" 12 #include "SkGradientShaderPriv.h"
13 13
14 class SkTwoPointRadialGradient : public SkGradientShaderBase { 14 class SkTwoPointRadialGradient : public SkGradientShaderBase {
15 public: 15 public:
16 SkTwoPointRadialGradient(const SkPoint& start, SkScalar startRadius, 16 SkTwoPointRadialGradient(const SkPoint& start, SkScalar startRadius,
17 const SkPoint& end, SkScalar endRadius, 17 const SkPoint& end, SkScalar endRadius,
18 const Descriptor&, const SkMatrix* localMatrix); 18 const Descriptor&, const SkMatrix* localMatrix);
19 19
20 virtual BitmapType asABitmap(SkBitmap* bitmap, 20 virtual BitmapType asABitmap(SkBitmap* bitmap,
21 SkMatrix* matrix, 21 SkMatrix* matrix,
22 TileMode* xy) const SK_OVERRIDE; 22 TileMode* xy) const SK_OVERRIDE;
23 virtual GradientType asAGradient(GradientInfo* info) const SK_OVERRIDE; 23 virtual GradientType asAGradient(GradientInfo* info) const SK_OVERRIDE;
24 virtual bool asNewEffect(GrContext* context, const SkPaint&, const SkMatrix* , GrColor*, 24 virtual bool asNewEffect(GrContext* context, const SkPaint&, const SkMatrix* , GrColor*,
25 GrEffect**) const SK_OVERRIDE; 25 GrEffectRef**) const SK_OVERRIDE;
26 26
27 virtual size_t contextSize() const SK_OVERRIDE; 27 virtual size_t contextSize() const SK_OVERRIDE;
28 28
29 class TwoPointRadialGradientContext : public SkGradientShaderBase::GradientS haderBaseContext { 29 class TwoPointRadialGradientContext : public SkGradientShaderBase::GradientS haderBaseContext {
30 public: 30 public:
31 TwoPointRadialGradientContext(const SkTwoPointRadialGradient&, const Con textRec&); 31 TwoPointRadialGradientContext(const SkTwoPointRadialGradient&, const Con textRec&);
32 32
33 virtual void shadeSpan(int x, int y, SkPMColor dstC[], int count) SK_OVE RRIDE; 33 virtual void shadeSpan(int x, int y, SkPMColor dstC[], int count) SK_OVE RRIDE;
34 34
35 private: 35 private:
(...skipping 19 matching lines...) Expand all
55 const SkScalar fRadius2; 55 const SkScalar fRadius2;
56 SkPoint fDiff; 56 SkPoint fDiff;
57 SkScalar fStartRadius, fDiffRadius, fSr2D2, fA, fOneOverTwoA; 57 SkScalar fStartRadius, fDiffRadius, fSr2D2, fA, fOneOverTwoA;
58 58
59 void init(); 59 void init();
60 60
61 typedef SkGradientShaderBase INHERITED; 61 typedef SkGradientShaderBase INHERITED;
62 }; 62 };
63 63
64 #endif 64 #endif
OLDNEW
« no previous file with comments | « src/effects/gradients/SkTwoPointConicalGradient_gpu.h ('k') | src/effects/gradients/SkTwoPointRadialGradient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698