aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrTextureAdjuster.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/GrTextureAdjuster.cpp')
-rw-r--r--src/gpu/GrTextureAdjuster.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/gpu/GrTextureAdjuster.cpp b/src/gpu/GrTextureAdjuster.cpp
index d016896c3f..b2fc0584ba 100644
--- a/src/gpu/GrTextureAdjuster.cpp
+++ b/src/gpu/GrTextureAdjuster.cpp
@@ -17,9 +17,8 @@ GrTextureAdjuster::GrTextureAdjuster(GrContext* context, sk_sp<GrTextureProxy> o
SkAlphaType alphaType,
uint32_t uniqueID,
SkColorSpace* cs)
- : INHERITED(original->width(), original->height(),
+ : INHERITED(context, original->width(), original->height(),
GrPixelConfigIsAlphaOnly(original->config()))
- , fContext(context)
, fOriginal(std::move(original))
, fAlphaType(alphaType)
, fColorSpace(cs)
@@ -77,6 +76,7 @@ sk_sp<GrTextureProxy> GrTextureAdjuster::onRefTextureProxyForParams(
const GrSamplerState& params,
SkColorSpace* dstColorSpace,
sk_sp<SkColorSpace>* texColorSpace,
+ bool willBeMipped,
SkScalar scaleAdjust[2]) {
sk_sp<GrTextureProxy> proxy = this->originalProxyRef();
CopyParams copyParams;
@@ -105,8 +105,6 @@ sk_sp<GrTextureProxy> GrTextureAdjuster::onRefTextureProxyForParams(
}
}
- bool willBeMipped = GrSamplerState::Filter::kMipMap == params.filter() &&
- fContext->contextPriv().caps()->mipMapSupport();
sk_sp<GrTextureProxy> result = this->refTextureProxyCopy(copyParams, willBeMipped);
if (!result && needsCopyForMipsOnly) {
// If we were unable to make a copy and we only needed a copy for mips, then we will return