Index: src/effects/gradients/SkSweepGradient.cpp |
diff --git a/src/effects/gradients/SkSweepGradient.cpp b/src/effects/gradients/SkSweepGradient.cpp |
index 163700641c3f46f0b7310deb05ccb7b0a2d0f8bc..d080ec5fde963bcad66a74bee674973cb98dfd6d 100644 |
--- a/src/effects/gradients/SkSweepGradient.cpp |
+++ b/src/effects/gradients/SkSweepGradient.cpp |
@@ -40,6 +40,13 @@ |
} |
return kSweep_GradientType; |
} |
+ |
+#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING |
+SkSweepGradient::SkSweepGradient(SkReadBuffer& buffer) |
+ : INHERITED(buffer), |
+ fCenter(buffer.readPoint()) { |
+} |
+#endif |
SkFlattenable* SkSweepGradient::CreateProc(SkReadBuffer& buffer) { |
DescriptorScope desc; |
@@ -287,7 +294,7 @@ |
bool SkSweepGradient::asFragmentProcessor(GrContext* context, const SkPaint& paint, |
const SkMatrix* localMatrix, GrColor* paintColor, |
GrFragmentProcessor** effect) const { |
- |
+ |
SkMatrix matrix; |
if (!this->getLocalMatrix().invert(&matrix)) { |
return false; |
@@ -300,10 +307,10 @@ |
matrix.postConcat(inv); |
} |
matrix.postConcat(fPtsToUnit); |
- |
+ |
*effect = GrSweepGradient::Create(context, *this, matrix); |
*paintColor = SkColor2GrColorJustAlpha(paint.getColor()); |
- |
+ |
return true; |
} |