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

Unified Diff: src/effects/gradients/SkLinearGradient.cpp

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 side-by-side diff with in-line comments
Download patch
Index: src/effects/gradients/SkLinearGradient.cpp
diff --git a/src/effects/gradients/SkLinearGradient.cpp b/src/effects/gradients/SkLinearGradient.cpp
index e0f216c220fad8bd74c6a53dcf3e7c92e629ebfc..4bc697d9047c425889a6900307d4b5014a9122e5 100644
--- a/src/effects/gradients/SkLinearGradient.cpp
+++ b/src/effects/gradients/SkLinearGradient.cpp
@@ -62,13 +62,8 @@ static void pts_to_unit_matrix(const SkPoint pts[2], SkMatrix* matrix) {
///////////////////////////////////////////////////////////////////////////////
-SkLinearGradient::SkLinearGradient(const SkPoint pts[2],
- const SkColor colors[],
- const SkScalar pos[],
- int colorCount,
- SkShader::TileMode mode,
- SkUnitMapper* mapper)
- : SkGradientShaderBase(colors, pos, colorCount, mode, mapper)
+SkLinearGradient::SkLinearGradient(const SkPoint pts[2], const Descriptor& desc)
+ : SkGradientShaderBase(desc)
, fStart(pts[0])
, fEnd(pts[1]) {
pts_to_unit_matrix(pts, &fPtsToUnit);

Powered by Google App Engine
This is Rietveld 408576698