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

Unified Diff: src/effects/SkDisplacementMapEffect.cpp

Issue 1225923010: Refugee from Dead Machine 4: MDB Monster Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Last update from dead machine Created 4 years, 8 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/SkColorMatrixFilter.cpp ('k') | src/effects/SkGpuBlurUtils.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 b9411b2e12c7652162ce9c19981b9c3c14c3b321..55d8b1e5ee718d2fa4d3441ed2f0b5a4870f44a5 100644
--- a/src/effects/SkDisplacementMapEffect.cpp
+++ b/src/effects/SkDisplacementMapEffect.cpp
@@ -335,9 +335,10 @@ public:
SkDisplacementMapEffect::ChannelSelectorType xChannelSelector,
SkDisplacementMapEffect::ChannelSelectorType yChannelSelector, SkVector scale,
GrTexture* displacement, const SkMatrix& offsetMatrix, GrTexture* color,
- const SkISize& colorDimensions) {
- return new GrDisplacementMapEffect(xChannelSelector, yChannelSelector, scale, displacement,
- offsetMatrix, color, colorDimensions);
+ const SkISize& colorDimensions, GrRenderTarget* dst) {
+ return new GrDisplacementMapEffect(xChannelSelector, yChannelSelector,
+ scale, displacement, offsetMatrix, color,
+ colorDimensions, dst);
}
virtual ~GrDisplacementMapEffect();
@@ -370,7 +371,7 @@ private:
const SkVector& scale,
GrTexture* displacement, const SkMatrix& offsetMatrix,
GrTexture* color,
- const SkISize& colorDimensions);
+ const SkISize& colorDimensions, GrRenderTarget* dst);
GR_DECLARE_FRAGMENT_PROCESSOR_TEST;
@@ -444,7 +445,7 @@ bool SkDisplacementMapEffect::filterImageGPU(Proxy* proxy, const SkBitmap& src,
displacement,
offsetMatrix,
color,
- colorBM.dimensions()))->unref();
+ colorBM.dimensions(), dst->asRenderTarget()))->unref();
SkIRect colorBounds = bounds;
colorBounds.offset(-colorOffset);
SkMatrix matrix;
@@ -472,14 +473,14 @@ GrDisplacementMapEffect::GrDisplacementMapEffect(
GrTexture* displacement,
const SkMatrix& offsetMatrix,
GrTexture* color,
- const SkISize& colorDimensions)
+ const SkISize& colorDimensions, GrRenderTarget* dst)
: fDisplacementTransform(kLocal_GrCoordSet, offsetMatrix, displacement,
GrTextureParams::kNone_FilterMode)
- , fDisplacementAccess(displacement)
+ , fDisplacementAccess(displacement, GrTextureParams::kNone_FilterMode,SkShader::kClamp_TileMode, dst)
, fColorTransform(kLocal_GrCoordSet, color, GrTextureParams::kNone_FilterMode)
, fDomain(GrTextureDomain::MakeTexelDomain(color, SkIRect::MakeSize(colorDimensions)),
GrTextureDomain::kDecal_Mode)
- , fColorAccess(color)
+ , fColorAccess(color, GrTextureParams::kNone_FilterMode,SkShader::kClamp_TileMode, dst)
, fXChannelSelector(xChannelSelector)
, fYChannelSelector(yChannelSelector)
, fScale(scale) {
@@ -532,7 +533,7 @@ const GrFragmentProcessor* GrDisplacementMapEffect::TestCreate(GrProcessorTestDa
colorDimensions.fHeight = d->fRandom->nextRangeU(0, d->fTextures[texIdxColor]->height());
return GrDisplacementMapEffect::Create(xChannelSelector, yChannelSelector, scale,
d->fTextures[texIdxDispl], SkMatrix::I(),
- d->fTextures[texIdxColor], colorDimensions);
+ d->fTextures[texIdxColor], colorDimensions, NULL);
}
///////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « src/effects/SkColorMatrixFilter.cpp ('k') | src/effects/SkGpuBlurUtils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698