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

Unified Diff: src/gpu/effects/GrMatrixConvolutionEffect.cpp

Issue 1230813003: More threading of GrProcessorDataManager (Closed) Base URL: https://skia.googlesource.com/skia.git@master
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/gpu/effects/GrMatrixConvolutionEffect.h ('k') | src/gpu/effects/GrSimpleTextureEffect.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/effects/GrMatrixConvolutionEffect.cpp
diff --git a/src/gpu/effects/GrMatrixConvolutionEffect.cpp b/src/gpu/effects/GrMatrixConvolutionEffect.cpp
index 0dd83b4632feedcec71195109bd8063d445f461e..24e78208d507e2d941f852bd76568af84d361796 100644
--- a/src/gpu/effects/GrMatrixConvolutionEffect.cpp
+++ b/src/gpu/effects/GrMatrixConvolutionEffect.cpp
@@ -138,7 +138,8 @@ void GrGLMatrixConvolutionEffect::setData(const GrGLProgramDataManager& pdman,
fDomain.setData(pdman, conv.domain(), texture.origin());
}
-GrMatrixConvolutionEffect::GrMatrixConvolutionEffect(GrTexture* texture,
+GrMatrixConvolutionEffect::GrMatrixConvolutionEffect(GrProcessorDataManager* procDataManager,
+ GrTexture* texture,
const SkIRect& bounds,
const SkISize& kernelSize,
const SkScalar* kernel,
@@ -147,7 +148,7 @@ GrMatrixConvolutionEffect::GrMatrixConvolutionEffect(GrTexture* texture,
const SkIPoint& kernelOffset,
GrTextureDomain::Mode tileMode,
bool convolveAlpha)
- : INHERITED(texture, GrCoordTransform::MakeDivByTextureWHMatrix(texture)),
+ : INHERITED(procDataManager, texture, GrCoordTransform::MakeDivByTextureWHMatrix(texture)),
fKernelSize(kernelSize),
fGain(SkScalarToFloat(gain)),
fBias(SkScalarToFloat(bias) / 255.0f),
@@ -187,7 +188,8 @@ bool GrMatrixConvolutionEffect::onIsEqual(const GrFragmentProcessor& sBase) cons
// Static function to create a 2D convolution
GrFragmentProcessor*
-GrMatrixConvolutionEffect::CreateGaussian(GrTexture* texture,
+GrMatrixConvolutionEffect::CreateGaussian(GrProcessorDataManager* procDataManager,
+ GrTexture* texture,
const SkIRect& bounds,
const SkISize& kernelSize,
SkScalar gain,
@@ -223,7 +225,8 @@ GrMatrixConvolutionEffect::CreateGaussian(GrTexture* texture,
for (int i = 0; i < width * height; ++i) {
kernel[i] *= scale;
}
- return SkNEW_ARGS(GrMatrixConvolutionEffect, (texture,
+ return SkNEW_ARGS(GrMatrixConvolutionEffect, (procDataManager,
+ texture,
bounds,
kernelSize,
kernel,
@@ -257,7 +260,8 @@ GrFragmentProcessor* GrMatrixConvolutionEffect::TestCreate(GrProcessorTestData*
GrTextureDomain::Mode tileMode =
static_cast<GrTextureDomain::Mode>(d->fRandom->nextRangeU(0, 2));
bool convolveAlpha = d->fRandom->nextBool();
- return GrMatrixConvolutionEffect::Create(d->fTextures[texIdx],
+ return GrMatrixConvolutionEffect::Create(d->fProcDataManager,
+ d->fTextures[texIdx],
bounds,
kernelSize,
kernel.get(),
« no previous file with comments | « src/gpu/effects/GrMatrixConvolutionEffect.h ('k') | src/gpu/effects/GrSimpleTextureEffect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698