Index: src/effects/gradients/SkLinearGradient.cpp |
diff --git a/src/effects/gradients/SkLinearGradient.cpp b/src/effects/gradients/SkLinearGradient.cpp |
index 1faca5e4a1f2adec0488b3c2229e0103d35f8849..3ab721950a6cf485d08e63a50a46b7ddd3f8efbf 100644 |
--- a/src/effects/gradients/SkLinearGradient.cpp |
+++ b/src/effects/gradients/SkLinearGradient.cpp |
@@ -59,6 +59,14 @@ |
{ |
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; |
@@ -560,7 +568,7 @@ |
const SkMatrix* localMatrix, GrColor* paintColor, |
GrFragmentProcessor** fp) const { |
SkASSERT(context); |
- |
+ |
SkMatrix matrix; |
if (!this->getLocalMatrix().invert(&matrix)) { |
return false; |
@@ -573,10 +581,10 @@ |
matrix.postConcat(inv); |
} |
matrix.postConcat(fPtsToUnit); |
- |
+ |
*paintColor = SkColor2GrColorJustAlpha(paint.getColor()); |
*fp = GrLinearGradient::Create(context, *this, matrix, fTileMode); |
- |
+ |
return true; |
} |