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

Unified Diff: src/effects/gradients/SkTwoPointRadialGradient.h

Issue 241283003: Revert of Extract most of the mutable state of SkShader into a separate Context object. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: src/effects/gradients/SkTwoPointRadialGradient.h
diff --git a/src/effects/gradients/SkTwoPointRadialGradient.h b/src/effects/gradients/SkTwoPointRadialGradient.h
index 9ba89f292085a44c93211f86ccd4385ad872dc98..ee1b49ee952ce52a79c36245c05a3aef69c0837c 100644
--- a/src/effects/gradients/SkTwoPointRadialGradient.h
+++ b/src/effects/gradients/SkTwoPointRadialGradient.h
@@ -23,26 +23,11 @@
virtual GradientType asAGradient(GradientInfo* info) const SK_OVERRIDE;
virtual GrEffectRef* asNewEffect(GrContext* context, const SkPaint&) const SK_OVERRIDE;
-
- virtual size_t contextSize() const SK_OVERRIDE;
- virtual bool validContext(const SkBitmap&, const SkPaint&,
- const SkMatrix&, SkMatrix* totalInverse = NULL) const SK_OVERRIDE;
- virtual SkShader::Context* createContext(const SkBitmap&, const SkPaint&, const SkMatrix&,
- void* storage) const SK_OVERRIDE;
-
- class TwoPointRadialGradientContext : public SkGradientShaderBase::GradientShaderBaseContext {
- public:
- TwoPointRadialGradientContext(const SkTwoPointRadialGradient& shader,
- const SkBitmap& device,
- const SkPaint& paint,
- const SkMatrix& matrix);
- ~TwoPointRadialGradientContext() {}
-
- virtual void shadeSpan(int x, int y, SkPMColor dstC[], int count) SK_OVERRIDE;
-
- private:
- typedef SkGradientShaderBase::GradientShaderBaseContext INHERITED;
- };
+ virtual void shadeSpan(int x, int y, SkPMColor* dstCParam,
+ int count) SK_OVERRIDE;
+ virtual bool setContext(const SkBitmap& device,
+ const SkPaint& paint,
+ const SkMatrix& matrix) SK_OVERRIDE;
SkScalar getCenterX1() const { return fDiff.length(); }
SkScalar getStartRadius() const { return fStartRadius; }
@@ -56,6 +41,7 @@
virtual void flatten(SkWriteBuffer& buffer) const SK_OVERRIDE;
private:
+ typedef SkGradientShaderBase INHERITED;
const SkPoint fCenter1;
const SkPoint fCenter2;
const SkScalar fRadius1;
@@ -64,8 +50,6 @@
SkScalar fStartRadius, fDiffRadius, fSr2D2, fA, fOneOverTwoA;
void init();
-
- typedef SkGradientShaderBase INHERITED;
};
#endif
« no previous file with comments | « src/effects/gradients/SkTwoPointConicalGradient.cpp ('k') | src/effects/gradients/SkTwoPointRadialGradient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698