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

Unified Diff: src/effects/SkAlphaThresholdFilter.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/core/SkXfermode_proccoeff.h ('k') | src/effects/SkArithmeticMode.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkAlphaThresholdFilter.cpp
diff --git a/src/effects/SkAlphaThresholdFilter.cpp b/src/effects/SkAlphaThresholdFilter.cpp
index 774092c2df7ddcd8e61e9cf701dc8f426cb633a0..006b9e60521630da1ff377670a273ec9c472a32b 100644
--- a/src/effects/SkAlphaThresholdFilter.cpp
+++ b/src/effects/SkAlphaThresholdFilter.cpp
@@ -62,11 +62,13 @@ SkImageFilter* SkAlphaThresholdFilter::Create(const SkRegion& region,
class AlphaThresholdEffect : public GrFragmentProcessor {
public:
- static GrFragmentProcessor* Create(GrTexture* texture,
+ static GrFragmentProcessor* Create(GrShaderDataManager* shaderDataManager,
+ GrTexture* texture,
GrTexture* maskTexture,
float innerThreshold,
float outerThreshold) {
- return SkNEW_ARGS(AlphaThresholdEffect, (texture,
+ return SkNEW_ARGS(AlphaThresholdEffect, (shaderDataManager,
+ texture,
maskTexture,
innerThreshold,
outerThreshold));
@@ -84,7 +86,8 @@ public:
GrGLFragmentProcessor* createGLInstance() const override;
private:
- AlphaThresholdEffect(GrTexture* texture,
+ AlphaThresholdEffect(GrShaderDataManager*,
+ GrTexture* texture,
GrTexture* maskTexture,
float innerThreshold,
float outerThreshold)
@@ -212,7 +215,9 @@ GrFragmentProcessor* AlphaThresholdEffect::TestCreate(SkRandom* random,
GrTexture* maskTex = textures[GrProcessorUnitTest::kAlphaTextureIdx];
float inner_thresh = random->nextUScalar1();
float outer_thresh = random->nextUScalar1();
- return AlphaThresholdEffect::Create(bmpTex, maskTex, inner_thresh, outer_thresh);
+ GrShaderDataManager shaderDataManager;
+ return AlphaThresholdEffect::Create(&shaderDataManager, bmpTex, maskTex, inner_thresh,
+ outer_thresh);
}
///////////////////////////////////////////////////////////////////////////////
@@ -265,7 +270,7 @@ SkAlphaThresholdFilterImpl::SkAlphaThresholdFilterImpl(const SkRegion& region,
#if SK_SUPPORT_GPU
bool SkAlphaThresholdFilterImpl::asFragmentProcessor(GrFragmentProcessor** fp,
- GrShaderDataManager*,
+ GrShaderDataManager* shaderDataManager,
GrTexture* texture,
const SkMatrix& in_matrix,
const SkIRect&) const {
@@ -303,7 +308,8 @@ bool SkAlphaThresholdFilterImpl::asFragmentProcessor(GrFragmentProcessor** fp,
}
}
- *fp = AlphaThresholdEffect::Create(texture,
+ *fp = AlphaThresholdEffect::Create(shaderDataManager,
+ texture,
maskTexture,
fInnerThreshold,
fOuterThreshold);
« no previous file with comments | « src/core/SkXfermode_proccoeff.h ('k') | src/effects/SkArithmeticMode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698