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

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

Issue 207683004: Extract most of the mutable state of SkShader into a separate Context object. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: scroggo's comments Created 6 years, 9 months 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
Index: src/effects/gradients/SkLinearGradient.cpp
diff --git a/src/effects/gradients/SkLinearGradient.cpp b/src/effects/gradients/SkLinearGradient.cpp
index bd66f7ca849644daa0e42b69af29000f1b0238ad..f363a3a5d83276136dcf975c89bda2abdd61b395 100644
--- a/src/effects/gradients/SkLinearGradient.cpp
+++ b/src/effects/gradients/SkLinearGradient.cpp
@@ -71,6 +71,7 @@ void SkLinearGradient::flatten(SkWriteBuffer& buffer) const {
buffer.writePoint(fEnd);
}
+#if 0
bool SkLinearGradient::setContext(const SkBitmap& device, const SkPaint& paint,
const SkMatrix& matrix) {
if (!this->INHERITED::setContext(device, paint, matrix)) {
@@ -89,6 +90,7 @@ bool SkLinearGradient::setContext(const SkBitmap& device, const SkPaint& paint,
}
return true;
}
+#endif
#define NO_CHECK_ITER \
do { \
@@ -196,6 +198,7 @@ void shadeSpan_linear_repeat(TileProc proc, SkFixed dx, SkFixed fx,
}
+#if 0
void SkLinearGradient::shadeSpan(int x, int y, SkPMColor* SK_RESTRICT dstC,
int count) {
SkASSERT(count > 0);
@@ -244,6 +247,7 @@ void SkLinearGradient::shadeSpan(int x, int y, SkPMColor* SK_RESTRICT dstC,
} while (--count != 0);
}
}
+#endif
SkShader::BitmapType SkLinearGradient::asABitmap(SkBitmap* bitmap,
SkMatrix* matrix,
@@ -377,6 +381,7 @@ void shadeSpan16_linear_repeat(TileProc proc, SkFixed dx, SkFixed fx,
}
}
+#if 0
static bool fixed_nearly_zero(SkFixed x) {
return SkAbs32(x) < (SK_Fixed1 >> 12);
}
@@ -432,6 +437,7 @@ void SkLinearGradient::shadeSpan16(int x, int y,
} while (--count != 0);
}
}
+#endif
#if SK_SUPPORT_GPU

Powered by Google App Engine
This is Rietveld 408576698