Index: src/gpu/GrImageIDTextureAdjuster.cpp |
diff --git a/src/gpu/GrImageIDTextureAdjuster.cpp b/src/gpu/GrImageIDTextureAdjuster.cpp |
index 5ba99d20de7ffe7b1fd3cd6c4aa98dc4dabdc8d2..21c2f333589b9b1d913220c4063daa99a6475d60 100644 |
--- a/src/gpu/GrImageIDTextureAdjuster.cpp |
+++ b/src/gpu/GrImageIDTextureAdjuster.cpp |
@@ -82,7 +82,7 @@ GrBitmapTextureMaker::GrBitmapTextureMaker(GrContext* context, const SkBitmap& b |
} |
GrTexture* GrBitmapTextureMaker::refOriginalTexture(bool willBeMipped) { |
- GrTexture* tex; |
+ GrTexture* tex = nullptr; |
if (fOriginalKey.isValid()) { |
tex = this->context()->textureProvider()->findAndRefTextureByUniqueKey(fOriginalKey); |
@@ -90,11 +90,10 @@ GrTexture* GrBitmapTextureMaker::refOriginalTexture(bool willBeMipped) { |
return tex; |
} |
} |
- // disable mipmapping until we generate anisotropic mipmap levels |
- willBeMipped = false; |
if (willBeMipped) { |
tex = GrGenerateMipMapsAndUploadToTexture(this->context(), fBitmap); |
- } else { |
+ } |
+ if (!tex) { |
tex = GrUploadBitmapToTexture(this->context(), fBitmap); |
} |
if (tex && fOriginalKey.isValid()) { |