Index: src/effects/gradients/SkRadialGradient.cpp |
diff --git a/src/effects/gradients/SkRadialGradient.cpp b/src/effects/gradients/SkRadialGradient.cpp |
index 7c0e8f603174bd87f02746ebc3f28450bc067e59..99531d93d45dc180cd84c187ba334837c86e9b73 100644 |
--- a/src/effects/gradients/SkRadialGradient.cpp |
+++ b/src/effects/gradients/SkRadialGradient.cpp |
@@ -252,6 +252,14 @@ |
return kRadial_GradientType; |
} |
+#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING |
+SkRadialGradient::SkRadialGradient(SkReadBuffer& buffer) |
+ : INHERITED(buffer), |
+ fCenter(buffer.readPoint()), |
+ fRadius(buffer.readScalar()) { |
+} |
+#endif |
+ |
SkFlattenable* SkRadialGradient::CreateProc(SkReadBuffer& buffer) { |
DescriptorScope desc; |
if (!desc.unflatten(buffer)) { |
@@ -570,7 +578,7 @@ |
const SkMatrix* localMatrix, GrColor* paintColor, |
GrFragmentProcessor** fp) const { |
SkASSERT(context); |
- |
+ |
SkMatrix matrix; |
if (!this->getLocalMatrix().invert(&matrix)) { |
return false; |
@@ -583,10 +591,10 @@ |
matrix.postConcat(inv); |
} |
matrix.postConcat(fPtsToUnit); |
- |
+ |
*paintColor = SkColor2GrColorJustAlpha(paint.getColor()); |
*fp = GrRadialGradient::Create(context, *this, matrix, fTileMode); |
- |
+ |
return true; |
} |