Make Clip test FP use texture effect child

Bug: skia:10139

Change-Id: I32d13b11b613996f4b83e3cf50e28993985bcb08
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297061
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This commit is contained in:
Brian Salomon 2020-06-17 13:05:00 -04:00 committed by Skia Commit-Bot
parent 83c2d35155
commit f629a9022f

View File

@ -146,9 +146,9 @@ public:
},
format, GrRenderable::kYes, 1, GrProtected::kNo, *proxyProvider->caps(),
GrSurfaceProxy::UseAllocator::kYes);
fAccess.set(GrSurfaceProxyView(fLazyProxy, kOrigin, readSwizzle),
GrSamplerState::Filter::kNearest);
this->setTextureSamplerCnt(1);
auto atlasEffect = GrTextureEffect::Make({fLazyProxy, kOrigin, readSwizzle},
kPremul_SkAlphaType);
this->registerChildProcessor(std::move(atlasEffect));
}
private:
@ -159,14 +159,12 @@ public:
GrGLSLFragmentProcessor* onCreateGLSLInstance() const override { return nullptr; }
void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override {}
bool onIsEqual(const GrFragmentProcessor&) const override { return false; }
const TextureSampler& onTextureSampler(int) const override { return fAccess; }
GrRecordingContext* const fContext;
GrProxyProvider* const fProxyProvider;
LazyProxyTest* const fTest;
GrTextureProxy* const fAtlas;
sk_sp<GrTextureProxy> fLazyProxy;
TextureSampler fAccess;
};