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

Unified Diff: src/effects/SkDisplacementMapEffect.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/SkArithmeticMode_gpu.cpp ('k') | src/effects/SkPerlinNoiseShader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkDisplacementMapEffect.cpp
diff --git a/src/effects/SkDisplacementMapEffect.cpp b/src/effects/SkDisplacementMapEffect.cpp
index d7d92c82b9476487ed009011cb02e8f973064e79..932a4b1e3a58d77e8b7775e5c14946b112f630c0 100644
--- a/src/effects/SkDisplacementMapEffect.cpp
+++ b/src/effects/SkDisplacementMapEffect.cpp
@@ -332,11 +332,13 @@ private:
class GrDisplacementMapEffect : public GrFragmentProcessor {
public:
static GrFragmentProcessor* Create(
+ GrShaderDataManager* shaderDataManager,
SkDisplacementMapEffect::ChannelSelectorType xChannelSelector,
SkDisplacementMapEffect::ChannelSelectorType yChannelSelector, SkVector scale,
GrTexture* displacement, const SkMatrix& offsetMatrix, GrTexture* color,
const SkISize& colorDimensions) {
- return SkNEW_ARGS(GrDisplacementMapEffect, (xChannelSelector,
+ return SkNEW_ARGS(GrDisplacementMapEffect, (shaderDataManager,
+ xChannelSelector,
yChannelSelector,
scale,
displacement,
@@ -370,7 +372,8 @@ private:
void onComputeInvariantOutput(GrInvariantOutput* inout) const override;
- GrDisplacementMapEffect(SkDisplacementMapEffect::ChannelSelectorType xChannelSelector,
+ GrDisplacementMapEffect(GrShaderDataManager*,
+ SkDisplacementMapEffect::ChannelSelectorType xChannelSelector,
SkDisplacementMapEffect::ChannelSelectorType yChannelSelector,
const SkVector& scale,
GrTexture* displacement, const SkMatrix& offsetMatrix,
@@ -446,7 +449,8 @@ bool SkDisplacementMapEffect::filterImageGPU(Proxy* proxy, const SkBitmap& src,
SkIntToScalar(colorOffset.fY - displacementOffset.fY));
paint.addColorProcessor(
- GrDisplacementMapEffect::Create(fXChannelSelector,
+ GrDisplacementMapEffect::Create(paint.getShaderDataManager(),
+ fXChannelSelector,
fYChannelSelector,
scale,
displacement,
@@ -475,6 +479,7 @@ bool SkDisplacementMapEffect::filterImageGPU(Proxy* proxy, const SkBitmap& src,
///////////////////////////////////////////////////////////////////////////////
GrDisplacementMapEffect::GrDisplacementMapEffect(
+ GrShaderDataManager*,
SkDisplacementMapEffect::ChannelSelectorType xChannelSelector,
SkDisplacementMapEffect::ChannelSelectorType yChannelSelector,
const SkVector& scale,
@@ -542,7 +547,9 @@ GrFragmentProcessor* GrDisplacementMapEffect::TestCreate(SkRandom* random,
SkISize colorDimensions;
colorDimensions.fWidth = random->nextRangeU(0, textures[texIdxColor]->width());
colorDimensions.fHeight = random->nextRangeU(0, textures[texIdxColor]->height());
- return GrDisplacementMapEffect::Create(xChannelSelector, yChannelSelector, scale,
+ GrShaderDataManager shaderDataManager;
+ return GrDisplacementMapEffect::Create(&shaderDataManager,
+ xChannelSelector, yChannelSelector, scale,
textures[texIdxDispl], SkMatrix::I(),
textures[texIdxColor], colorDimensions);
}
« no previous file with comments | « src/effects/SkArithmeticMode_gpu.cpp ('k') | src/effects/SkPerlinNoiseShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698