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

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

Issue 769953002: 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/SkGradientShader.cpp ('k') | src/effects/gradients/SkRadialGradient.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/gradients/SkLinearGradient.cpp
diff --git a/src/effects/gradients/SkLinearGradient.cpp b/src/effects/gradients/SkLinearGradient.cpp
index 3ab721950a6cf485d08e63a50a46b7ddd3f8efbf..1faca5e4a1f2adec0488b3c2229e0103d35f8849 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;
}
« no previous file with comments | « src/effects/gradients/SkGradientShader.cpp ('k') | src/effects/gradients/SkRadialGradient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698