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

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

Issue 768183002: Revert of Remove SK_SUPPORT_LEGACY_DEEPFLATTENING. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « src/effects/gradients/SkSweepGradient.h ('k') | src/effects/gradients/SkTwoPointConicalGradient.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « src/effects/gradients/SkSweepGradient.h ('k') | src/effects/gradients/SkTwoPointConicalGradient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698