| Index: src/gpu/GrTextureParamsAdjuster.cpp
|
| diff --git a/src/gpu/GrTextureParamsAdjuster.cpp b/src/gpu/GrTextureParamsAdjuster.cpp
|
| index a78987cfb77602d9357d4da1751bd766a4b42168..7affae6561a32bdd18e3288d08694c2bbfa5ea47 100644
|
| --- a/src/gpu/GrTextureParamsAdjuster.cpp
|
| +++ b/src/gpu/GrTextureParamsAdjuster.cpp
|
| @@ -432,9 +432,15 @@ const GrFragmentProcessor* GrTextureAdjuster::createFragmentProcessor(
|
|
|
| GrTexture* GrTextureMaker::refTextureForParams(const GrTextureParams& params) {
|
| CopyParams copyParams;
|
| + bool willBeMipped = params.filterMode() == GrTextureParams::kMipMap_FilterMode;
|
| +
|
| + if (!fContext->caps()->mipMapSupport()) {
|
| + willBeMipped = false;
|
| + }
|
| +
|
| if (!fContext->getGpu()->makeCopyForTextureParams(this->width(), this->height(), params,
|
| ©Params)) {
|
| - return this->refOriginalTexture();
|
| + return this->refOriginalTexture(willBeMipped);
|
| }
|
| GrUniqueKey copyKey;
|
| this->makeCopyKey(copyParams, ©Key);
|
| @@ -445,7 +451,7 @@ GrTexture* GrTextureMaker::refTextureForParams(const GrTextureParams& params) {
|
| }
|
| }
|
|
|
| - GrTexture* result = this->generateTextureForParams(copyParams);
|
| + GrTexture* result = this->generateTextureForParams(copyParams, willBeMipped);
|
| if (!result) {
|
| return nullptr;
|
| }
|
| @@ -499,8 +505,9 @@ const GrFragmentProcessor* GrTextureMaker::createFragmentProcessor(
|
| filterOrNullForBicubic);
|
| }
|
|
|
| -GrTexture* GrTextureMaker::generateTextureForParams(const CopyParams& copyParams) {
|
| - SkAutoTUnref<GrTexture> original(this->refOriginalTexture());
|
| +GrTexture* GrTextureMaker::generateTextureForParams(const CopyParams& copyParams,
|
| + bool willBeMipped) {
|
| + SkAutoTUnref<GrTexture> original(this->refOriginalTexture(willBeMipped));
|
| if (!original) {
|
| return nullptr;
|
| }
|
|
|