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/SkTwoPointConicalGradient.h

Issue 264843006: create struct to hold all the params passed around for shader::context (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: address review comments Created 6 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 SkTwoPointConicalGradient_DEFINED 9 #ifndef SkTwoPointConicalGradient_DEFINED
10 #define SkTwoPointConicalGradient_DEFINED 10 #define SkTwoPointConicalGradient_DEFINED
(...skipping 30 matching lines...) Expand all
41 TwoPtRadial fRec; 41 TwoPtRadial fRec;
42 void init(); 42 void init();
43 43
44 public: 44 public:
45 SkTwoPointConicalGradient(const SkPoint& start, SkScalar startRadius, 45 SkTwoPointConicalGradient(const SkPoint& start, SkScalar startRadius,
46 const SkPoint& end, SkScalar endRadius, 46 const SkPoint& end, SkScalar endRadius,
47 bool flippedGrad, const Descriptor&, 47 bool flippedGrad, const Descriptor&,
48 const SkMatrix* localMatrix); 48 const SkMatrix* localMatrix);
49 49
50 50
51 virtual SkShader::Context* createContext(const SkBitmap&, const SkPaint&, co nst SkMatrix&, 51 virtual SkShader::Context* createContext(const ContextRec&, void* storage) c onst SK_OVERRIDE;
52 void* storage) const SK_OVERRIDE;
53 virtual size_t contextSize() const SK_OVERRIDE; 52 virtual size_t contextSize() const SK_OVERRIDE;
54 53
55 class TwoPointConicalGradientContext : public SkGradientShaderBase::Gradient ShaderBaseContext { 54 class TwoPointConicalGradientContext : public SkGradientShaderBase::Gradient ShaderBaseContext {
56 public: 55 public:
57 TwoPointConicalGradientContext(const SkTwoPointConicalGradient& shader, 56 TwoPointConicalGradientContext(const SkTwoPointConicalGradient&, const C ontextRec&);
58 const SkBitmap& device,
59 const SkPaint& paint,
60 const SkMatrix& matrix);
61 ~TwoPointConicalGradientContext() {} 57 ~TwoPointConicalGradientContext() {}
62 58
63 virtual void shadeSpan(int x, int y, SkPMColor dstC[], int count) SK_OVE RRIDE; 59 virtual void shadeSpan(int x, int y, SkPMColor dstC[], int count) SK_OVE RRIDE;
64 60
65 private: 61 private:
66 typedef SkGradientShaderBase::GradientShaderBaseContext INHERITED; 62 typedef SkGradientShaderBase::GradientShaderBaseContext INHERITED;
67 }; 63 };
68 64
69 virtual BitmapType asABitmap(SkBitmap* bitmap, 65 virtual BitmapType asABitmap(SkBitmap* bitmap,
70 SkMatrix* matrix, 66 SkMatrix* matrix,
(...skipping 21 matching lines...) Expand all
92 SkPoint fCenter1; 88 SkPoint fCenter1;
93 SkPoint fCenter2; 89 SkPoint fCenter2;
94 SkScalar fRadius1; 90 SkScalar fRadius1;
95 SkScalar fRadius2; 91 SkScalar fRadius2;
96 bool fFlippedGrad; 92 bool fFlippedGrad;
97 93
98 typedef SkGradientShaderBase INHERITED; 94 typedef SkGradientShaderBase INHERITED;
99 }; 95 };
100 96
101 #endif 97 #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