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

Unified Diff: src/effects/SkPerlinNoiseShader.cpp

Issue 608253002: Add isSingleComponent bool to getConstantColorComponent (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 3 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/SkPerlinNoiseShader.cpp
diff --git a/src/effects/SkPerlinNoiseShader.cpp b/src/effects/SkPerlinNoiseShader.cpp
index 88e6caddb9d6ee6f4f2aec32a505b59c10de08bf..74bba4dac5bd16baba5c684a9342d3aa65dfcc7e 100644
--- a/src/effects/SkPerlinNoiseShader.cpp
+++ b/src/effects/SkPerlinNoiseShader.cpp
@@ -586,6 +586,10 @@ private:
fPaintingData->fStitchDataInit == s.fPaintingData->fStitchDataInit;
}
+ void onGetConstantColorComponents(GrColor*, uint32_t* validFlags, bool*)const SK_OVERRIDE {
+ *validFlags = 0; // This is noise. Nothing is constant.
+ }
+
GrPerlinNoiseEffect(SkPerlinNoiseShader::Type type,
int numOctaves, bool stitchTiles,
SkPerlinNoiseShader::PaintingData* paintingData,
@@ -616,10 +620,6 @@ private:
GrTextureAccess fNoiseAccess;
SkPerlinNoiseShader::PaintingData *fPaintingData;
- void getConstantColorComponents(GrColor*, uint32_t* validFlags) const SK_OVERRIDE {
- *validFlags = 0; // This is noise. Nothing is constant.
- }
-
private:
typedef GrFragmentProcessor INHERITED;
};

Powered by Google App Engine
This is Rietveld 408576698