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

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

Issue 1114243005: remove (redundant) twopointradial shader (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 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
« no previous file with comments | « src/effects/gradients/SkGradientShader.cpp ('k') | src/effects/gradients/SkTwoPointRadialGradient.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/gradients/SkTwoPointRadialGradient.h
diff --git a/src/effects/gradients/SkTwoPointRadialGradient.h b/src/effects/gradients/SkTwoPointRadialGradient.h
deleted file mode 100644
index 7da85d6d88f8f610ed5495f9576984a83830240a..0000000000000000000000000000000000000000
--- a/src/effects/gradients/SkTwoPointRadialGradient.h
+++ /dev/null
@@ -1,64 +0,0 @@
-
-/*
- * Copyright 2012 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
- #ifndef SkTwoPointRadialGradient_DEFINED
- #define SkTwoPointRadialGradient_DEFINED
-
- #include "SkGradientShaderPriv.h"
-
-class SkTwoPointRadialGradient : public SkGradientShaderBase {
-public:
- SkTwoPointRadialGradient(const SkPoint& start, SkScalar startRadius,
- const SkPoint& end, SkScalar endRadius,
- const Descriptor&);
-
- virtual BitmapType asABitmap(SkBitmap* bitmap,
- SkMatrix* matrix,
- TileMode* xy) const override;
- GradientType asAGradient(GradientInfo* info) const override;
- virtual bool asFragmentProcessor(GrContext* context, const SkPaint&, const SkMatrix& viewM,
- const SkMatrix*, GrColor*,
- GrFragmentProcessor**) const override;
-
- size_t contextSize() const override;
-
- class TwoPointRadialGradientContext : public SkGradientShaderBase::GradientShaderBaseContext {
- public:
- TwoPointRadialGradientContext(const SkTwoPointRadialGradient&, const ContextRec&);
-
- void shadeSpan(int x, int y, SkPMColor dstC[], int count) override;
-
- private:
- typedef SkGradientShaderBase::GradientShaderBaseContext INHERITED;
- };
-
- SkScalar getCenterX1() const { return fDiff.length(); }
- SkScalar getStartRadius() const { return fStartRadius; }
- SkScalar getDiffRadius() const { return fDiffRadius; }
-
- SK_TO_STRING_OVERRIDE()
- SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkTwoPointRadialGradient)
-
-protected:
- SkTwoPointRadialGradient(SkReadBuffer& buffer);
- void flatten(SkWriteBuffer& buffer) const override;
- Context* onCreateContext(const ContextRec&, void* storage) const override;
-
-private:
- const SkPoint fCenter1;
- const SkPoint fCenter2;
- const SkScalar fRadius1;
- const SkScalar fRadius2;
- SkPoint fDiff;
- SkScalar fStartRadius, fDiffRadius, fSr2D2, fA, fOneOverTwoA;
-
- friend class SkGradientShader;
- typedef SkGradientShaderBase INHERITED;
-};
-
-#endif
« no previous file with comments | « src/effects/gradients/SkGradientShader.cpp ('k') | src/effects/gradients/SkTwoPointRadialGradient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698