aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/effects/gradients/SkLinearGradient.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/effects/gradients/SkLinearGradient.cpp')
-rw-r--r--src/effects/gradients/SkLinearGradient.cpp14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/effects/gradients/SkLinearGradient.cpp b/src/effects/gradients/SkLinearGradient.cpp
index 3ab721950a..1faca5e4a1 100644
--- a/src/effects/gradients/SkLinearGradient.cpp
+++ b/src/effects/gradients/SkLinearGradient.cpp
@@ -60,14 +60,6 @@ SkLinearGradient::SkLinearGradient(const SkPoint pts[2], const Descriptor& desc)
pts_to_unit_matrix(pts, &fPtsToUnit);
}
-#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING
-SkLinearGradient::SkLinearGradient(SkReadBuffer& buffer)
- : INHERITED(buffer)
- , fStart(buffer.readPoint())
- , fEnd(buffer.readPoint()) {
-}
-#endif
-
SkFlattenable* SkLinearGradient::CreateProc(SkReadBuffer& buffer) {
DescriptorScope desc;
if (!desc.unflatten(buffer)) {
@@ -568,7 +560,7 @@ bool SkLinearGradient::asFragmentProcessor(GrContext* context, const SkPaint& pa
const SkMatrix* localMatrix, GrColor* paintColor,
GrFragmentProcessor** fp) const {
SkASSERT(context);
-
+
SkMatrix matrix;
if (!this->getLocalMatrix().invert(&matrix)) {
return false;
@@ -581,10 +573,10 @@ bool SkLinearGradient::asFragmentProcessor(GrContext* context, const SkPaint& pa
matrix.postConcat(inv);
}
matrix.postConcat(fPtsToUnit);
-
+
*paintColor = SkColor2GrColorJustAlpha(paint.getColor());
*fp = GrLinearGradient::Create(context, *this, matrix, fTileMode);
-
+
return true;
}