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

Unified Diff: src/effects/SkPerlinNoiseShader.cpp

Issue 1215643006: more threading of GrShaderDataManager (Closed) Base URL: https://skia.googlesource.com/skia.git@GrShaderDataManager3
Patch Set: tweaks Created 5 years, 5 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 7185b4dafed15008ad318325840ee63904521636..6ad8e2d22845ece36f083f524322574adef424f5 100644
--- a/src/effects/SkPerlinNoiseShader.cpp
+++ b/src/effects/SkPerlinNoiseShader.cpp
@@ -515,13 +515,15 @@ private:
class GrPerlinNoiseEffect : public GrFragmentProcessor {
public:
- static GrFragmentProcessor* Create(SkPerlinNoiseShader::Type type,
+ static GrFragmentProcessor* Create(GrShaderDataManager* shaderDataManager,
+ SkPerlinNoiseShader::Type type,
int numOctaves, bool stitchTiles,
SkPerlinNoiseShader::PaintingData* paintingData,
GrTexture* permutationsTexture, GrTexture* noiseTexture,
const SkMatrix& matrix, uint8_t alpha) {
- return SkNEW_ARGS(GrPerlinNoiseEffect, (type, numOctaves, stitchTiles, paintingData,
- permutationsTexture, noiseTexture, matrix, alpha));
+ return SkNEW_ARGS(GrPerlinNoiseEffect, (shaderDataManager, type, numOctaves, stitchTiles,
+ paintingData, permutationsTexture, noiseTexture,
+ matrix, alpha));
}
virtual ~GrPerlinNoiseEffect() {
@@ -563,7 +565,7 @@ private:
inout->setToUnknown(GrInvariantOutput::kWillNot_ReadInput);
}
- GrPerlinNoiseEffect(SkPerlinNoiseShader::Type type,
+ GrPerlinNoiseEffect(GrShaderDataManager*, SkPerlinNoiseShader::Type type,
int numOctaves, bool stitchTiles,
SkPerlinNoiseShader::PaintingData* paintingData,
GrTexture* permutationsTexture, GrTexture* noiseTexture,
@@ -943,7 +945,9 @@ void GrGLPerlinNoise::setData(const GrGLProgramDataManager& pdman, const GrProce
bool SkPerlinNoiseShader::asFragmentProcessor(GrContext* context, const SkPaint& paint,
const SkMatrix& viewM,
const SkMatrix* externalLocalMatrix,
- GrColor* paintColor, GrFragmentProcessor** fp) const {
+ GrColor* paintColor,
+ GrShaderDataManager* shaderDataManager,
+ GrFragmentProcessor** fp) const {
SkASSERT(context);
*paintColor = SkColor2GrColorJustAlpha(paint.getColor());
@@ -981,7 +985,8 @@ bool SkPerlinNoiseShader::asFragmentProcessor(GrContext* context, const SkPaint&
m.setTranslateX(-localMatrix.getTranslateX() + SK_Scalar1);
m.setTranslateY(-localMatrix.getTranslateY() + SK_Scalar1);
if ((permutationsTexture) && (noiseTexture)) {
- *fp = GrPerlinNoiseEffect::Create(fType,
+ *fp = GrPerlinNoiseEffect::Create(shaderDataManager,
+ fType,
fNumOctaves,
fStitchTiles,
paintingData,

Powered by Google App Engine
This is Rietveld 408576698