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

Unified Diff: src/effects/SkPerlinNoiseShader.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/SkOffsetImageFilter.cpp ('k') | src/effects/SkPictureImageFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkPerlinNoiseShader.cpp
diff --git a/src/effects/SkPerlinNoiseShader.cpp b/src/effects/SkPerlinNoiseShader.cpp
index 019258972dbda909c92cb1c214ad22dc35406d32..8c608fa0366c134dae85d1a4d2178be59dd9a1d5 100644
--- a/src/effects/SkPerlinNoiseShader.cpp
+++ b/src/effects/SkPerlinNoiseShader.cpp
@@ -51,11 +51,6 @@ inline SkScalar smoothCurve(SkScalar t) {
return SkScalarMul(SkScalarSquare(t), SK_Scalar3 - 2 * t);
}
-bool perlin_noise_type_is_valid(SkPerlinNoiseShader::Type type) {
- return (SkPerlinNoiseShader::kFractalNoise_Type == type) ||
- (SkPerlinNoiseShader::kTurbulence_Type == type);
-}
-
} // end namespace
struct SkPerlinNoiseShader::StitchData {
@@ -288,22 +283,6 @@ SkPerlinNoiseShader::SkPerlinNoiseShader(SkPerlinNoiseShader::Type type,
SkASSERT(numOctaves >= 0 && numOctaves < 256);
}
-#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING
-SkPerlinNoiseShader::SkPerlinNoiseShader(SkReadBuffer& buffer) : INHERITED(buffer) {
- fType = (SkPerlinNoiseShader::Type) buffer.readInt();
- fBaseFrequencyX = buffer.readScalar();
- fBaseFrequencyY = buffer.readScalar();
- fNumOctaves = buffer.readInt();
- fSeed = buffer.readScalar();
- fStitchTiles = buffer.readBool();
- fTileSize.fWidth = buffer.readInt();
- fTileSize.fHeight = buffer.readInt();
- buffer.validate(perlin_noise_type_is_valid(fType) &&
- (fNumOctaves >= 0) && (fNumOctaves <= 255) &&
- (fStitchTiles != fTileSize.isEmpty()));
-}
-#endif
-
SkPerlinNoiseShader::~SkPerlinNoiseShader() {
}
@@ -964,7 +943,7 @@ bool SkPerlinNoiseShader::asFragmentProcessor(GrContext* context, const SkPaint&
const SkMatrix* externalLocalMatrix,
GrColor* paintColor, GrFragmentProcessor** fp) const {
SkASSERT(context);
-
+
*paintColor = SkColor2GrColorJustAlpha(paint.getColor());
SkMatrix localMatrix = this->getLocalMatrix();
« no previous file with comments | « src/effects/SkOffsetImageFilter.cpp ('k') | src/effects/SkPictureImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698