aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrProcessor.cpp
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-05-08 13:41:35 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-05-08 18:07:07 +0000
commit49081d13bacbea0631351dc5031d98e3fbb3ec45 (patch)
tree3945cf8223112e86864a19661b2c6b6757e2c025 /src/gpu/GrProcessor.cpp
parent26368c33007191205669bb227d6e7b915ba06f9e (diff)
Expand GrTextureProxy to handle highestFilterMode
Once TextureProxies aren't instantiated in the TextureSamplers, the they will need to be able to supply this information. split out of: https://skia-review.googlesource.com/c/10484/ (Omnibus: Push instantiation of GrTextures later (post TextureSampler)) Change-Id: I66555c0746131f565862f7a30d54ff1d458d2062 Reviewed-on: https://skia-review.googlesource.com/15819 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/GrProcessor.cpp')
-rw-r--r--src/gpu/GrProcessor.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gpu/GrProcessor.cpp b/src/gpu/GrProcessor.cpp
index c5ccc3fbc9..57a8008dae 100644
--- a/src/gpu/GrProcessor.cpp
+++ b/src/gpu/GrProcessor.cpp
@@ -245,8 +245,8 @@ void GrResourceIOProcessor::TextureSampler::reset(GrResourceProvider* resourcePr
GrTexture* texture = proxy->instantiate(resourceProvider);
if (texture) {
fTexture.set(SkRef(texture), kRead_GrIOType);
- fParams.setFilterMode(SkTMin(params.filterMode(),
- texture->texturePriv().highestFilterMode()));
+ SkASSERT(texture->texturePriv().highestFilterMode() == proxy->highestFilterMode());
+ fParams.setFilterMode(SkTMin(params.filterMode(), proxy->highestFilterMode()));
}
fVisibility = visibility;
@@ -262,7 +262,8 @@ void GrResourceIOProcessor::TextureSampler::reset(GrResourceProvider* resourcePr
GrTexture* texture = proxy->instantiate(resourceProvider);
if (texture) {
fTexture.set(SkRef(texture), kRead_GrIOType);
- filterMode = SkTMin(filterMode, texture->texturePriv().highestFilterMode());
+ SkASSERT(texture->texturePriv().highestFilterMode() == proxy->highestFilterMode());
+ filterMode = SkTMin(filterMode, proxy->highestFilterMode());
}
fParams.reset(tileXAndY, filterMode);