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

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
« no previous file with comments | « src/effects/SkDisplacementMapEffect.cpp ('k') | src/effects/SkXfermodeImageFilter.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 237af0e066868be4c7805d2c12591bb7763ac368..38a778406f26729582ea3247b6387a8e76a640f0 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,
@@ -945,7 +947,8 @@ void GrGLPerlinNoise::setData(const GrGLProgramDataManager& pdman, const GrProce
bool SkPerlinNoiseShader::asFragmentProcessor(GrContext* context, const SkPaint& paint,
const SkMatrix& viewM,
const SkMatrix* externalLocalMatrix,
- GrColor* paintColor, GrShaderDataManager*,
+ GrColor* paintColor,
+ GrShaderDataManager* shaderDataManager,
GrFragmentProcessor** fp) const {
SkASSERT(context);
@@ -984,7 +987,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,
« no previous file with comments | « src/effects/SkDisplacementMapEffect.cpp ('k') | src/effects/SkXfermodeImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698