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

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

Issue 15733007: use Descriptor struct to encapsulate all the common paramaeters between our various gradient types.… (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 7 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 | Annotate | Revision Log
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 SkColor colors[], const SkScalar pos[], 18 const Descriptor&);
19 int colorCount, SkShader::TileMode mode,
20 SkUnitMapper* mapper);
21 19
22 virtual BitmapType asABitmap(SkBitmap* bitmap, 20 virtual BitmapType asABitmap(SkBitmap* bitmap,
23 SkMatrix* matrix, 21 SkMatrix* matrix,
24 TileMode* xy) const SK_OVERRIDE; 22 TileMode* xy) const SK_OVERRIDE;
25 virtual GradientType asAGradient(GradientInfo* info) const SK_OVERRIDE; 23 virtual GradientType asAGradient(GradientInfo* info) const SK_OVERRIDE;
26 virtual GrEffectRef* asNewEffect(GrContext* context, const SkPaint&) const S K_OVERRIDE; 24 virtual GrEffectRef* asNewEffect(GrContext* context, const SkPaint&) const S K_OVERRIDE;
27 25
28 virtual void shadeSpan(int x, int y, SkPMColor* dstCParam, 26 virtual void shadeSpan(int x, int y, SkPMColor* dstCParam,
29 int count) SK_OVERRIDE; 27 int count) SK_OVERRIDE;
30 virtual bool setContext(const SkBitmap& device, 28 virtual bool setContext(const SkBitmap& device,
(...skipping 17 matching lines...) Expand all
48 const SkPoint fCenter2; 46 const SkPoint fCenter2;
49 const SkScalar fRadius1; 47 const SkScalar fRadius1;
50 const SkScalar fRadius2; 48 const SkScalar fRadius2;
51 SkPoint fDiff; 49 SkPoint fDiff;
52 SkScalar fStartRadius, fDiffRadius, fSr2D2, fA, fOneOverTwoA; 50 SkScalar fStartRadius, fDiffRadius, fSr2D2, fA, fOneOverTwoA;
53 51
54 void init(); 52 void init();
55 }; 53 };
56 54
57 #endif 55 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698