aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/effects/GrTextureDomain.cpp
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-03-27 11:08:16 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-03-27 16:31:02 +0000
commit3798c86f6885f0b47fb2e659a43b48a4468a97ef (patch)
tree8670d4adcc7889af63b4168256f0325aa78aa3bd /src/gpu/effects/GrTextureDomain.cpp
parent465748c246dde8c131effdfa69aed82ef7a48af8 (diff)
Remove GrFragmentProcessor-derived class' GrTexture-based ctors
Split out into: https://skia-review.googlesource.com/c/8881/ (Switch GrTextureStripAtlas over to GrTextureProxies) https://skia-review.googlesource.com/c/8942/ (Wrap cached GrTextures in GrTextureProxies (e.g., blur profiles, nine-patch blurs, etc.)) https://skia-review.googlesource.com/c/8997/ (Clean up/remove unused GrFragmentProcessor-derived ctors) https://skia-review.googlesource.com/c/9191/ (Switch SkImageGenerator over to generating GrTextureProxies) https://skia-review.googlesource.com/c/9448/ (Switch GrYUVProvider over to GrTextureProxies) https://skia-review.googlesource.com/c/9559/ (Preparatory Proxification) https://skia-review.googlesource.com/c/9626/ (Consolidate Proxy caching code in GrResourceProvider) https://skia-review.googlesource.com/c/9683/ (More pre-emptive proxification) https://skia-review.googlesource.com/c/9917/ (Make experimental Perlin noise shader take texture proxies) https://skia-review.googlesource.com/c/9961/ (rename makeCopyForTextureParams to isACopyNeededForTextureParams) https://skia-review.googlesource.com/c/9945/ (Make SkImageCacherator be deferred) https://skia-review.googlesource.com/c/10180/ (Add new proxy-based DetermineDomainMode w/ test) Change-Id: Ia33389d92360e542a9d2bf395948deb04d017465 Reviewed-on: https://skia-review.googlesource.com/8823 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/effects/GrTextureDomain.cpp')
-rw-r--r--src/gpu/effects/GrTextureDomain.cpp49
1 files changed, 0 insertions, 49 deletions
diff --git a/src/gpu/effects/GrTextureDomain.cpp b/src/gpu/effects/GrTextureDomain.cpp
index d7c74aafc4..91b1e552b9 100644
--- a/src/gpu/effects/GrTextureDomain.cpp
+++ b/src/gpu/effects/GrTextureDomain.cpp
@@ -232,22 +232,6 @@ void GrTextureDomain::GLDomain::setData(const GrGLSLProgramDataManager& pdman,
}
///////////////////////////////////////////////////////////////////////////////
-sk_sp<GrFragmentProcessor> GrTextureDomainEffect::Make(GrTexture* texture,
- sk_sp<GrColorSpaceXform> colorSpaceXform,
- const SkMatrix& matrix,
- const SkRect& domain,
- GrTextureDomain::Mode mode,
- GrSamplerParams::FilterMode filterMode) {
- if (GrTextureDomain::kIgnore_Mode == mode ||
- (GrTextureDomain::kClamp_Mode == mode && can_ignore_rect(texture, domain))) {
- return GrSimpleTextureEffect::Make(texture, std::move(colorSpaceXform), matrix, filterMode);
- } else {
- return sk_sp<GrFragmentProcessor>(
- new GrTextureDomainEffect(texture, std::move(colorSpaceXform), matrix, domain, mode,
- filterMode));
- }
-}
-
inline GrFragmentProcessor::OptimizationFlags GrTextureDomainEffect::OptFlags(
GrPixelConfig config, GrTextureDomain::Mode mode) {
if (mode == GrTextureDomain::kDecal_Mode || !GrPixelConfigIsOpaque(config)) {
@@ -258,20 +242,6 @@ inline GrFragmentProcessor::OptimizationFlags GrTextureDomainEffect::OptFlags(
}
}
-GrTextureDomainEffect::GrTextureDomainEffect(GrTexture* texture,
- sk_sp<GrColorSpaceXform> colorSpaceXform,
- const SkMatrix& matrix,
- const SkRect& domain,
- GrTextureDomain::Mode mode,
- GrSamplerParams::FilterMode filterMode)
- : GrSingleTextureEffect(texture, std::move(colorSpaceXform), matrix, filterMode,
- OptFlags(texture->config(), mode))
- , fTextureDomain(texture, domain, mode) {
- SkASSERT(mode != GrTextureDomain::kRepeat_Mode ||
- filterMode == GrSamplerParams::kNone_FilterMode);
- this->initClassID<GrTextureDomainEffect>();
-}
-
sk_sp<GrFragmentProcessor> GrTextureDomainEffect::Make(GrResourceProvider* resourceProvider,
sk_sp<GrTextureProxy> proxy,
sk_sp<GrColorSpaceXform> colorSpaceXform,
@@ -388,25 +358,6 @@ sk_sp<GrFragmentProcessor> GrTextureDomainEffect::TestCreate(GrProcessorTestData
#endif
///////////////////////////////////////////////////////////////////////////////
-
-sk_sp<GrFragmentProcessor> GrDeviceSpaceTextureDecalFragmentProcessor::Make(GrTexture* texture,
- const SkIRect& subset, const SkIPoint& deviceSpaceOffset) {
- return sk_sp<GrFragmentProcessor>(new GrDeviceSpaceTextureDecalFragmentProcessor(
- texture, subset, deviceSpaceOffset));
-}
-
-GrDeviceSpaceTextureDecalFragmentProcessor::GrDeviceSpaceTextureDecalFragmentProcessor(
- GrTexture* texture, const SkIRect& subset, const SkIPoint& deviceSpaceOffset)
- : INHERITED(kCompatibleWithCoverageAsAlpha_OptimizationFlag)
- , fTextureSampler(texture, GrSamplerParams::ClampNoFilter())
- , fTextureDomain(texture, GrTextureDomain::MakeTexelDomain(subset),
- GrTextureDomain::kDecal_Mode) {
- this->addTextureSampler(&fTextureSampler);
- fDeviceSpaceOffset.fX = deviceSpaceOffset.fX - subset.fLeft;
- fDeviceSpaceOffset.fY = deviceSpaceOffset.fY - subset.fTop;
- this->initClassID<GrDeviceSpaceTextureDecalFragmentProcessor>();
-}
-
sk_sp<GrFragmentProcessor> GrDeviceSpaceTextureDecalFragmentProcessor::Make(
GrResourceProvider* resourceProvider,
sk_sp<GrTextureProxy> proxy,