aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/effects/GrSimpleTextureEffect.h
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-06-15 12:07:18 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-06-15 17:18:19 +0000
commitfbcef6eb8abad142daf45418516550f7635b4a52 (patch)
tree1fb2b2a1df72ba87ec05a91bd1cd271e24b5544e /src/gpu/effects/GrSimpleTextureEffect.h
parentbaaf439eb5d08097d794f13800e5bf7ce8885f95 (diff)
Clean up GrResourceProvider usage
The only substantive changes are the removal of GrProxy instantiation in: SkGpuBlurUtils::GaussianBlur GrSimpleTextureEffect::Make* Change-Id: I10970609693bd6ff5b3a3c21b41d82642bb277bc Reviewed-on: https://skia-review.googlesource.com/19965 Reviewed-by: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/effects/GrSimpleTextureEffect.h')
-rw-r--r--src/gpu/effects/GrSimpleTextureEffect.h41
1 files changed, 8 insertions, 33 deletions
diff --git a/src/gpu/effects/GrSimpleTextureEffect.h b/src/gpu/effects/GrSimpleTextureEffect.h
index 0b01ac79a3..0bf2dcce68 100644
--- a/src/gpu/effects/GrSimpleTextureEffect.h
+++ b/src/gpu/effects/GrSimpleTextureEffect.h
@@ -21,56 +21,31 @@ class GrInvariantOutput;
class GrSimpleTextureEffect : public GrSingleTextureEffect {
public:
/* unfiltered, clamp mode */
- static sk_sp<GrFragmentProcessor> Make(GrResourceProvider* resourceProvider,
- sk_sp<GrTextureProxy> proxy,
+ static sk_sp<GrFragmentProcessor> Make(sk_sp<GrTextureProxy> proxy,
sk_sp<GrColorSpaceXform> colorSpaceXform,
const SkMatrix& matrix) {
- // MDB TODO: remove this instantiation once instantiation is pushed past the
- // TextureSamplers. Instantiation failure in the TextureSampler is difficult to
- // recover from.
- if (!proxy->instantiate(resourceProvider)) {
- return nullptr;
- }
-
return sk_sp<GrFragmentProcessor>(
- new GrSimpleTextureEffect(resourceProvider, std::move(proxy),
+ new GrSimpleTextureEffect(std::move(proxy),
std::move(colorSpaceXform), matrix,
GrSamplerParams::kNone_FilterMode));
}
/* clamp mode */
- static sk_sp<GrFragmentProcessor> Make(GrResourceProvider* resourceProvider,
- sk_sp<GrTextureProxy> proxy,
+ static sk_sp<GrFragmentProcessor> Make(sk_sp<GrTextureProxy> proxy,
sk_sp<GrColorSpaceXform> colorSpaceXform,
const SkMatrix& matrix,
GrSamplerParams::FilterMode filterMode) {
- // MDB TODO: remove this instantiation once instantiation is pushed past the
- // TextureSamplers. Instantiation failure in the TextureSampler is difficult to
- // recover from.
- if (!proxy->instantiate(resourceProvider)) {
- return nullptr;
- }
-
return sk_sp<GrFragmentProcessor>(
- new GrSimpleTextureEffect(resourceProvider, std::move(proxy),
+ new GrSimpleTextureEffect(std::move(proxy),
std::move(colorSpaceXform),
matrix, filterMode));
}
- static sk_sp<GrFragmentProcessor> Make(GrResourceProvider* resourceProvider,
- sk_sp<GrTextureProxy> proxy,
+ static sk_sp<GrFragmentProcessor> Make(sk_sp<GrTextureProxy> proxy,
sk_sp<GrColorSpaceXform> colorSpaceXform,
const SkMatrix& matrix,
const GrSamplerParams& p) {
- // MDB TODO: remove this instantiation once instantiation is pushed past the
- // TextureSamplers. Instantiation failure in the TextureSampler is difficult to
- // recover from.
- if (!proxy->instantiate(resourceProvider)) {
- return nullptr;
- }
-
- return sk_sp<GrFragmentProcessor>(new GrSimpleTextureEffect(resourceProvider,
- std::move(proxy),
+ return sk_sp<GrFragmentProcessor>(new GrSimpleTextureEffect(std::move(proxy),
std::move(colorSpaceXform),
matrix, p));
}
@@ -80,11 +55,11 @@ public:
const char* name() const override { return "SimpleTexture"; }
private:
- GrSimpleTextureEffect(GrResourceProvider*, sk_sp<GrTextureProxy>,
+ GrSimpleTextureEffect(sk_sp<GrTextureProxy>,
sk_sp<GrColorSpaceXform>, const SkMatrix& matrix,
GrSamplerParams::FilterMode);
- GrSimpleTextureEffect(GrResourceProvider*, sk_sp<GrTextureProxy>,
+ GrSimpleTextureEffect(sk_sp<GrTextureProxy>,
sk_sp<GrColorSpaceXform>, const SkMatrix& matrix,
const GrSamplerParams&);